Opening/save .vue file breaks Visual Studio 2022 @ v17.1 (exception/restart)

SonarLint latest version (5.4) breaks Visual Studio 17.1 update.

The studio restarts after hanging for a few seconds when opening & saving a .vue file.

Previous versions of VS (including v17.0) works properly, only v17.1 is affected.

Stacktrace:

Application: devenv.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.ArgumentException
   at Microsoft.VisualStudio.Text.SnapshotSpan.TranslateTo(Microsoft.VisualStudio.Text.ITextSnapshot, Microsoft.VisualStudio.Text.SpanTrackingMode)
   at Microsoft.VisualStudio.Text.Tagging.Implementation.TagAggregator`1+<GetTagsForBuffer>d__49[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].MoveNext()
   at Microsoft.VisualStudio.Text.Tagging.Implementation.TagAggregator`1+<GetTagsForBuffers>d__52[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].MoveNext()
   at Microsoft.VisualStudio.Text.OverviewMargin.Implementation.ErrorMarginElement+<GetMarksFromTagger>d__1.MoveNext()
   at Microsoft.VisualStudio.Text.OverviewMargin.Implementation.BaseMarginElement.UpdateMarks()
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate, System.Object, Int32)
   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(System.Object, System.Delegate, System.Object, Int32, System.Delegate)
   at System.Windows.Threading.DispatcherOperation.InvokeImpl()
   at MS.Internal.CulturePreservingExecutionContext.CallbackWrapper(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 MS.Internal.CulturePreservingExecutionContext.Run(MS.Internal.CulturePreservingExecutionContext, 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 System.Windows.Threading.ExceptionWrapper.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)

Hi @detoxhby - welcome to the community.

Thanks for reporting the issue.

  • could you confirm that the issue doesn’t occur if SonarLint is not installed please?

  • the exception is being thrown from the Visual Studio editor scroll bar margin control (although it may be because of an issue in the way we are reporting issue to the editor). Does the crash still occur if you turn off the scroll bar annotations?

If the crash doesn’t occur, which SonarLint JavaScript/TypeScript issues are being reported for the file?

Thanks.

Hi @duncanp !

We’ve just updated the extension to the new v5.5 and the problem seems to be solved.

We’ll test other use cases to make sure there are no other defects and report back here in a few days.

Thanks for your answer anyway!

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.