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.84k stars 4k forks source link

AccessViolationException in Binder.LookupExtensionMethodsInSingleBinder causes ServiceHub crash #62059

Open DrLeh opened 2 years ago

DrLeh commented 2 years ago

Shortly after starting VS2022, I start to see these several of these errors at the top, and certain intellisense features stop working . image

When I click the show stack trace, I get the same error for them all:

StreamJsonRpc.ConnectionLostException : The JSON-RPC connection with the remote party was lost before the request could complete.
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at async StreamJsonRpc.JsonRpc.InvokeCoreAsync(<Unknown Parameters>)
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at async StreamJsonRpc.JsonRpc.InvokeCoreAsync[TResult](<Unknown Parameters>)
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at async Microsoft.CodeAnalysis.Remote.BrokeredServiceConnection`1.TryInvokeAsync[TService,TResult](<Unknown Parameters>)

I'm not doing anything in particular when it happens. I open a solution i've worked in for years on a previous machine, VS2022 on that machine has no issues. After coding for a bit this will happen and my intellisense drops. After restart it will work again for a few minutes.

Fully fresh install of VS 2022, no extensions added. I even ran the InstallCleanup.exe step from here https://docs.microsoft.com/en-us/visualstudio/install/uninstall-visual-studio?view=vs-2022 to do a completely fresh install.

My only other idea is that there could be some policy on my machine that is causing the JSON-RPC call to not be allowed? I'm not sure what it's connecting to though so not sure what to look for there.

After some more work on this PC, it seems like the it only happens in my older solution that has more projects, and also contains some .net standard 2.0, 2.1, and net472 web projects. I have newer solutions that are all .net 6 and don't seem to have the same issue.

I originally commented in this thread that seemed related https://github.com/dotnet/roslyn/issues/58102#issuecomment-1158880246 @CyrusNajmabadi requested I create a new thread.

I have tried doing the "report a problem" button in visual studio but nothing happens when i click it.

CyrusNajmabadi commented 2 years ago

@DrLeh is there anything more to this callstack? @tmat @sharwell @AArnott any ideas? Is there something that can be done to figure out what went wrong here?

AArnott commented 2 years ago

The next step is to find out why the connection dropped. It could be that the remote process crashed, or that either side closed the connection explicitly. Those familiar with your connection code would have to say if there's a possibility that the connection was explicitly closed. A crash would presumably leave behind other evidence (e.g. Application Logs in the Event Viewer).

tmat commented 2 years ago

Yes, looks like a hard crash (stack overflow, AV, etc) since multiple services reported the error.

DrLeh commented 2 years ago

@CyrusNajmabadi sometimes one of them will have a slightly longer stack trace:

StreamJsonRpc.ConnectionLostException : The JSON-RPC connection with the remote party was lost before the request could complete. ---> System.OperationCanceledException : The operation was canceled.
   at System.Threading.CancellationToken.ThrowOperationCanceledException()
   at async StreamJsonRpc.MessageHandlerBase.WriteAsync(<Unknown Parameters>)
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at async StreamJsonRpc.JsonRpc.SendAsync(<Unknown Parameters>)
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at async StreamJsonRpc.JsonRpc.InvokeCoreAsync(<Unknown Parameters>)
   --- End of inner exception stack trace ---
   at async StreamJsonRpc.JsonRpc.InvokeCoreAsync(<Unknown Parameters>)
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at async StreamJsonRpc.JsonRpc.InvokeCoreAsync[TResult](<Unknown Parameters>)
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Threading.Tasks.ValueTask`1.get_Result()
   at async Microsoft.CodeAnalysis.Remote.BrokeredServiceConnection`1.TryInvokeAsync[TService,TResult](<Unknown Parameters>)

@AArnott Event viewer shows me 4 errors:

image

"Application Error" 1 message:

Faulting application name: ServiceHub.RoslynCodeAnalysisService.exe, version: 3.1.4097.1035, time stamp: 0x94476fcc
Faulting module name: unknown, version: 0.0.0.0, time stamp: 0x00000000
Exception code: 0xc0000005
Fault offset: 0x0000025b51f3b7b0
Faulting process id: 0x36f4
Faulting application start time: 0x01d885a12e6aa871
Faulting application path: C:\Program Files\Microsoft Visual Studio\2022\Enterprise\common7\ServiceHub\Hosts\ServiceHub.Host.CLR.AnyCPU\ServiceHub.RoslynCodeAnalysisService.exe
Faulting module path: unknown
Report Id: 75544b9d-0ac2-40d2-bd2f-a3778cd69d62
Faulting package full name: 
Faulting package-relative application ID: 

"Application Error" 2 message:

Faulting application name: VBCSCompiler.exe, version: 4.200.22.28105, time stamp: 0x840c34c6
Faulting module name: Microsoft.CodeAnalysis.CSharp.ni.dll, version: 4.200.22.28105, time stamp: 0x90c7f230
Exception code: 0xc0000005
Fault offset: 0x0000000000ebd694
Faulting process id: 0x69b0
Faulting application start time: 0x01d885a13ef76d89
Faulting application path: C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin\Roslyn\VBCSCompiler.exe
Faulting module path: C:\Windows\assembly\NativeImages_v4.0.30319_64\Microsoft.C1d3c2215#\5d92da40d84018dcbe56f4c0a17240d6\Microsoft.CodeAnalysis.CSharp.ni.dll
Report Id: 990c38c7-cc65-417a-80fa-51e2f0c8128a
Faulting package full name: 
Faulting package-relative application ID: 

Big stack traces on the .net runtime errors: netruntime-error-1.txt netruntime-error-2.txt

DrLeh commented 2 years ago

Last week I had tried regenerating native images with ngen.exe, i got a bunch of errors though so i'm not sure that it worked properly.

AArnott commented 2 years ago

@drleh Great. Those crash logs will typically include callstacks that are responsible for crashing the remote process. That's where the investigation should continue, typically. Nothing more JSON-RPC can tell you from a different process. All it knows is that the connection died.

DrLeh commented 2 years ago

@AArnott where can i find the crash logs? is there more info i can provide?

Running with /Log, the activitylog.xml just has the same JSON-RPC error

AArnott commented 2 years ago

If it isn't in the Event Viewer, I don't know where else to look. You already found the logs there, but I didn't see the exception information that would typically be there for a managed crash. Given the crash is said to be within the roslyn module, a member of the roslyn team will have to investigate further (that's not me).

sharwell commented 2 years ago

I hid all comments involved in locating the cause of the error so I can redirect this to the team that owns the code.

This error was caused by a ServiceHub process crash. Specifically, this one:

Application: ServiceHub.RoslynCodeAnalysisService.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.AccessViolationException
   at Microsoft.CodeAnalysis.CSharp.Binder.LookupExtensionMethodsInSingleBinder(Microsoft.CodeAnalysis.CSharp.ExtensionMethodScope, Microsoft.CodeAnalysis.CSharp.LookupResult, System.String, Int32, Microsoft.CodeAnalysis.CSharp.LookupOptions, Microsoft.CodeAnalysis.CompoundUseSiteInfo`1<Microsoft.CodeAnalysis.CSharp.Symbols.AssemblySymbol> ByRef)
   at Microsoft.CodeAnalysis.CSharp.Binder.PopulateExtensionMethodsFromSingleBinder(Microsoft.CodeAnalysis.CSharp.ExtensionMethodScope, Microsoft.CodeAnalysis.CSharp.MethodGroup, Microsoft.CodeAnalysis.SyntaxNode, Microsoft.CodeAnalysis.CSharp.BoundExpression, System.String, System.Collections.Immutable.ImmutableArray`1<Microsoft.CodeAnalysis.CSharp.Symbols.TypeWithAnnotations>, Microsoft.CodeAnalysis.CSharp.BindingDiagnosticBag)
   at Microsoft.CodeAnalysis.CSharp.Binder.BindExtensionMethod(Microsoft.CodeAnalysis.SyntaxNode, System.String, Microsoft.CodeAnalysis.CSharp.AnalyzedArguments, Microsoft.CodeAnalysis.CSharp.BoundExpression, System.Collections.Immutable.ImmutableArray`1<Microsoft.CodeAnalysis.CSharp.Symbols.TypeWithAnnotations>, Boolean, Microsoft.CodeAnalysis.RefKind, Microsoft.CodeAnalysis.CSharp.Symbols.TypeSymbol, Boolean)
   at Microsoft.CodeAnalysis.CSharp.Binder.ResolveMethodGroupInternal(Microsoft.CodeAnalysis.CSharp.BoundMethodGroup, Microsoft.CodeAnalysis.SyntaxNode, System.String, Microsoft.CodeAnalysis.CSharp.AnalyzedArguments, Boolean, Microsoft.CodeAnalysis.CompoundUseSiteInfo`1<Microsoft.CodeAnalysis.CSharp.Symbols.AssemblySymbol> ByRef, Boolean, Boolean, Microsoft.CodeAnalysis.RefKind, Microsoft.CodeAnalysis.CSharp.Symbols.TypeSymbol, Boolean, Microsoft.CodeAnalysis.CSharp.CallingConventionInfo ByRef)
   at Microsoft.CodeAnalysis.CSharp.Binder.ResolveMethodGroup(Microsoft.CodeAnalysis.CSharp.BoundMethodGroup, Microsoft.CodeAnalysis.SyntaxNode, System.String, Microsoft.CodeAnalysis.CSharp.AnalyzedArguments, Boolean, Microsoft.CodeAnalysis.CompoundUseSiteInfo`1<Microsoft.CodeAnalysis.CSharp.Symbols.AssemblySymbol> ByRef, Boolean, Boolean, Microsoft.CodeAnalysis.RefKind, Microsoft.CodeAnalysis.CSharp.Symbols.TypeSymbol, Boolean, Microsoft.CodeAnalysis.CSharp.CallingConventionInfo ByRef)
   at Microsoft.CodeAnalysis.CSharp.Binder.BindMethodGroupInvocation(Microsoft.CodeAnalysis.SyntaxNode, Microsoft.CodeAnalysis.SyntaxNode, System.String, Microsoft.CodeAnalysis.CSharp.BoundMethodGroup, Microsoft.CodeAnalysis.CSharp.AnalyzedArguments, Microsoft.CodeAnalysis.CSharp.BindingDiagnosticBag, Microsoft.CodeAnalysis.CSharp.CSharpSyntaxNode, Boolean, Boolean ByRef)
   at Microsoft.CodeAnalysis.CSharp.Binder.BindInvocationExpression(Microsoft.CodeAnalysis.SyntaxNode, Microsoft.CodeAnalysis.SyntaxNode, System.String, Microsoft.CodeAnalysis.CSharp.BoundExpression, Microsoft.CodeAnalysis.CSharp.AnalyzedArguments, Microsoft.CodeAnalysis.CSharp.BindingDiagnosticBag, Microsoft.CodeAnalysis.CSharp.CSharpSyntaxNode, Boolean)
   at Microsoft.CodeAnalysis.CSharp.Binder.BindInvocationExpression(Microsoft.CodeAnalysis.CSharp.Syntax.InvocationExpressionSyntax, Microsoft.CodeAnalysis.CSharp.BindingDiagnosticBag)
   at Microsoft.CodeAnalysis.CSharp.Binder.BindExpressionInternal(Microsoft.CodeAnalysis.CSharp.Syntax.ExpressionSyntax, Microsoft.CodeAnalysis.CSharp.BindingDiagnosticBag, Boolean, Boolean)
   at Microsoft.CodeAnalysis.CSharp.Binder.BindExpression(Microsoft.CodeAnalysis.CSharp.Syntax.ExpressionSyntax, Microsoft.CodeAnalysis.CSharp.BindingDiagnosticBag, Boolean, Boolean)
   at Microsoft.CodeAnalysis.CSharp.Binder.BindLambdaExpressionAsBlock(Microsoft.CodeAnalysis.CSharp.Syntax.ExpressionSyntax, Microsoft.CodeAnalysis.CSharp.BindingDiagnosticBag)
   at Microsoft.CodeAnalysis.CSharp.UnboundLambdaState.ReallyBind(Microsoft.CodeAnalysis.CSharp.Symbols.NamedTypeSymbol, Boolean)
   at Microsoft.CodeAnalysis.CSharp.UnboundLambdaState.Bind(Microsoft.CodeAnalysis.CSharp.Symbols.NamedTypeSymbol, Boolean)
   at Microsoft.CodeAnalysis.CSharp.ConversionsBase.IsAnonymousFunctionCompatibleWithDelegate(Microsoft.CodeAnalysis.CSharp.UnboundLambda, Microsoft.CodeAnalysis.CSharp.Symbols.TypeSymbol, Boolean)
   at Microsoft.CodeAnalysis.CSharp.ConversionsBase.IsAnonymousFunctionCompatibleWithType(Microsoft.CodeAnalysis.CSharp.UnboundLambda, Microsoft.CodeAnalysis.CSharp.Symbols.TypeSymbol)
   at Microsoft.CodeAnalysis.CSharp.ConversionsBase.HasAnonymousFunctionConversion(Microsoft.CodeAnalysis.CSharp.BoundExpression, Microsoft.CodeAnalysis.CSharp.Symbols.TypeSymbol)
   at Microsoft.CodeAnalysis.CSharp.ConversionsBase.ClassifyImplicitBuiltInConversionFromExpression(Microsoft.CodeAnalysis.CSharp.BoundExpression, Microsoft.CodeAnalysis.CSharp.Symbols.TypeSymbol, Microsoft.CodeAnalysis.CSharp.Symbols.TypeSymbol, Microsoft.CodeAnalysis.CompoundUseSiteInfo`1<Microsoft.CodeAnalysis.CSharp.Symbols.AssemblySymbol> ByRef)
   at Microsoft.CodeAnalysis.CSharp.ConversionsBase.ClassifyImplicitConversionFromExpression(Microsoft.CodeAnalysis.CSharp.BoundExpression, Microsoft.CodeAnalysis.CSharp.Symbols.TypeSymbol, Microsoft.CodeAnalysis.CompoundUseSiteInfo`1<Microsoft.CodeAnalysis.CSharp.Symbols.AssemblySymbol> ByRef)
   at Microsoft.CodeAnalysis.CSharp.OverloadResolution.CheckArgumentForApplicability(Microsoft.CodeAnalysis.CSharp.Symbol, Microsoft.CodeAnalysis.CSharp.BoundExpression, Microsoft.CodeAnalysis.RefKind, Microsoft.CodeAnalysis.CSharp.Symbols.TypeSymbol, Microsoft.CodeAnalysis.RefKind, Boolean, Microsoft.CodeAnalysis.CompoundUseSiteInfo`1<Microsoft.CodeAnalysis.CSharp.Symbols.AssemblySymbol> ByRef, Boolean, Boolean)
   at Microsoft.CodeAnalysis.CSharp.OverloadResolution.IsApplicable(Microsoft.CodeAnalysis.CSharp.Symbol, EffectiveParameters, Microsoft.CodeAnalysis.CSharp.AnalyzedArguments, System.Collections.Immutable.ImmutableArray`1<Int32>, Boolean, Boolean, Boolean, Boolean, Microsoft.CodeAnalysis.CompoundUseSiteInfo`1<Microsoft.CodeAnalysis.CSharp.Symbols.AssemblySymbol> ByRef)
   at Microsoft.CodeAnalysis.CSharp.OverloadResolution.IsApplicable[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]](System.__Canon, System.__Canon, Microsoft.CodeAnalysis.PooledObjects.ArrayBuilder`1<Microsoft.CodeAnalysis.CSharp.Symbols.TypeWithAnnotations>, Microsoft.CodeAnalysis.CSharp.AnalyzedArguments, EffectiveParameters, EffectiveParameters, System.Collections.Immutable.ImmutableArray`1<Int32>, Boolean, Boolean, Boolean, Microsoft.CodeAnalysis.CompoundUseSiteInfo`1<Microsoft.CodeAnalysis.CSharp.Symbols.AssemblySymbol> ByRef)
   at Microsoft.CodeAnalysis.CSharp.OverloadResolution.IsMemberApplicableInNormalForm[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]](System.__Canon, System.__Canon, Microsoft.CodeAnalysis.PooledObjects.ArrayBuilder`1<Microsoft.CodeAnalysis.CSharp.Symbols.TypeWithAnnotations>, Microsoft.CodeAnalysis.CSharp.AnalyzedArguments, Boolean, Boolean, Boolean, Boolean, Microsoft.CodeAnalysis.CompoundUseSiteInfo`1<Microsoft.CodeAnalysis.CSharp.Symbols.AssemblySymbol> ByRef)
   at Microsoft.CodeAnalysis.CSharp.OverloadResolution.AddMemberToCandidateSet[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]](System.__Canon, Microsoft.CodeAnalysis.PooledObjects.ArrayBuilder`1<Microsoft.CodeAnalysis.CSharp.MemberResolutionResult`1<System.__Canon>>, Microsoft.CodeAnalysis.PooledObjects.ArrayBuilder`1<System.__Canon>, Microsoft.CodeAnalysis.PooledObjects.ArrayBuilder`1<Microsoft.CodeAnalysis.CSharp.Symbols.TypeWithAnnotations>, Microsoft.CodeAnalysis.CSharp.BoundExpression, Microsoft.CodeAnalysis.CSharp.AnalyzedArguments, Boolean, Boolean, Boolean, System.Collections.Generic.Dictionary`2<Microsoft.CodeAnalysis.CSharp.Symbols.NamedTypeSymbol,Microsoft.CodeAnalysis.PooledObjects.ArrayBuilder`1<System.__Canon>>, Boolean, Microsoft.CodeAnalysis.CompoundUseSiteInfo`1<Microsoft.CodeAnalysis.CSharp.Symbols.AssemblySymbol> ByRef, Boolean)
   at Microsoft.CodeAnalysis.CSharp.OverloadResolution.PerformMemberOverloadResolution[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]](Microsoft.CodeAnalysis.PooledObjects.ArrayBuilder`1<Microsoft.CodeAnalysis.CSharp.MemberResolutionResult`1<System.__Canon>>, Microsoft.CodeAnalysis.PooledObjects.ArrayBuilder`1<System.__Canon>, Microsoft.CodeAnalysis.PooledObjects.ArrayBuilder`1<Microsoft.CodeAnalysis.CSharp.Symbols.TypeWithAnnotations>, Microsoft.CodeAnalysis.CSharp.BoundExpression, Microsoft.CodeAnalysis.CSharp.AnalyzedArguments, Boolean, Boolean, Microsoft.CodeAnalysis.RefKind, Microsoft.CodeAnalysis.CSharp.Symbols.TypeSymbol, Boolean, Boolean, Microsoft.CodeAnalysis.CSharp.CallingConventionInfo ByRef, Microsoft.CodeAnalysis.CompoundUseSiteInfo`1<Microsoft.CodeAnalysis.CSharp.Symbols.AssemblySymbol> ByRef, Boolean, Boolean)
   at Microsoft.CodeAnalysis.CSharp.Binder.BindExtensionMethod(Microsoft.CodeAnalysis.SyntaxNode, System.String, Microsoft.CodeAnalysis.CSharp.AnalyzedArguments, Microsoft.CodeAnalysis.CSharp.BoundExpression, System.Collections.Immutable.ImmutableArray`1<Microsoft.CodeAnalysis.CSharp.Symbols.TypeWithAnnotations>, Boolean, Microsoft.CodeAnalysis.RefKind, Microsoft.CodeAnalysis.CSharp.Symbols.TypeSymbol, Boolean)
   at Microsoft.CodeAnalysis.CSharp.Binder.ResolveMethodGroupInternal(Microsoft.CodeAnalysis.CSharp.BoundMethodGroup, Microsoft.CodeAnalysis.SyntaxNode, System.String, Microsoft.CodeAnalysis.CSharp.AnalyzedArguments, Boolean, Microsoft.CodeAnalysis.CompoundUseSiteInfo`1<Microsoft.CodeAnalysis.CSharp.Symbols.AssemblySymbol> ByRef, Boolean, Boolean, Microsoft.CodeAnalysis.RefKind, Microsoft.CodeAnalysis.CSharp.Symbols.TypeSymbol, Boolean, Microsoft.CodeAnalysis.CSharp.CallingConventionInfo ByRef)
   at Microsoft.CodeAnalysis.CSharp.Binder.ResolveMethodGroup(Microsoft.CodeAnalysis.CSharp.BoundMethodGroup, Microsoft.CodeAnalysis.SyntaxNode, System.String, Microsoft.CodeAnalysis.CSharp.AnalyzedArguments, Boolean, Microsoft.CodeAnalysis.CompoundUseSiteInfo`1<Microsoft.CodeAnalysis.CSharp.Symbols.AssemblySymbol> ByRef, Boolean, Boolean, Microsoft.CodeAnalysis.RefKind, Microsoft.CodeAnalysis.CSharp.Symbols.TypeSymbol, Boolean, Microsoft.CodeAnalysis.CSharp.CallingConventionInfo ByRef)
   at Microsoft.CodeAnalysis.CSharp.Binder.BindMethodGroupInvocation(Microsoft.CodeAnalysis.SyntaxNode, Microsoft.CodeAnalysis.SyntaxNode, System.String, Microsoft.CodeAnalysis.CSharp.BoundMethodGroup, Microsoft.CodeAnalysis.CSharp.AnalyzedArguments, Microsoft.CodeAnalysis.CSharp.BindingDiagnosticBag, Microsoft.CodeAnalysis.CSharp.CSharpSyntaxNode, Boolean, Boolean ByRef)
   at Microsoft.CodeAnalysis.CSharp.Binder.BindInvocationExpression(Microsoft.CodeAnalysis.SyntaxNode, Microsoft.CodeAnalysis.SyntaxNode, System.String, Microsoft.CodeAnalysis.CSharp.BoundExpression, Microsoft.CodeAnalysis.CSharp.AnalyzedArguments, Microsoft.CodeAnalysis.CSharp.BindingDiagnosticBag, Microsoft.CodeAnalysis.CSharp.CSharpSyntaxNode, Boolean)
   at Microsoft.CodeAnalysis.CSharp.Binder.BindInvocationExpression(Microsoft.CodeAnalysis.CSharp.Syntax.InvocationExpressionSyntax, Microsoft.CodeAnalysis.CSharp.BindingDiagnosticBag)
   at Microsoft.CodeAnalysis.CSharp.Binder.BindExpressionInternal(Microsoft.CodeAnalysis.CSharp.Syntax.ExpressionSyntax, Microsoft.CodeAnalysis.CSharp.BindingDiagnosticBag, Boolean, Boolean)
   at Microsoft.CodeAnalysis.CSharp.Binder.BindExpression(Microsoft.CodeAnalysis.CSharp.Syntax.ExpressionSyntax, Microsoft.CodeAnalysis.CSharp.BindingDiagnosticBag, Boolean, Boolean)
   at Microsoft.CodeAnalysis.CSharp.Binder.BindLambdaExpressionAsBlock(Microsoft.CodeAnalysis.CSharp.Syntax.ExpressionSyntax, Microsoft.CodeAnalysis.CSharp.BindingDiagnosticBag)
   at Microsoft.CodeAnalysis.CSharp.UnboundLambdaState.ReallyBind(Microsoft.CodeAnalysis.CSharp.Symbols.NamedTypeSymbol, Boolean)
   at Microsoft.CodeAnalysis.CSharp.UnboundLambdaState.Bind(Microsoft.CodeAnalysis.CSharp.Symbols.NamedTypeSymbol, Boolean)
   at Microsoft.CodeAnalysis.CSharp.ConversionsBase.IsAnonymousFunctionCompatibleWithDelegate(Microsoft.CodeAnalysis.CSharp.UnboundLambda, Microsoft.CodeAnalysis.CSharp.Symbols.TypeSymbol, Boolean)
   at Microsoft.CodeAnalysis.CSharp.ConversionsBase.IsAnonymousFunctionCompatibleWithType(Microsoft.CodeAnalysis.CSharp.UnboundLambda, Microsoft.CodeAnalysis.CSharp.Symbols.TypeSymbol)
   at Microsoft.CodeAnalysis.CSharp.ConversionsBase.HasAnonymousFunctionConversion(Microsoft.CodeAnalysis.CSharp.BoundExpression, Microsoft.CodeAnalysis.CSharp.Symbols.TypeSymbol)
   at Microsoft.CodeAnalysis.CSharp.ConversionsBase.ClassifyImplicitBuiltInConversionFromExpression(Microsoft.CodeAnalysis.CSharp.BoundExpression, Microsoft.CodeAnalysis.CSharp.Symbols.TypeSymbol, Microsoft.CodeAnalysis.CSharp.Symbols.TypeSymbol, Microsoft.CodeAnalysis.CompoundUseSiteInfo`1<Microsoft.CodeAnalysis.CSharp.Symbols.AssemblySymbol> ByRef)
   at Microsoft.CodeAnalysis.CSharp.ConversionsBase.ClassifyImplicitConversionFromExpression(Microsoft.CodeAnalysis.CSharp.BoundExpression, Microsoft.CodeAnalysis.CSharp.Symbols.TypeSymbol, Microsoft.CodeAnalysis.CompoundUseSiteInfo`1<Microsoft.CodeAnalysis.CSharp.Symbols.AssemblySymbol> ByRef)
   at Microsoft.CodeAnalysis.CSharp.OverloadResolution.CheckArgumentForApplicability(Microsoft.CodeAnalysis.CSharp.Symbol, Microsoft.CodeAnalysis.CSharp.BoundExpression, Microsoft.CodeAnalysis.RefKind, Microsoft.CodeAnalysis.CSharp.Symbols.TypeSymbol, Microsoft.CodeAnalysis.RefKind, Boolean, Microsoft.CodeAnalysis.CompoundUseSiteInfo`1<Microsoft.CodeAnalysis.CSharp.Symbols.AssemblySymbol> ByRef, Boolean, Boolean)
   at Microsoft.CodeAnalysis.CSharp.OverloadResolution.IsApplicable(Microsoft.CodeAnalysis.CSharp.Symbol, EffectiveParameters, Microsoft.CodeAnalysis.CSharp.AnalyzedArguments, System.Collections.Immutable.ImmutableArray`1<Int32>, Boolean, Boolean, Boolean, Boolean, Microsoft.CodeAnalysis.CompoundUseSiteInfo`1<Microsoft.CodeAnalysis.CSharp.Symbols.AssemblySymbol> ByRef)
   at Microsoft.CodeAnalysis.CSharp.OverloadResolution.IsApplicable[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]](System.__Canon, System.__Canon, Microsoft.CodeAnalysis.PooledObjects.ArrayBuilder`1<Microsoft.CodeAnalysis.CSharp.Symbols.TypeWithAnnotations>, Microsoft.CodeAnalysis.CSharp.AnalyzedArguments, EffectiveParameters, EffectiveParameters, System.Collections.Immutable.ImmutableArray`1<Int32>, Boolean, Boolean, Boolean, Microsoft.CodeAnalysis.CompoundUseSiteInfo`1<Microsoft.CodeAnalysis.CSharp.Symbols.AssemblySymbol> ByRef)
   at Microsoft.CodeAnalysis.CSharp.OverloadResolution.IsMemberApplicableInNormalForm[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]](System.__Canon, System.__Canon, Microsoft.CodeAnalysis.PooledObjects.ArrayBuilder`1<Microsoft.CodeAnalysis.CSharp.Symbols.TypeWithAnnotations>, Microsoft.CodeAnalysis.CSharp.AnalyzedArguments, Boolean, Boolean, Boolean, Boolean, Microsoft.CodeAnalysis.CompoundUseSiteInfo`1<Microsoft.CodeAnalysis.CSharp.Symbols.AssemblySymbol> ByRef)
   at Microsoft.CodeAnalysis.CSharp.OverloadResolution.AddMemberToCandidateSet[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]](System.__Canon, Microsoft.CodeAnalysis.PooledObjects.ArrayBuilder`1<Microsoft.CodeAnalysis.CSharp.MemberResolutionResult`1<System.__Canon>>, Microsoft.CodeAnalysis.PooledObjects.ArrayBuilder`1<System.__Canon>, Microsoft.CodeAnalysis.PooledObjects.ArrayBuilder`1<Microsoft.CodeAnalysis.CSharp.Symbols.TypeWithAnnotations>, Microsoft.CodeAnalysis.CSharp.BoundExpression, Microsoft.CodeAnalysis.CSharp.AnalyzedArguments, Boolean, Boolean, Boolean, System.Collections.Generic.Dictionary`2<Microsoft.CodeAnalysis.CSharp.Symbols.NamedTypeSymbol,Microsoft.CodeAnalysis.PooledObjects.ArrayBuilder`1<System.__Canon>>, Boolean, Microsoft.CodeAnalysis.CompoundUseSiteInfo`1<Microsoft.CodeAnalysis.CSharp.Symbols.AssemblySymbol> ByRef, Boolean)
   at Microsoft.CodeAnalysis.CSharp.OverloadResolution.PerformMemberOverloadResolution[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]](Microsoft.CodeAnalysis.PooledObjects.ArrayBuilder`1<Microsoft.CodeAnalysis.CSharp.MemberResolutionResult`1<System.__Canon>>, Microsoft.CodeAnalysis.PooledObjects.ArrayBuilder`1<System.__Canon>, Microsoft.CodeAnalysis.PooledObjects.ArrayBuilder`1<Microsoft.CodeAnalysis.CSharp.Symbols.TypeWithAnnotations>, Microsoft.CodeAnalysis.CSharp.BoundExpression, Microsoft.CodeAnalysis.CSharp.AnalyzedArguments, Boolean, Boolean, Microsoft.CodeAnalysis.RefKind, Microsoft.CodeAnalysis.CSharp.Symbols.TypeSymbol, Boolean, Boolean, Microsoft.CodeAnalysis.CSharp.CallingConventionInfo ByRef, Microsoft.CodeAnalysis.CompoundUseSiteInfo`1<Microsoft.CodeAnalysis.CSharp.Symbols.AssemblySymbol> ByRef, Boolean, Boolean)
   at Microsoft.CodeAnalysis.CSharp.Binder.BindExtensionMethod(Microsoft.CodeAnalysis.SyntaxNode, System.String, Microsoft.CodeAnalysis.CSharp.AnalyzedArguments, Microsoft.CodeAnalysis.CSharp.BoundExpression, System.Collections.Immutable.ImmutableArray`1<Microsoft.CodeAnalysis.CSharp.Symbols.TypeWithAnnotations>, Boolean, Microsoft.CodeAnalysis.RefKind, Microsoft.CodeAnalysis.CSharp.Symbols.TypeSymbol, Boolean)
   at Microsoft.CodeAnalysis.CSharp.Binder.ResolveMethodGroupInternal(Microsoft.CodeAnalysis.CSharp.BoundMethodGroup, Microsoft.CodeAnalysis.SyntaxNode, System.String, Microsoft.CodeAnalysis.CSharp.AnalyzedArguments, Boolean, Microsoft.CodeAnalysis.CompoundUseSiteInfo`1<Microsoft.CodeAnalysis.CSharp.Symbols.AssemblySymbol> ByRef, Boolean, Boolean, Microsoft.CodeAnalysis.RefKind, Microsoft.CodeAnalysis.CSharp.Symbols.TypeSymbol, Boolean, Microsoft.CodeAnalysis.CSharp.CallingConventionInfo ByRef)
   at Microsoft.CodeAnalysis.CSharp.Binder.ResolveMethodGroup(Microsoft.CodeAnalysis.CSharp.BoundMethodGroup, Microsoft.CodeAnalysis.SyntaxNode, System.String, Microsoft.CodeAnalysis.CSharp.AnalyzedArguments, Boolean, Microsoft.CodeAnalysis.CompoundUseSiteInfo`1<Microsoft.CodeAnalysis.CSharp.Symbols.AssemblySymbol> ByRef, Boolean, Boolean, Microsoft.CodeAnalysis.RefKind, Microsoft.CodeAnalysis.CSharp.Symbols.TypeSymbol, Boolean, Microsoft.CodeAnalysis.CSharp.CallingConventionInfo ByRef)
   at Microsoft.CodeAnalysis.CSharp.Binder.BindMethodGroupInvocation(Microsoft.CodeAnalysis.SyntaxNode, Microsoft.CodeAnalysis.SyntaxNode, System.String, Microsoft.CodeAnalysis.CSharp.BoundMethodGroup, Microsoft.CodeAnalysis.CSharp.AnalyzedArguments, Microsoft.CodeAnalysis.CSharp.BindingDiagnosticBag, Microsoft.CodeAnalysis.CSharp.CSharpSyntaxNode, Boolean, Boolean ByRef)
   at Microsoft.CodeAnalysis.CSharp.Binder.BindInvocationExpression(Microsoft.CodeAnalysis.SyntaxNode, Microsoft.CodeAnalysis.SyntaxNode, System.String, Microsoft.CodeAnalysis.CSharp.BoundExpression, Microsoft.CodeAnalysis.CSharp.AnalyzedArguments, Microsoft.CodeAnalysis.CSharp.BindingDiagnosticBag, Microsoft.CodeAnalysis.CSharp.CSharpSyntaxNode, Boolean)
   at Microsoft.CodeAnalysis.CSharp.Binder.BindInvocationExpression(Microsoft.CodeAnalysis.CSharp.Syntax.InvocationExpressionSyntax, Microsoft.CodeAnalysis.CSharp.BindingDiagnosticBag)
   at Microsoft.CodeAnalysis.CSharp.Binder.BindExpressionInternal(Microsoft.CodeAnalysis.CSharp.Syntax.ExpressionSyntax, Microsoft.CodeAnalysis.CSharp.BindingDiagnosticBag, Boolean, Boolean)
   at Microsoft.CodeAnalysis.CSharp.Binder.BindExpression(Microsoft.CodeAnalysis.CSharp.Syntax.ExpressionSyntax, Microsoft.CodeAnalysis.CSharp.BindingDiagnosticBag, Boolean, Boolean)
   at Microsoft.CodeAnalysis.CSharp.Binder.BindCast(Microsoft.CodeAnalysis.CSharp.Syntax.CastExpressionSyntax, Microsoft.CodeAnalysis.CSharp.BindingDiagnosticBag)
   at Microsoft.CodeAnalysis.CSharp.Binder.BindExpressionInternal(Microsoft.CodeAnalysis.CSharp.Syntax.ExpressionSyntax, Microsoft.CodeAnalysis.CSharp.BindingDiagnosticBag, Boolean, Boolean)
   at Microsoft.CodeAnalysis.CSharp.Binder.BindExpression(Microsoft.CodeAnalysis.CSharp.Syntax.ExpressionSyntax, Microsoft.CodeAnalysis.CSharp.BindingDiagnosticBag, Boolean, Boolean)
   at Microsoft.CodeAnalysis.CSharp.Binder.BindAnonymousObjectCreation(Microsoft.CodeAnalysis.CSharp.Syntax.AnonymousObjectCreationExpressionSyntax, Microsoft.CodeAnalysis.CSharp.BindingDiagnosticBag)
   at Microsoft.CodeAnalysis.CSharp.Binder.BindExpressionInternal(Microsoft.CodeAnalysis.CSharp.Syntax.ExpressionSyntax, Microsoft.CodeAnalysis.CSharp.BindingDiagnosticBag, Boolean, Boolean)
   at Microsoft.CodeAnalysis.CSharp.Binder.BindExpression(Microsoft.CodeAnalysis.CSharp.Syntax.ExpressionSyntax, Microsoft.CodeAnalysis.CSharp.BindingDiagnosticBag, Boolean, Boolean)
   at Microsoft.CodeAnalysis.CSharp.Binder.BindLambdaExpressionAsBlock(Microsoft.CodeAnalysis.CSharp.Syntax.ExpressionSyntax, Microsoft.CodeAnalysis.CSharp.BindingDiagnosticBag)
   at Microsoft.CodeAnalysis.CSharp.UnboundLambdaState.ReallyBind(Microsoft.CodeAnalysis.CSharp.Symbols.NamedTypeSymbol, Boolean)
   at Microsoft.CodeAnalysis.CSharp.UnboundLambdaState.Bind(Microsoft.CodeAnalysis.CSharp.Symbols.NamedTypeSymbol, Boolean)
   at Microsoft.CodeAnalysis.CSharp.Binder.CreateAnonymousFunctionConversion(Microsoft.CodeAnalysis.SyntaxNode, Microsoft.CodeAnalysis.CSharp.BoundExpression, Microsoft.CodeAnalysis.CSharp.Conversion, Boolean, Microsoft.CodeAnalysis.CSharp.ConversionGroup, Microsoft.CodeAnalysis.CSharp.Symbols.TypeSymbol, Microsoft.CodeAnalysis.CSharp.BindingDiagnosticBag)
   at Microsoft.CodeAnalysis.CSharp.Binder.<CreateConversion>g__createConversion|229_0(Microsoft.CodeAnalysis.SyntaxNode, Microsoft.CodeAnalysis.CSharp.BoundExpression, Microsoft.CodeAnalysis.CSharp.Conversion, Boolean, Microsoft.CodeAnalysis.CSharp.ConversionGroup, Boolean, Microsoft.CodeAnalysis.CSharp.Symbols.TypeSymbol, Microsoft.CodeAnalysis.CSharp.BindingDiagnosticBag, Boolean)
   at Microsoft.CodeAnalysis.CSharp.Binder.CoerceArguments[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]](Microsoft.CodeAnalysis.CSharp.MemberResolutionResult`1<System.__Canon>, Microsoft.CodeAnalysis.PooledObjects.ArrayBuilder`1<Microsoft.CodeAnalysis.CSharp.BoundExpression>, Microsoft.CodeAnalysis.CSharp.BindingDiagnosticBag, Microsoft.CodeAnalysis.CSharp.BoundExpression)
   at Microsoft.CodeAnalysis.CSharp.Binder.BindInvocationExpressionContinued(Microsoft.CodeAnalysis.SyntaxNode, Microsoft.CodeAnalysis.SyntaxNode, System.String, Microsoft.CodeAnalysis.CSharp.OverloadResolutionResult`1<Microsoft.CodeAnalysis.CSharp.Symbols.MethodSymbol>, Microsoft.CodeAnalysis.CSharp.AnalyzedArguments, Microsoft.CodeAnalysis.CSharp.MethodGroup, Microsoft.CodeAnalysis.CSharp.Symbols.NamedTypeSymbol, Microsoft.CodeAnalysis.CSharp.BindingDiagnosticBag, Microsoft.CodeAnalysis.CSharp.CSharpSyntaxNode)
   at Microsoft.CodeAnalysis.CSharp.Binder.BindMethodGroupInvocation(Microsoft.CodeAnalysis.SyntaxNode, Microsoft.CodeAnalysis.SyntaxNode, System.String, Microsoft.CodeAnalysis.CSharp.BoundMethodGroup, Microsoft.CodeAnalysis.CSharp.AnalyzedArguments, Microsoft.CodeAnalysis.CSharp.BindingDiagnosticBag, Microsoft.CodeAnalysis.CSharp.CSharpSyntaxNode, Boolean, Boolean ByRef)
   at Microsoft.CodeAnalysis.CSharp.Binder.BindInvocationExpression(Microsoft.CodeAnalysis.SyntaxNode, Microsoft.CodeAnalysis.SyntaxNode, System.String, Microsoft.CodeAnalysis.CSharp.BoundExpression, Microsoft.CodeAnalysis.CSharp.AnalyzedArguments, Microsoft.CodeAnalysis.CSharp.BindingDiagnosticBag, Microsoft.CodeAnalysis.CSharp.CSharpSyntaxNode, Boolean)
   at Microsoft.CodeAnalysis.CSharp.Binder.BindInvocationExpression(Microsoft.CodeAnalysis.CSharp.Syntax.InvocationExpressionSyntax, Microsoft.CodeAnalysis.CSharp.BindingDiagnosticBag)
   at Microsoft.CodeAnalysis.CSharp.Binder.BindExpressionInternal(Microsoft.CodeAnalysis.CSharp.Syntax.ExpressionSyntax, Microsoft.CodeAnalysis.CSharp.BindingDiagnosticBag, Boolean, Boolean)
   at Microsoft.CodeAnalysis.CSharp.Binder.BindExpression(Microsoft.CodeAnalysis.CSharp.Syntax.ExpressionSyntax, Microsoft.CodeAnalysis.CSharp.BindingDiagnosticBag, Boolean, Boolean)
   at Microsoft.CodeAnalysis.CSharp.Binder.BindMemberAccess(Microsoft.CodeAnalysis.CSharp.Syntax.MemberAccessExpressionSyntax, Boolean, Boolean, Microsoft.CodeAnalysis.CSharp.BindingDiagnosticBag)
   at Microsoft.CodeAnalysis.CSharp.Binder.BindInvocationExpression(Microsoft.CodeAnalysis.CSharp.Syntax.InvocationExpressionSyntax, Microsoft.CodeAnalysis.CSharp.BindingDiagnosticBag)
   at Microsoft.CodeAnalysis.CSharp.Binder.BindExpressionInternal(Microsoft.CodeAnalysis.CSharp.Syntax.ExpressionSyntax, Microsoft.CodeAnalysis.CSharp.BindingDiagnosticBag, Boolean, Boolean)
   at Microsoft.CodeAnalysis.CSharp.Binder.BindExpression(Microsoft.CodeAnalysis.CSharp.Syntax.ExpressionSyntax, Microsoft.CodeAnalysis.CSharp.BindingDiagnosticBag, Boolean, Boolean)
   at Microsoft.CodeAnalysis.CSharp.Binder.BindMemberAccess(Microsoft.CodeAnalysis.CSharp.Syntax.MemberAccessExpressionSyntax, Boolean, Boolean, Microsoft.CodeAnalysis.CSharp.BindingDiagnosticBag)
   at Microsoft.CodeAnalysis.CSharp.Binder.BindInvocationExpression(Microsoft.CodeAnalysis.CSharp.Syntax.InvocationExpressionSyntax, Microsoft.CodeAnalysis.CSharp.BindingDiagnosticBag)
   at Microsoft.CodeAnalysis.CSharp.Binder.BindExpressionInternal(Microsoft.CodeAnalysis.CSharp.Syntax.ExpressionSyntax, Microsoft.CodeAnalysis.CSharp.BindingDiagnosticBag, Boolean, Boolean)
   at Microsoft.CodeAnalysis.CSharp.Binder.BindExpression(Microsoft.CodeAnalysis.CSharp.Syntax.ExpressionSyntax, Microsoft.CodeAnalysis.CSharp.BindingDiagnosticBag, Boolean, Boolean)
   at Microsoft.CodeAnalysis.CSharp.Binder.BindMemberAccess(Microsoft.CodeAnalysis.CSharp.Syntax.MemberAccessExpressionSyntax, Boolean, Boolean, Microsoft.CodeAnalysis.CSharp.BindingDiagnosticBag)
   at Microsoft.CodeAnalysis.CSharp.Binder.BindInvocationExpression(Microsoft.CodeAnalysis.CSharp.Syntax.InvocationExpressionSyntax, Microsoft.CodeAnalysis.CSharp.BindingDiagnosticBag)
   at Microsoft.CodeAnalysis.CSharp.Binder.BindExpressionInternal(Microsoft.CodeAnalysis.CSharp.Syntax.ExpressionSyntax, Microsoft.CodeAnalysis.CSharp.BindingDiagnosticBag, Boolean, Boolean)
   at Microsoft.CodeAnalysis.CSharp.Binder.BindExpression(Microsoft.CodeAnalysis.CSharp.Syntax.ExpressionSyntax, Microsoft.CodeAnalysis.CSharp.BindingDiagnosticBag, Boolean, Boolean)
   at Microsoft.CodeAnalysis.CSharp.Binder.BindMemberAccess(Microsoft.CodeAnalysis.CSharp.Syntax.MemberAccessExpressionSyntax, Boolean, Boolean, Microsoft.CodeAnalysis.CSharp.BindingDiagnosticBag)
   at Microsoft.CodeAnalysis.CSharp.Binder.BindExpressionInternal(Microsoft.CodeAnalysis.CSharp.Syntax.ExpressionSyntax, Microsoft.CodeAnalysis.CSharp.BindingDiagnosticBag, Boolean, Boolean)
   at Microsoft.CodeAnalysis.CSharp.Binder.BindExpression(Microsoft.CodeAnalysis.CSharp.Syntax.ExpressionSyntax, Microsoft.CodeAnalysis.CSharp.BindingDiagnosticBag, Boolean, Boolean)
   at Microsoft.CodeAnalysis.CSharp.Binder.BindNamespaceOrTypeOrExpression(Microsoft.CodeAnalysis.CSharp.Syntax.ExpressionSyntax, Microsoft.CodeAnalysis.CSharp.BindingDiagnosticBag)
   at Microsoft.CodeAnalysis.CSharp.MemberSemanticModel.GetBoundNodes(Microsoft.CodeAnalysis.CSharp.CSharpSyntaxNode)
   at Microsoft.CodeAnalysis.CSharp.MemberSemanticModel.GetBoundNodes(Microsoft.CodeAnalysis.CSharp.CSharpSyntaxNode, Microsoft.CodeAnalysis.CSharp.CSharpSyntaxNode ByRef, Microsoft.CodeAnalysis.CSharp.BoundNode ByRef, Microsoft.CodeAnalysis.CSharp.BoundNode ByRef, Microsoft.CodeAnalysis.CSharp.BoundNode ByRef)
   at Microsoft.CodeAnalysis.CSharp.MemberSemanticModel.GetSymbolInfoWorker(Microsoft.CodeAnalysis.CSharp.CSharpSyntaxNode, SymbolInfoOptions, System.Threading.CancellationToken)
   at Microsoft.CodeAnalysis.CSharp.CSharpSemanticModel.GetSymbolInfo(Microsoft.CodeAnalysis.CSharp.Syntax.ExpressionSyntax, System.Threading.CancellationToken)
   at Microsoft.CodeAnalysis.CSharp.CSharpSemanticModel.GetSymbolInfoFromNode(Microsoft.CodeAnalysis.SyntaxNode, System.Threading.CancellationToken)
   at Microsoft.CodeAnalysis.CSharp.CSharpSemanticModel.GetSymbolInfoCore(Microsoft.CodeAnalysis.SyntaxNode, System.Threading.CancellationToken)
   at Microsoft.CodeAnalysis.CSharp.Simplification.Simplifiers.CastSimplifier.IntroducedAmbiguity(Microsoft.CodeAnalysis.CSharp.Syntax.ExpressionSyntax, Microsoft.CodeAnalysis.CSharp.Syntax.ExpressionSyntax, Microsoft.CodeAnalysis.SemanticModel, Microsoft.CodeAnalysis.SemanticModel, System.Threading.CancellationToken)
   at Microsoft.CodeAnalysis.CSharp.Simplification.Simplifiers.CastSimplifier.GetSemanticModelWithCastRemoved(Microsoft.CodeAnalysis.CSharp.Syntax.ExpressionSyntax, Microsoft.CodeAnalysis.CSharp.Syntax.ExpressionSyntax, Microsoft.CodeAnalysis.SemanticModel, System.Threading.CancellationToken)
   at Microsoft.CodeAnalysis.CSharp.Simplification.Simplifiers.CastSimplifier.IsConversionCastSafeToRemove(Microsoft.CodeAnalysis.CSharp.Syntax.ExpressionSyntax, Microsoft.CodeAnalysis.CSharp.Syntax.ExpressionSyntax, Microsoft.CodeAnalysis.SemanticModel, Microsoft.CodeAnalysis.Operations.IConversionOperation, System.Threading.CancellationToken)
   at Microsoft.CodeAnalysis.CSharp.Simplification.Simplifiers.CastSimplifier.IsCastSafeToRemove(Microsoft.CodeAnalysis.CSharp.Syntax.ExpressionSyntax, Microsoft.CodeAnalysis.CSharp.Syntax.ExpressionSyntax, Microsoft.CodeAnalysis.SemanticModel, System.Threading.CancellationToken)
   at Microsoft.CodeAnalysis.CSharp.Simplification.Simplifiers.CastSimplifier.IsUnnecessaryCast(Microsoft.CodeAnalysis.CSharp.Syntax.CastExpressionSyntax, Microsoft.CodeAnalysis.SemanticModel, System.Threading.CancellationToken)
   at Microsoft.CodeAnalysis.CSharp.Simplification.Simplifiers.CastSimplifier.IsUnnecessaryCast(Microsoft.CodeAnalysis.CSharp.Syntax.ExpressionSyntax, Microsoft.CodeAnalysis.SemanticModel, System.Threading.CancellationToken)
   at Microsoft.CodeAnalysis.CSharp.RemoveUnnecessaryCast.CSharpRemoveUnnecessaryCastDiagnosticAnalyzer.IsUnnecessaryCast(Microsoft.CodeAnalysis.SemanticModel, Microsoft.CodeAnalysis.CSharp.Syntax.ExpressionSyntax, System.Threading.CancellationToken)
   at Microsoft.CodeAnalysis.RemoveUnnecessaryCast.AbstractRemoveUnnecessaryCastDiagnosticAnalyzer`2[[Microsoft.CodeAnalysis.CSharp.SyntaxKind, Microsoft.CodeAnalysis.CSharp, Version=4.2.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35],[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].TryRemoveCastExpression(Microsoft.CodeAnalysis.SemanticModel, System.__Canon, System.Threading.CancellationToken)
   at Microsoft.CodeAnalysis.RemoveUnnecessaryCast.AbstractRemoveUnnecessaryCastDiagnosticAnalyzer`2[[Microsoft.CodeAnalysis.CSharp.SyntaxKind, Microsoft.CodeAnalysis.CSharp, Version=4.2.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35],[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].AnalyzeSyntax(Microsoft.CodeAnalysis.Diagnostics.SyntaxNodeAnalysisContext)
   at Microsoft.CodeAnalysis.Diagnostics.AnalyzerExecutor+<>c__62`1[[Microsoft.CodeAnalysis.CSharp.SyntaxKind, Microsoft.CodeAnalysis.CSharp, Version=4.2.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]].<ExecuteSyntaxNodeAction>b__62_0(System.ValueTuple`2<System.Action`1<Microsoft.CodeAnalysis.Diagnostics.SyntaxNodeAnalysisContext>,Microsoft.CodeAnalysis.Diagnostics.SyntaxNodeAnalysisContext>)
trontronicent commented 2 years ago

I experience the exact same behaviour quite frequently since the last VS stable update, also having the same AccessViolation as source.

Happend actually always , when i have VS open for longer periods. Had similar issues before already, but in this version occuring quite more frequently.

DrLeh commented 2 years ago

Updated to vs2022 17.2.5 yesterday, still happening.

sharwell commented 2 years ago

@DrLeh Can you follow the steps described here to capture a heap dump during the next crash? The heap dump can then be compressed (.zip or .7z) and attached to a report using the Report a Problem feature of Visual Studio. Thanks!

https://docs.microsoft.com/en-us/visualstudio/ide/how-to-increase-chances-of-performance-issue-being-fixed?view=vs-2019#crashes

DrLeh commented 2 years ago

@sharwell as i mention in the OP, the "Report a Problem" button doesn't do anything for me. Nothing is opened in my browser when I click the button.

sharwell commented 2 years ago

@sharwell as i mention in the OP, the "Report a Problem" button doesn't do anything for me. Nothing is opened in my browser when I click the button.

You can attach the files in a comment on this issue: https://developercommunity.visualstudio.com/t/AccessViolationException-in-BinderLooku/10081741

DrLeh commented 1 year ago

Ok i was finally able to get the report a problem feature to work. I submitted a new ticket as it's still happening in the latest preview https://developercommunity.visualstudio.com/t/Feature-x-is-currently-unavailable-due/10189905?scope=follow

I'm going to try to get some crash dumps to attach to this new ticket

jasonmalinowski commented 1 year ago

Reopening this since conversation is happening here along with the public ticket.

Serexx commented 1 year ago

In case it helps -with regard to the first error message in the above OP:

this https://github.com/dotnet/roslyn/issues/49544 was closed because it was a duplicate of this https://github.com/dotnet/roslyn/issues/49005, which in turns appears to have been flagged as "resolved" by simply producing the polite error message noted above. The error was solved by telling us that we have an error and handing us a stack trace.

Here's mine: It may be worth noting that I'm not aware of any json being explicitly handled by the MVC 5 controllers that seem to produce the error.

StreamJsonRpc.RemoteInvocationException: Cannot enqueue data after PromiseNotToEnqueue. at StreamJsonRpc.JsonRpc.d1431.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.CodeAnalysis.Remote.BrokeredServiceConnection1.d161.MoveNext() RPC server exception: System.InvalidOperationException: Cannot enqueue data after PromiseNotToEnqueue. at Microsoft.CodeAnalysis.Diagnostics.AsyncQueue1.EnqueueCore(TElement value) at Microsoft.CodeAnalysis.CSharp.MethodCompiler.CompileMethod(MethodSymbol methodSymbol, Int32 methodOrdinal, ProcessedFieldInitializers& processedInitializers, SynthesizedSubmissionFields previousSubmissionFields, TypeCompilationState compilationState) at Microsoft.CodeAnalysis.CSharp.MethodCompiler.CompileNamedType(NamedTypeSymbol containingType) at Microsoft.CodeAnalysis.CSharp.MethodCompiler.<>cDisplayClass25_0.b0() at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state) --- End of stack trace from previous location --- at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread) --- End of stack trace from previous location --- at Microsoft.CodeAnalysis.CSharp.MethodCompiler.WaitForWorkers() at Microsoft.CodeAnalysis.CSharp.MethodCompiler.CompileMethodBodies(CSharpCompilation compilation, PEModuleBuilder moduleBeingBuiltOpt, Boolean emittingPdb, Boolean emitTestCoverageData, Boolean hasDeclarationErrors, Boolean emitMethodBodies, BindingDiagnosticBag diagnostics, Predicate`1 filterOpt, CancellationToken cancellationToken) at Microsoft.CodeAnalysis.CSharp.CSharpCompilation.gcompileMethodBodiesAndDocComments|216_0(SyntaxTree filterTree, Nullable1 filterSpan, BindingDiagnosticBag bindingDiagnostics, CancellationToken cancellationToken) at Microsoft.CodeAnalysis.CSharp.CSharpCompilation.GetDiagnosticsForMethodBodiesInTree(SyntaxTree tree, Nullable1 span, CancellationToken cancellationToken) at Microsoft.CodeAnalysis.CSharp.CSharpCompilation.GetDiagnosticsForSyntaxTree(CompilationStage stage, SyntaxTree syntaxTree, Nullable1 filterSpanWithinTree, Boolean includeEarlierStages, CancellationToken cancellationToken) at Microsoft.CodeAnalysis.CSharp.SyntaxTreeSemanticModel.GetDiagnostics(Nullable1 span, CancellationToken cancellationToken) at Microsoft.CodeAnalysis.Diagnostics.CompilationWithAnalyzers.GenerateCompilationEvents(AnalysisScope analysisScope, CancellationToken cancellationToken) at Microsoft.CodeAnalysis.Diagnostics.CompilationWithAnalyzers.ComputeAnalyzerDiagnosticsAsync(AnalysisScope analysisScope, Func1 getPendingEventsOpt, Int32 newTaskToken, CancellationToken cancellationToken) at Microsoft.CodeAnalysis.Diagnostics.CompilationWithAnalyzers.ComputeAnalyzerSemanticDiagnosticsAsync(SemanticModel model, AnalysisScope analysisScope, CancellationToken cancellationToken, Boolean forceCompletePartialTrees) at Microsoft.CodeAnalysis.Diagnostics.CompilationWithAnalyzers.GetAnalysisResultCoreAsync(SemanticModel model, Nullable1 filterSpan, ImmutableArray1 analyzers, CancellationToken cancellationToken) at Microsoft.CodeAnalysis.Diagnostics.Extensions.GetAnalysisResultAsync(CompilationWithAnalyzers compilationWithAnalyzers, DocumentAnalysisScope documentAnalysisScope, CancellationToken cancellationToken) at Microsoft.CodeAnalysis.Diagnostics.Extensions.GetAnalysisResultAsync(CompilationWithAnalyzers compilationWithAnalyzers, DocumentAnalysisScope documentAnalysisScope, Project project, DiagnosticAnalyzerInfoCache analyzerInfoCache, CancellationToken cancellationToken) at Microsoft.CodeAnalysis.Remote.Diagnostics.DiagnosticComputer.AnalyzeAsync(CompilationWithAnalyzers compilationWithAnalyzers, BidirectionalMap2 analyzerToIdMap, ImmutableArray1 analyzers, SkippedHostAnalyzersInfo skippedAnalyzersInfo, Boolean reportSuppressedDiagnostics, Boolean logPerformanceInfo, Boolean getTelemetryInfo, CancellationToken cancellationToken) at Microsoft.CodeAnalysis.Remote.Diagnostics.DiagnosticComputer.GetDiagnosticsAsync(IEnumerable1 analyzerIds, Boolean reportSuppressedDiagnostics, Boolean logPerformanceInfo, Boolean getTelemetryInfo, CancellationToken cancellationToken) at Microsoft.CodeAnalysis.Remote.RemoteDiagnosticAnalyzerService.<>cDisplayClass4_0.<b0>d.MoveNext() --- End of stack trace from previous location --- at Microsoft.CodeAnalysis.Remote.RemoteWorkspace.<>cDisplayClass7_01.<<RunWithSolutionAsync>g__ProcessSolutionAsync|1>d.MoveNext() --- End of stack trace from previous location --- at Microsoft.CodeAnalysis.Remote.RemoteWorkspace.RunWithSolutionAsync[T](AssetProvider assetProvider, Checksum solutionChecksum, Int32 workspaceVersion, Boolean updatePrimaryBranch, Func2 implementation, CancellationToken cancellationToken) at Microsoft.CodeAnalysis.Remote.RemoteWorkspace.RunWithSolutionAsync[T](AssetProvider assetProvider, Checksum solutionChecksum, Int32 workspaceVersion, Boolean updatePrimaryBranch, Func2 implementation, CancellationToken cancellationToken) at Microsoft.CodeAnalysis.Remote.BrokeredServiceBase.RunWithSolutionAsync[T](Checksum solutionChecksum, Func2 implementation, CancellationToken cancellationToken) at Microsoft.CodeAnalysis.Remote.RemoteDiagnosticAnalyzerService.CalculateDiagnosticsAsync(Checksum solutionChecksum, DiagnosticArguments arguments, CancellationToken cancellationToken)

dliedke commented 1 year ago

This is happening for me with Visual Studio Enterprise 2022 17.4.1. I removed all VS.NET application and reinstalled but no luck. This issue was not happening before VS.NET 17.4 release. But even with the rollback I could not make it work anymore. Please advise, also VS.NET is hanging after some time and code is lost.

sercey commented 1 year ago

This is happening for me with Visual Studio Enterprise 2022 17.4.1. I removed all VS.NET application and reinstalled but no luck. This issue was not happening before VS.NET 17.4 release. But even with the rollback I could not make it work anymore. Please advise, also VS.NET is hanging after some time and code is lost.

Same here (VS 2022 17.4.1). After open any ASP.Net MVC5 project, and a razor file, it always throws this in a couple of minutes. I try to repair VS2022 but no luck. I have a 17.1 community at another machine, that one has no issues at all.

Update: I uninstall 17.4.1 and install 17.2.10 LTSC. It works fine for now.

StreamJsonRpc.RemoteInvocationException: Cannot enqueue data after PromiseNotToEnqueue.
   at StreamJsonRpc.JsonRpc.<InvokeCoreAsync>d__143`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.CodeAnalysis.Remote.BrokeredServiceConnection`1.<TryInvokeAsync>d__16`1.MoveNext()
RPC server exception:
System.InvalidOperationException: Cannot enqueue data after PromiseNotToEnqueue.
      at Microsoft.CodeAnalysis.Diagnostics.AsyncQueue`1.EnqueueCore(TElement value)
      at Microsoft.CodeAnalysis.CSharp.MethodCompiler.CompileMethod(MethodSymbol methodSymbol, Int32 methodOrdinal, ProcessedFieldInitializers& processedInitializers, SynthesizedSubmissionFields previousSubmissionFields, TypeCompilationState compilationState)
      at Microsoft.CodeAnalysis.CSharp.MethodCompiler.CompileNamedType(NamedTypeSymbol containingType)
      at Microsoft.CodeAnalysis.CSharp.MethodCompiler.<>c__DisplayClass25_0.<CompileNamedTypeAsync>b__0()
      at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
   --- End of stack trace from previous location ---
      at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread)
   --- End of stack trace from previous location ---
      at Microsoft.CodeAnalysis.CSharp.MethodCompiler.WaitForWorkers()
      at Microsoft.CodeAnalysis.CSharp.MethodCompiler.CompileMethodBodies(CSharpCompilation compilation, PEModuleBuilder moduleBeingBuiltOpt, Boolean emittingPdb, Boolean emitTestCoverageData, Boolean hasDeclarationErrors, Boolean emitMethodBodies, BindingDiagnosticBag diagnostics, Predicate`1 filterOpt, CancellationToken cancellationToken)
      at Microsoft.CodeAnalysis.CSharp.CSharpCompilation.<GetDiagnosticsForMethodBodiesInTree>g__compileMethodBodiesAndDocComments|216_0(SyntaxTree filterTree, Nullable`1 filterSpan, BindingDiagnosticBag bindingDiagnostics, CancellationToken cancellationToken)
      at Microsoft.CodeAnalysis.CSharp.CSharpCompilation.GetDiagnosticsForMethodBodiesInTree(SyntaxTree tree, Nullable`1 span, CancellationToken cancellationToken)
      at Microsoft.CodeAnalysis.CSharp.CSharpCompilation.GetDiagnosticsForSyntaxTree(CompilationStage stage, SyntaxTree syntaxTree, Nullable`1 filterSpanWithinTree, Boolean includeEarlierStages, CancellationToken cancellationToken)
      at Microsoft.CodeAnalysis.CSharp.SyntaxTreeSemanticModel.GetDiagnostics(Nullable`1 span, CancellationToken cancellationToken)
      at Microsoft.CodeAnalysis.Diagnostics.CompilationWithAnalyzers.GenerateCompilationEvents(AnalysisScope analysisScope, CancellationToken cancellationToken)
      at Microsoft.CodeAnalysis.Diagnostics.CompilationWithAnalyzers.ComputeAnalyzerDiagnosticsAsync(AnalysisScope analysisScope, Func`1 getPendingEventsOpt, Int32 newTaskToken, CancellationToken cancellationToken)
      at Microsoft.CodeAnalysis.Diagnostics.CompilationWithAnalyzers.ComputeAnalyzerSemanticDiagnosticsAsync(SemanticModel model, AnalysisScope analysisScope, CancellationToken cancellationToken, Boolean forceCompletePartialTrees)
      at Microsoft.CodeAnalysis.Diagnostics.CompilationWithAnalyzers.GetAnalysisResultCoreAsync(SemanticModel model, Nullable`1 filterSpan, ImmutableArray`1 analyzers, CancellationToken cancellationToken)
      at Microsoft.CodeAnalysis.Diagnostics.Extensions.GetAnalysisResultAsync(CompilationWithAnalyzers compilationWithAnalyzers, DocumentAnalysisScope documentAnalysisScope, CancellationToken cancellationToken)
      at Microsoft.CodeAnalysis.Diagnostics.Extensions.GetAnalysisResultAsync(CompilationWithAnalyzers compilationWithAnalyzers, DocumentAnalysisScope documentAnalysisScope, Project project, DiagnosticAnalyzerInfoCache analyzerInfoCache, CancellationToken cancellationToken)
      at Microsoft.CodeAnalysis.Remote.Diagnostics.DiagnosticComputer.AnalyzeAsync(CompilationWithAnalyzers compilationWithAnalyzers, BidirectionalMap`2 analyzerToIdMap, ImmutableArray`1 analyzers, SkippedHostAnalyzersInfo skippedAnalyzersInfo, Boolean reportSuppressedDiagnostics, Boolean logPerformanceInfo, Boolean getTelemetryInfo, CancellationToken cancellationToken)
      at Microsoft.CodeAnalysis.Remote.Diagnostics.DiagnosticComputer.GetDiagnosticsAsync(IEnumerable`1 analyzerIds, Boolean reportSuppressedDiagnostics, Boolean logPerformanceInfo, Boolean getTelemetryInfo, CancellationToken cancellationToken)
      at Microsoft.CodeAnalysis.Remote.RemoteDiagnosticAnalyzerService.<>c__DisplayClass4_0.<<CalculateDiagnosticsAsync>b__0>d.MoveNext()
   --- End of stack trace from previous location ---
      at Microsoft.CodeAnalysis.Remote.RemoteWorkspace.<>c__DisplayClass7_0`1.<<RunWithSolutionAsync>g__ProcessSolutionAsync|1>d.MoveNext()
   --- End of stack trace from previous location ---
      at Microsoft.CodeAnalysis.Remote.RemoteWorkspace.RunWithSolutionAsync[T](AssetProvider assetProvider, Checksum solutionChecksum, Int32 workspaceVersion, Boolean updatePrimaryBranch, Func`2 implementation, CancellationToken cancellationToken)
      at Microsoft.CodeAnalysis.Remote.RemoteWorkspace.RunWithSolutionAsync[T](AssetProvider assetProvider, Checksum solutionChecksum, Int32 workspaceVersion, Boolean updatePrimaryBranch, Func`2 implementation, CancellationToken cancellationToken)
      at Microsoft.CodeAnalysis.Remote.BrokeredServiceBase.RunWithSolutionAsync[T](Checksum solutionChecksum, Func`2 implementation, CancellationToken cancellationToken)
      at Microsoft.CodeAnalysis.Remote.RemoteDiagnosticAnalyzerService.CalculateDiagnosticsAsync(Checksum solutionChecksum, DiagnosticArguments arguments, CancellationToken cancellationToken)
jasonmalinowski commented 1 year ago

To folks pasting the stack with "Cannot enqueue data after PromiseNotToEnqueue" in it, that's a duplicate of #65064. We have a fix internally for that one in 17.5, but since it's fairly risky we're still looking at a plan for bringing the fix back to 17.4. @jaredpar may have further comments there.

dliedke commented 1 year ago

When fix will be released? It seems I am coding in notepad. Almost everything is failing in the text editor.

jaredpar commented 1 year ago

That fix is around a tricky race condition. We wanted to give it a few weeks to settle in our preview builds before back porting it for servicing (wanted some real world testing to make sure there were no adverse side effects of the change). Expectation is this will be back ported next week to 17.4 and that would appear in the following servicing update.

dliedke commented 1 year ago

Thanks for the update @jaredpar ! Using VS.NET 2019 for now as backup.

edgariscoding commented 1 year ago

Also experiencing this issue on VS 2022 v17.4.1.

image

jasonmalinowski commented 1 year ago

@edgariscoding Can you file a new bug on that one? That's not something I think we've seen before.

edgariscoding commented 1 year ago

@edgariscoding Can you file a new bug on that one? That's not something I think we've seen before.

Yep, done

https://developercommunity.visualstudio.com/t/Feature-Diagnostic-analyzer-runner-is-/10214845

patdevlin commented 1 year ago

I am having the same issue on Visual Studio 17.4.2, see image below and stack trace:

image

StreamJsonRpc.ConnectionLostException : The JSON-RPC connection with the remote party was lost before the request could complete. ---> System.OperationCanceledException : The operation was canceled. at System.Threading.CancellationToken.ThrowOperationCanceledException() at async StreamJsonRpc.MessageHandlerBase.WriteAsync() at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at async StreamJsonRpc.JsonRpc.SendAsync() at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at async StreamJsonRpc.JsonRpc.InvokeCoreAsync() --- End of inner exception stack trace --- at async StreamJsonRpc.JsonRpc.InvokeCoreAsync() at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at async StreamJsonRpc.JsonRpc.InvokeCoreAsync[TResult]() at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at async Microsoft.CodeAnalysis.Remote.BrokeredServiceConnection`1.TryInvokeAsync[TService,TResult]()

Only extension installed is =

JetBrains ReSharper 2022.2.4 Build 222.0.20221024.165723 built on 2022-10-24 dotCover 2022.2.20221024.174408 dotTrace 2022.2.20221024.174359 ReSharper C++ 2022.2.20221027.94151 ReSharper 2022.2.20221024.173218 dotMemory 2022.2.20221024.174359

If you need any further information let me know and i am happy to share.

jasonmalinowski commented 1 year ago

@patdevlin That's being investigated as a part of https://developercommunity.visualstudio.com/t/Feature-x-is-currently-unavailable-due/10189905

ForteUnited commented 4 months ago

This is happening to me with a large .sln in VS 17.9.6 (latest).

StreamJsonRpc.ConnectionLostException : The JSON-RPC connection with the remote party was lost before the request could complete. ---> System.OperationCanceledException : The operation was canceled. at System.Threading.CancellationToken.ThrowOperationCanceledException() at async StreamJsonRpc.MessageHandlerBase.WriteAsync() at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at async StreamJsonRpc.JsonRpc.SendAsync() at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at async StreamJsonRpc.JsonRpc.InvokeCoreAsync() --- End of inner exception stack trace --- at async StreamJsonRpc.JsonRpc.InvokeCoreAsync() at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at async StreamJsonRpc.JsonRpc.InvokeCoreAsync[TResult]() at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at async Microsoft.CodeAnalysis.Remote.BrokeredServiceConnection`1.TryInvokeAsync[TService]()

sharwell commented 4 months ago

Hi @ForteUnited,

That issue is not related to the current issue. Can you file a new report so we can investigate it?

Thanks!