locked
System.InvalidOperationException "IWpfTextView.TextViewLines is invalid." RRS feed

  • Question

  • We are working on a Visual Studio extension, but now and then the following error is occuring. Can somebody help me point out the cause of this exception? None of our own classes are mentioned in the stacktrace. Is this an internal bug in VS 2010?

    System.InvalidOperationException:

      Message="IWpfTextView.TextViewLines is invalid."

      Source="Microsoft.VisualStudio.Platform.VSEditor"

      StackTrace:

        at Microsoft.VisualStudio.Text.Editor.Implementation.WpfTextView.get_TextViewLines()

        at Microsoft.VisualStudio.Text.Editor.Implementation.SolidColorBrushSelectionPainter.Activate()

        at Microsoft.VisualStudio.Text.Editor.Implementation.WpfTextSelection.set_IsActive(Boolean value)

        at Microsoft.VisualStudio.Text.Editor.Implementation.WpfTextView.OnLostKeyboardFocus(Object sender, KeyboardFocusChangedEventArgs e)

        at System.Windows.Input.KeyboardFocusChangedEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)

        at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)

        at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)

        at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)

        at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)

        at System.Windows.UIElement.RaiseTrustedEvent(RoutedEventArgs args)

        at System.Windows.UIElement.RaiseEvent(RoutedEventArgs args, Boolean trusted)

        at System.Windows.Input.InputManager.ProcessStagingArea()

        at System.Windows.Input.InputManager.ProcessInput(InputEventArgs input)

        at System.Windows.Input.KeyboardDevice.ChangeFocus(DependencyObject focus, Int32 timestamp)

        at System.Windows.Input.KeyboardDevice.PostProcessInput(Object sender, ProcessInputEventArgs e)

        at System.Windows.Input.InputManager.RaiseProcessInputEventHandlers(ProcessInputEventHandler postProcessInput, ProcessInputEventArgs processInputEventArgs)

        at System.Windows.Input.InputManager.ProcessStagingArea()

        at System.Windows.Input.InputManager.ProcessInput(InputEventArgs input)

        at System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport)

        at System.Windows.Interop.HwndKeyboardInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawKeyboardActions actions, Int32 scanCode, Boolean isExtendedKey, Boolean isSystemKey, Int32 virtualKey)

        at System.Windows.Interop.HwndKeyboardInputProvider.PossiblyDeactivate(IntPtr hwndFocus)

        at System.Windows.Interop.HwndKeyboardInputProvider.FilterMessage(IntPtr hwnd, WindowMessage message, IntPtr wParam, IntPtr lParam, Boolean& handled)

        at System.Windows.Interop.HwndSource.InputFilterMessage(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)


    • Edited by TWTA Monday, February 4, 2013 8:19 PM
    Monday, February 4, 2013 8:18 PM

All replies

  • Can you paste a complete mixed mode callstack with the Microsoft public symbol servers set up so all the frames are resolved?
    Monday, February 4, 2013 9:53 PM