(done) VS Exception involving TwigTokenCache
Posted: August 9th, 2018, 7:18 pm
This is hapenning on multiple dev env, using VS pro 2017. We can trigger this exception regularly by backspacing over a block of code like this:
{% endif %}
As soon as backspace crosses over the }
Full exception:
System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values. Parameter name: length at Microsoft.VisualStudio.Text.Span..ctor(Int32 start, Int32 length) at Microsoft.VisualStudio.Text.Implementation.BaseSnapshot.GetText(Int32 startIndex, Int32 length) at Devsense.VisualStudio.Twig.Code.TwigTokenCache.Update(ITextSnapshot snapshot) at Devsense.VisualStudio.Twig.Code.TwigTokenCache.GetTokens(SnapshotSpan position) at Devsense.VisualStudio.Twig.Classifier.TwigClassifier.GetClassificationSpans(SnapshotSpan span) at Microsoft.VisualStudio.Text.Classification.Implementation.ClassifierTagger.<GetTags>d__5.MoveNext() at Microsoft.VisualStudio.Text.Tagging.Implementation.TagAggregator`1.<GetTagsForBuffer>d__39.MoveNext() --- End of stack trace from previous location where exception was thrown --- at Microsoft.VisualStudio.Telemetry.WindowsErrorReporting.WatsonReport.GetClrWatsonExceptionInfo(Exception exceptionObject)
{% endif %}
As soon as backspace crosses over the }
Full exception:
System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values. Parameter name: length at Microsoft.VisualStudio.Text.Span..ctor(Int32 start, Int32 length) at Microsoft.VisualStudio.Text.Implementation.BaseSnapshot.GetText(Int32 startIndex, Int32 length) at Devsense.VisualStudio.Twig.Code.TwigTokenCache.Update(ITextSnapshot snapshot) at Devsense.VisualStudio.Twig.Code.TwigTokenCache.GetTokens(SnapshotSpan position) at Devsense.VisualStudio.Twig.Classifier.TwigClassifier.GetClassificationSpans(SnapshotSpan span) at Microsoft.VisualStudio.Text.Classification.Implementation.ClassifierTagger.<GetTags>d__5.MoveNext() at Microsoft.VisualStudio.Text.Tagging.Implementation.TagAggregator`1.<GetTagsForBuffer>d__39.MoveNext() --- End of stack trace from previous location where exception was thrown --- at Microsoft.VisualStudio.Telemetry.WindowsErrorReporting.WatsonReport.GetClrWatsonExceptionInfo(Exception exceptionObject)