Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compiler crashing issues reported through internal telemetry #7426

Open
mkArtakMSFT opened this issue Dec 7, 2021 · 5 comments
Open

Compiler crashing issues reported through internal telemetry #7426

mkArtakMSFT opened this issue Dec 7, 2021 · 5 comments
Labels
area-compiler Umbrella for all compiler issues bug Something isn't working Priority:1
Milestone

Comments

@mkArtakMSFT
Copy link
Member

mkArtakMSFT commented Dec 7, 2021

Internal Error - System.ArgumentException: startCommentStar at Microsoft.AspNetCore.Razor.Language.Syntax.InternalSyntax.SyntaxFactory.RazorCommentBlock(SyntaxToken startCommentTransition, SyntaxToken startCommentStar, SyntaxToken comment, SyntaxToken endCommentStar, SyntaxToken endCommentTransition) at --- This actually looks like a compiler error @Artak could you file a separate issue to track? You should be able to use PRISM to better understand users who ran into this (Btw old editor would have killed VS in this scenario, new editor the experience falls over instead 😃)

More context: https://devdiv.visualstudio.com/DevDiv/_workitems/edit/1435565

@mkArtakMSFT mkArtakMSFT added bug Something isn't working area-compiler Umbrella for all compiler issues labels Dec 7, 2021
@ghost
Copy link

ghost commented Dec 7, 2021

Thanks for contacting us.

We're moving this issue to the .NET 7 Planning milestone for future evaluation / consideration. We would like to keep this around to collect more feedback, which can help us with prioritizing this work. We will re-evaluate this issue, during our next planning meeting(s).
If we later determine, that the issue has no community involvement, or it's very rare and low-impact issue, we will close it - so that the team can focus on more important and high impact issues.
To learn more about what to expect next and how this issue will be handled you can read more about our triage process here.

@javiercn
Copy link
Member

@mkArtakMSFT can we get more details on the call stack for this one?

@mkArtakMSFT
Copy link
Member Author

Here is the full exception stack trace that I could find:

Internal Error - System.ArgumentException: startCommentStar at Microsoft.AspNetCore.Razor.Language.Syntax.InternalSyntax.SyntaxFactory.RazorCommentBlock(SyntaxToken startCommentTransition, SyntaxToken startCommentStar, SyntaxToken comment, SyntaxToken endCommentStar, SyntaxToken endCommentTransition) at Microsoft.AspNetCore.Razor.Language.Legacy.TokenizerBackedParser`1.ParseRazorComment() at Microsoft.AspNetCore.Razor.Language.Legacy.CSharpCodeParser.ParseEmbeddedTransition(SyntaxListBuilder`1& builder) at Microsoft.AspNetCore.Razor.Language.Legacy.CSharpCodeParser.Balance(SyntaxListBuilder`1 builder, BalancingModes mode, SyntaxKind left, SyntaxKind right, SourceLocation start) at Microsoft.AspNetCore.Razor.Language.Legacy.CSharpCodeParser.Balance(SyntaxListBuilder`1 builder, BalancingModes mode) at Microsoft.AspNetCore.Razor.Language.Legacy.CSharpCodeParser.TryParseCondition(SyntaxListBuilder`1& builder) at Microsoft.AspNetCore.Razor.Language.Legacy.CSharpCodeParser.ParseCondit...

And it looks like this is the source of the exception, which indicates either a malformed Razor file or the code doesn't account for a valid scenario.

@javiercn
Copy link
Member

javiercn commented Jan 26, 2022

@mkArtakMSFT thanks for the additional details.

Unfortunately, malformed files are definitely an scenario we need to handle.

@mkArtakMSFT it seems that the issue comes from our C# parser, so I'm going to put a pin on this one as there might be other work that might fix this in the future.

@mkArtakMSFT mkArtakMSFT self-assigned this Feb 16, 2022
@mkArtakMSFT mkArtakMSFT transferred this issue from dotnet/aspnetcore Apr 12, 2022
@mkArtakMSFT mkArtakMSFT removed their assignment Aug 10, 2022
@davidwengier
Copy link
Contributor

Reported in VS Mac too, with stack trace: https://devdiv.visualstudio.com/DevDiv/_workitems/edit/1558770

@chsienki chsienki transferred this issue from dotnet/razor-compiler Oct 28, 2022
@ghost ghost added the untriaged label Oct 29, 2022
@chsienki chsienki removed the untriaged label Jan 5, 2023
@ghost ghost added the untriaged label Jan 5, 2023
@chsienki chsienki added this to the Backlog milestone Jan 5, 2023
@chsienki chsienki removed the untriaged label Jan 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-compiler Umbrella for all compiler issues bug Something isn't working Priority:1
Projects
None yet
Development

No branches or pull requests

4 participants