1

Closed

System.InvalidOperationException while closing a lot of source code tabs fast

description

Here is the exception details:
System.InvalidOperationException was unhandled
  HResult=-2146233079
  Message=GetTextViewLineContainingBufferPosition called after the view is closed
  Source=Microsoft.VisualStudio.Platform.VSEditor
  StackTrace:
       at Microsoft.VisualStudio.Text.Editor.Implementation.WpfTextView.Microsoft.VisualStudio.Text.Editor.IWpfTextView.GetTextViewLineContainingBufferPosition(SnapshotPoint bufferPosition)
       at GitScc.Diff.ViewModel.DiffViewModel.UpdateDimensions(Boolean approximate, TextViewLayoutChangedEventArgs e)
       at GitScc.Diff.ViewModel.DiffViewModel.SetDisplayProperties(Boolean approximate, TextViewLayoutChangedEventArgs e)
       at GitScc.Diff.ViewModel.DiffMarginViewModel.RefreshDiffViewModelPositions(Boolean approximate, TextViewLayoutChangedEventArgs e)
       at GitScc.Diff.ViewModel.DiffMarginViewModel.RefreshDiffViewModelPositions()
       at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
       at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
       at System.Windows.Threading.DispatcherOperation.InvokeImpl()
       at System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(Object state)
       at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       at System.Windows.Threading.DispatcherOperation.Invoke()
       at System.Windows.Threading.Dispatcher.ProcessQueue()
       at System.Windows.Threading.Dispatcher.WndProcHook(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
       at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
       at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
       at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
       at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
       at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
       at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
Here is the steps to reproduce:
Open a few (more than 10) files with pending changes in visual studio. Then hold down Ctrl+F4 to close all the tabs one by one. Before all the tabs gets closed, the visual studio stopped working and I got the Close/Debug dialog box. I clicked the Debug button to inspect the situation, and I saw that the problem is related to GitSccProvider.dll.

It didn't happen when I disabled the "Git Source Control Provider 1.2".
Closed Nov 21, 2013 at 2:43 AM by sharwell

comments