minor bug: VS extension not properly parsing include headers
ikrima opened this issue · 3 comments
Not new bug, at least since I first started using the extension. Just finally hit it enough to cross my threshold for reporting :P
I looked into it initially and iirc, the issue was with <
& >
not escaped when serialized to some buffer (maybe the compile.scor file?) but it's been a months
The problematic headers are things like #include <windows>
Stack trace:
System.ArgumentException: Illegal characters in path.

at System.IO.Path.CheckInvalidPathChars(String path, Boolean checkAdditional)

at System.IO.Path.GetFileName(String path)

at CompileScore.ScoreGlyphTagger.CreateTrackingSpans()

at CompileScore.ScoreGlyphTagger..ctor(ITextView view, ITextBuffer sourceBuffer)

at CompileScore.ScoreGlyphTaggerProvider.CreateTagger[T](ITextView textView, ITextBuffer buffer)

at Microsoft.VisualStudio.Text.Tagging.Implementation.TagAggregator`1.InstantiateViewTagger(ITextView textView, Lazy`2 factory, ITextBuffer textBuffer, IList`1 newTaggers)
--- End of stack trace from previous location where exception was thrown ---

at Microsoft.VisualStudio.Telemetry.WindowsErrorReporting.WatsonReport.GetClrWatsonExceptionInfo(Exception exceptionObject)
meh, n/m, found out it was bc of this line:
#error("Do not include this file directly, use #include <es2/es2.h> instead.")
Tentatively closing since it was an easy fix by escaping
Interesting! And I am glad you managed to workaround it!
I have never seen this error! It might still be useful to guard the code against it, just in case, for safety.
Was it crashing the application? Is there a super simple repro case for me to make it happen?
Nah; it would just display a minorly annoying status bar message along the lines of "MSVC encountered a crash"
Confusingly, I can't get it to repro if I revert my workaround. If it comes up again, I'll try to get a capture