NullReferenceException in DiffMarginViewModel.Cleanup()
yysun opened this issue · comments
Yiyi Sun commented
Found the following message in Event Log after VS 2012 crashed.
Application: devenv.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.Application: devenv.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.NullReferenceException
Stack:
at GitScc.Diff.DiffUpdateBackgroundParser.Dispose(Boolean)
at GitScc.Diff.BackgroundParser.Dispose()
at GitScc.Diff.ViewModel.DiffMarginViewModel.Cleanup()
at GitScc.Diff.DiffMargin.Dispose()
at Microsoft.VisualStudio.Text.Utilities.ContainerMargin.DisposeMargin(Microsoft.VisualStudio.Text.Editor.IWpfTextViewMargin)
at Microsoft.VisualStudio.Text.Utilities.ContainerMargin.Close()
at Microsoft.VisualStudio.Text.Utilities.ContainerMargin.Dispose()
at Microsoft.VisualStudio.Text.Utilities.ContainerMargin.DisposeMargin(Microsoft.VisualStudio.Text.Editor.IWpfTextViewMargin)
at Microsoft.VisualStudio.Text.Utilities.ContainerMargin.Close()
at Microsoft.VisualStudio.Text.Editor.Implementation.LeftMargin.Close()
at Microsoft.VisualStudio.Text.Utilities.ContainerMargin.Dispose()
at Microsoft.VisualStudio.Text.Editor.Implementation.WpfTextViewHost.Close()
at Microsoft.VisualStudio.Editor.Implementation.VsTextViewAdapter.CloseExistingWpfTextView()
at Microsoft.VisualStudio.Editor.Implementation.VsTextViewAdapter.CloseBufferRelatedResources()
at Microsoft.VisualStudio.Editor.Implementation.VsTextViewAdapter.CloseView()
at Microsoft.VisualStudio.Editor.Implementation.VsCodeWindowAdapter.Close()
at GitScc.ToolWindowWithEditor`1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].ClearEditor()
at GitScc.ToolWindowWithEditor`1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].SetDisplayedFile(System.String)
at GitScc.PendingChangesView.ShowFile(System.String)
at GitScc.PendingChangesView+<>c__DisplayClass4+<>c__DisplayClass8.<listView1_SelectionChanged>b__2()
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate, System.Object, Int32)
at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(System.Object, System.Delegate, System.Object, Int32, System.Delegate)
at System.Windows.Threading.DispatcherOperation.InvokeImpl()
at System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(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.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)
at System.Windows.Threading.DispatcherOperation.Invoke()
at System.Windows.Threading.Dispatcher.ProcessQueue()
at System.Windows.Threading.Dispatcher.WndProcHook(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)
at MS.Win32.HwndWrapper.WndProc(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)
at MS.Win32.HwndSubclass.DispatcherCallbackOperation(System.Object)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate, System.Object, Int32)
at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(System.Object, System.Delegate, System.Object, Int32, System.Delegate)
at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(System.Windows.Threading.DispatcherPriority, System.TimeSpan, System.Delegate, System.Object, Int32)
at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr, Int32, IntPtr, IntPtr)
Stack:
at GitScc.Diff.DiffUpdateBackgroundParser.Dispose(Boolean)
at GitScc.Diff.BackgroundParser.Dispose()
at GitScc.Diff.ViewModel.DiffMarginViewModel.Cleanup()
at GitScc.Diff.DiffMargin.Dispose()
at Microsoft.VisualStudio.Text.Utilities.ContainerMargin.DisposeMargin(Microsoft.VisualStudio.Text.Editor.IWpfTextViewMargin)
at Microsoft.VisualStudio.Text.Utilities.ContainerMargin.Close()
at Microsoft.VisualStudio.Text.Utilities.ContainerMargin.Dispose()
at Microsoft.VisualStudio.Text.Utilities.ContainerMargin.DisposeMargin(Microsoft.VisualStudio.Text.Editor.IWpfTextViewMargin)
at Microsoft.VisualStudio.Text.Utilities.ContainerMargin.Close()
at Microsoft.VisualStudio.Text.Editor.Implementation.LeftMargin.Close()
at Microsoft.VisualStudio.Text.Utilities.ContainerMargin.Dispose()
at Microsoft.VisualStudio.Text.Editor.Implementation.WpfTextViewHost.Close()
at Microsoft.VisualStudio.Editor.Implementation.VsTextViewAdapter.CloseExistingWpfTextView()
at Microsoft.VisualStudio.Editor.Implementation.VsTextViewAdapter.CloseBufferRelatedResources()
at Microsoft.VisualStudio.Editor.Implementation.VsTextViewAdapter.CloseView()
at Microsoft.VisualStudio.Editor.Implementation.VsCodeWindowAdapter.Close()
at GitScc.ToolWindowWithEditor`1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].ClearEditor()
at GitScc.ToolWindowWithEditor`1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].SetDisplayedFile(System.String)
at GitScc.PendingChangesView.ShowFile(System.String)
at GitScc.PendingChangesView+<>c__DisplayClass4+<>c__DisplayClass8.<listView1_SelectionChanged>b__2()
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate, System.Object, Int32)
at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(System.Object, System.Delegate, System.Object, Int32, System.Delegate)
at System.Windows.Threading.DispatcherOperation.InvokeImpl()
at System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(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.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)
at System.Windows.Threading.DispatcherOperation.Invoke()
at System.Windows.Threading.Dispatcher.ProcessQueue()
at System.Windows.Threading.Dispatcher.WndProcHook(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)
at MS.Win32.HwndWrapper.WndProc(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)
at MS.Win32.HwndSubclass.DispatcherCallbackOperation(System.Object)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate, System.Object, Int32)
at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(System.Object, System.Delegate, System.Object, Int32, System.Delegate)
at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(System.Windows.Threading.DispatcherPriority, System.TimeSpan, System.Delegate, System.Object, Int32)
at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr, Int32, IntPtr, IntPtr)