dotnet / roslyn

The Roslyn .NET compiler provides C# and Visual Basic languages with rich code analysis APIs.
https://docs.microsoft.com/dotnet/csharp/roslyn-sdk/
MIT License
18.91k stars 4.01k forks source link

NullReferenceException from Microsoft.CodeAnalysis.CSharp.EditAndContinue.BreakpointSpans.CreateSpanForConstructorDeclaration #49779

Open tmat opened 3 years ago

tmat commented 3 years ago

Seen in logs of https://devdiv.visualstudio.com/DevDiv/_workitems/edit/1247686

11/17/2020 10:27:10 W. Europe Standard Time: Error : 1 :[devenv:21156] Unexpected exception: System.NullReferenceException: Object reference not set to an instance of an object.
   at Microsoft.CodeAnalysis.CSharp.EditAndContinue.BreakpointSpans.CreateSpanForConstructorDeclaration(ConstructorDeclarationSyntax constructorSyntax)
   at Microsoft.CodeAnalysis.CSharp.EditAndContinue.BreakpointSpans.TryCreateSpanForNode(SyntaxNode node, Int32 position)
   at Microsoft.CodeAnalysis.CSharp.EditAndContinue.BreakpointSpans.TryGetClosestBreakpointSpan(SyntaxNode root, Int32 position, TextSpan& span)
   at Microsoft.CodeAnalysis.CSharp.EditAndContinue.BreakpointSpans.TryGetBreakpointSpan(SyntaxTree tree, Int32 position, CancellationToken cancellationToken, TextSpan& breakpointSpan)
   at Microsoft.CodeAnalysis.CSharp.Debugging.CSharpBreakpointResolutionService.<ResolveBreakpointAsync>d__1.MoveNext()
Youssef1313 commented 3 years ago

@tmat Are there any repro steps for this?

tmat commented 3 years ago

Unfortunately, no more info is available.