AvaloniaUI / AvaloniaVS

Visual Studio Extension for Avalonia
MIT License
421 stars 81 forks source link

Unhandled System.IndexOutOfRangeException in Avalonia.Ide.CompletionEngine.TextManipulator #421

Open genlu opened 9 months ago

genlu commented 9 months ago

Describe the bug

Hi, I'm a developer in Visual Studio, and I'm seeing unhandled System.IndexOutOfRangeException from AvaloniaVS that might have caused issue with IntelliSense in VS

Here's the stacktrace:

System.ThrowHelper.ThrowIndexOutOfRangeException()
Avalonia.Ide.CompletionEngine.TextManipulator.ManipulateText(ITextChange)
AvaloniaVS.IntelliSense.XamlTextManipulatorRegistrar.TextBuffer_Changed(Object,TextContentChangedEventArgs)
Microsoft.VisualStudio.Text.Utilities.GuardedOperations.RaiseEvent[TArgs](Object,EventHandler`1,TArgs)

To Reproduce

Unfortunately, I don't have the repro. I noticed the exception from our telemetry.

AvaloniaVS plugin version

n/a

Avalonia version

n/a

Visual Studio version

17.4 - 17.8

Relevant log output

n/a

Additional context

No response