Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unhandled NullReferenceException in interactive window #4513

Closed
huguesv opened this issue Jul 10, 2018 · 1 comment
Closed

Unhandled NullReferenceException in interactive window #4513

huguesv opened this issue Jul 10, 2018 · 1 comment
Assignees
Labels

Comments

@huguesv
Copy link
Contributor

huguesv commented Jul 10, 2018

From diagnostics attached to https://developercommunity.visualstudio.com/content/problem/229987/python-reset-interactive-window.html

Probably on shutdown? That's what happened in RTVS.
See dotnet/interactive-window#32
See microsoft/RTVS#2637

Time: 2018-06-25T09:43:19
Application: devenv.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.NullReferenceException
   at Microsoft.VisualStudio.InteractiveWindow.InteractiveWindow.UIThread[[Microsoft.VisualStudio.Text.Span, Microsoft.VisualStudio.Text.Data, Version=15.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a]](System.Func`2<UIThreadOnly,Microsoft.VisualStudio.Text.Span>)
   at Microsoft.VisualStudio.InteractiveWindow.InteractiveWindow.Microsoft.VisualStudio.InteractiveWindow.IInteractiveWindow.WriteError(System.String)
   at Microsoft.PythonTools.Repl.PythonCommonInteractiveEvaluator.AppendTextWithEscapes(Microsoft.VisualStudio.InteractiveWindow.IInteractiveWindow, System.String, Boolean, Boolean)
   at Microsoft.PythonTools.Repl.PythonCommonInteractiveEvaluator.WriteError(System.String, Boolean)
   at Microsoft.PythonTools.Repl.PythonInteractiveEvaluator+CommandProcessorThread.StdErrReceived(System.Object, System.Diagnostics.DataReceivedEventArgs)
   at System.Diagnostics.Process.ErrorReadNotifyUser(System.String)
   at System.Diagnostics.AsyncStreamReader.FlushMessageQueue()
   at System.Diagnostics.AsyncStreamReader.GetLinesFromStringBuilder()
   at System.Diagnostics.AsyncStreamReader.ReadBuffer(System.IAsyncResult)
   at System.IO.Stream+ReadWriteTask.InvokeAsyncCallback(System.Object)
   at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
   at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
   at System.IO.Stream+ReadWriteTask.System.Threading.Tasks.ITaskCompletionAction.Invoke(System.Threading.Tasks.Task)
   at System.Threading.Tasks.Task.FinishContinuations()
   at System.Threading.Tasks.Task.FinishStageThree()
   at System.Threading.Tasks.Task.FinishStageTwo()
   at System.Threading.Tasks.Task.Finish(Boolean)
   at System.Threading.Tasks.Task.ExecuteWithThreadLocal(System.Threading.Tasks.Task ByRef)
   at System.Threading.Tasks.Task.ExecuteEntry(Boolean)
   at System.Threading.Tasks.Task.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()
   at System.Threading.ThreadPoolWorkQueue.Dispatch()
   at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback()
@zooba
Copy link
Member

zooba commented Jul 10, 2018

I don't see any feasible workaround other than handling the exception.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants