Quantcast
Channel: Visual Studio Integrate forum
Viewing all articles
Browse latest Browse all 4410

OutOfRangeException in LanguageServiceClassificationTagger / TagAggregator

$
0
0

Hi experts,

in my custom language service I sometimes get an indeterministically occurring exception:

// System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index
// at System.ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument argument, ExceptionResource resource) at System.Collections.Generic.List`1.set_Item(Int32 index, T value)
// at Microsoft.VisualStudio.Editor.Implementation.LanguageServiceClassificationTagger.ClassifyLine(Int32 lineNo)
// at Microsoft.VisualStudio.Editor.Implementation.LanguageServiceClassificationTagger.GetTags(NormalizedSnapshotSpanCollection spans)
// at Microsoft.VisualStudio.Text.Tagging.Implementation.TagAggregator`1.<GetTagsForBuffer>d__5.MoveNext()

It seems that this ClassificationTagger gets called asynchronously, because there is no direct link to my own code in the callstack; not even a breakpoint for debugging the exception reveals new info, because it's entirely outside of my own code. So my question is if anyone knows what this ClassificationTagger is, and which actions inside my LanguageService might trigger the execution of the Tagger. My best guess would be that it has something to do with syntax-coloring (Microsoft.VisualStudio.Package.IScanner Interface), but I'm not sure.

Regards,
Max


Viewing all articles
Browse latest Browse all 4410

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>