(done) VS Exception involving TwigTokenCache

PHP Tools [?] extends Visual Studio with set of advanced features to work more efficiently with PHP code.

(done) VS Exception involving TwigTokenCache

Postby jason.maclean » 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)
Posts: 1
Joined: August 9th, 2018, 7:14 pm

Re: VS Exception involving TwigTokenCache

Postby Michal Brabec » August 10th, 2018, 2:13 pm

Hi Jason,
thank you for reporting the issue.
We were able to reproduce and fix it.
The updated Twig support will be released with the next update of PHP Tools.
Best regards,
Michal Brabec │ DEVSENSE s.r.o. │ @gMichalBrabecmichal.brabec@devsense.com
User avatar
Michal Brabec
Posts: 13
Joined: September 14th, 2016, 8:55 am

Return to PHP Tools

Who is online

Users browsing this forum: No registered users and 1 guest


User Control Panel


Who is online

In total there is 1 user online :: 0 registered, 0 hidden and 1 guest (based on users active over the past 5 minutes)
Most users ever online was 89 on October 15th, 2018, 4:06 pm

Users browsing this forum: No registered users and 1 guest