roslyn: How do i debug Compiler Crashes? csc.exe exited with code -2146232797
Hi Guys,
i have already spent 2 days figuring out how to report this bug. During compilation my compiler Crashes. I am using the VS 15.7.3
And when i compile my code. This happens:
2 seconds later another error pops up:
Visual Studio Output: Microsoft.CSharp.Core.targets(52, 5): [MSB6006] “csc.exe” exited with code -2146232797.
I created a dump and could extract some info:
OnFatalException():19, FailFast (Microsoft.CodeAnalysis)@Microsoft.CodeAnalysis.dll ReportUnlessCanceled():58, FatalError (Microsoft.CodeAnalysis)@Microsoft.CodeAnalysis.dll <CompileNamedTypeAsTask>b__0():206, <>c__DisplayClass21_0 (Microsoft.CodeAnalysis.CSharp)@Microsoft.CodeAnalysis.CSharp.dll HadLambdaConversionError():475, OverloadResolutionResult
1 (Microsoft.CodeAnalysis.CSharp)@Microsoft.CodeAnalysis.CSharp.dll ReportDiagnostics():127, OverloadResolutionResult
1 (Microsoft.CodeAnalysis.CSharp)@Microsoft.CodeAnalysis.CSharp.dll ReportDelegateMethodGroupDiagnostics():123, Conversions (Microsoft.CodeAnalysis.CSharp)@Microsoft.CodeAnalysis.CSharp.dll GenerateImplicitConversionError():16454, Binder (Microsoft.CodeAnalysis.CSharp)@Microsoft.CodeAnalysis.CSharp.dll CreateReturnConversion():16871, Binder (Microsoft.CodeAnalysis.CSharp)@Microsoft.CodeAnalysis.CSharp.dll CreateBlockFromExpression():17047, Binder (Microsoft.CodeAnalysis.CSharp)@Microsoft.CodeAnalysis.CSharp.dll BindLambdaExpressionAsBlock():0, Binder (Microsoft.CodeAnalysis.CSharp)@Microsoft.CodeAnalysis.CSharp.dll ReallyBind():0, UnboundLambdaState (Microsoft.CodeAnalysis.CSharp)@Microsoft.CodeAnalysis.CSharp.dll Bind():0, UnboundLambdaState (Microsoft.CodeAnalysis.CSharp)@Microsoft.CodeAnalysis.CSharp.dll IsAnonymousFunctionCompatibleWithDelegate():0, ConversionsBase (Microsoft.CodeAnalysis.CSharp)@Microsoft.CodeAnalysis.CSharp.dll IsAnonymousFunctionCompatibleWithExpressionTree():0, ConversionsBase (Microsoft.CodeAnalysis.CSharp)@Microsoft.CodeAnalysis.CSharp.dll HasAnonymousFunctionConversion():0, ConversionsBase (Microsoft.CodeAnalysis.CSharp)@Microsoft.CodeAnalysis.CSharp.dll ClassifyImplicitBuiltInConversionFromExpression():0, ConversionsBase (Microsoft.CodeAnalysis.CSharp)@Microsoft.CodeAnalysis.CSharp.dll ClassifyImplicitConversionFromExpression():0, ConversionsBase (Microsoft.CodeAnalysis.CSharp)@Microsoft.CodeAnalysis.CSharp.dll IsApplicable():2494, OverloadResolution (Microsoft.CodeAnalysis.CSharp)@Microsoft.CodeAnalysis.CSharp.dll IsApplicable():0, OverloadResolution (Microsoft.CodeAnalysis.CSharp)@Microsoft.CodeAnalysis.CSharp.dll IsMemberApplicableInNormalForm():0, OverloadResolution (Microsoft.CodeAnalysis.CSharp)@Microsoft.CodeAnalysis.CSharp.dll AddMemberToCandidateSet():0, OverloadResolution (Microsoft.CodeAnalysis.CSharp)@Microsoft.CodeAnalysis.CSharp.dll PerformMemberOverloadResolution():0, OverloadResolution (Microsoft.CodeAnalysis.CSharp)@Microsoft.CodeAnalysis.CSharp.dll ResolveDefaultMethodGroup():0, Binder (Microsoft.CodeAnalysis.CSharp)@Microsoft.CodeAnalysis.CSharp.dll ResolveMethodGroupInternal():0, Binder (Microsoft.CodeAnalysis.CSharp)@Microsoft.CodeAnalysis.CSharp.dll ResolveMethodGroup():0, Binder (Microsoft.CodeAnalysis.CSharp)@Microsoft.CodeAnalysis.CSharp.dll BindMethodGroupInvocation():0, Binder (Microsoft.CodeAnalysis.CSharp)@Microsoft.CodeAnalysis.CSharp.dll BindInvocationExpression():0, Binder (Microsoft.CodeAnalysis.CSharp)@Microsoft.CodeAnalysis.CSharp.dll BindInvocationExpression():0, Binder (Microsoft.CodeAnalysis.CSharp)@Microsoft.CodeAnalysis.CSharp.dll BindExpressionInternal():0, Binder (Microsoft.CodeAnalysis.CSharp)@Microsoft.CodeAnalysis.CSharp.dll BindArgumentExpression():0, Binder (Microsoft.CodeAnalysis.CSharp)@Microsoft.CodeAnalysis.CSharp.dll BindArgumentAndName():0, Binder (Microsoft.CodeAnalysis.CSharp)@Microsoft.CodeAnalysis.CSharp.dll BindInvocationExpression():0, Binder (Microsoft.CodeAnalysis.CSharp)@Microsoft.CodeAnalysis.CSharp.dll BindExpressionInternal():0, Binder (Microsoft.CodeAnalysis.CSharp)@Microsoft.CodeAnalysis.CSharp.dll BindExpression():0, Binder (Microsoft.CodeAnalysis.CSharp)@Microsoft.CodeAnalysis.CSharp.dll BindReturn():0, Binder (Microsoft.CodeAnalysis.CSharp)@Microsoft.CodeAnalysis.CSharp.dll BindStatement():0, Binder (Microsoft.CodeAnalysis.CSharp)@Microsoft.CodeAnalysis.CSharp.dll BindBlockParts():0, Binder (Microsoft.CodeAnalysis.CSharp)@Microsoft.CodeAnalysis.CSharp.dll BindStatement():0, Binder (Microsoft.CodeAnalysis.CSharp)@Microsoft.CodeAnalysis.CSharp.dll BindPossibleEmbeddedStatement():0, Binder (Microsoft.CodeAnalysis.CSharp)@Microsoft.CodeAnalysis.CSharp.dll BindIfStatement():0, Binder (Microsoft.CodeAnalysis.CSharp)@Microsoft.CodeAnalysis.CSharp.dll BindStatement():0, Binder (Microsoft.CodeAnalysis.CSharp)@Microsoft.CodeAnalysis.CSharp.dll BindBlockParts():0, Binder (Microsoft.CodeAnalysis.CSharp)@Microsoft.CodeAnalysis.CSharp.dll BindStatement():0, Binder (Microsoft.CodeAnalysis.CSharp)@Microsoft.CodeAnalysis.CSharp.dll BindPossibleEmbeddedStatement():0, Binder (Microsoft.CodeAnalysis.CSharp)@Microsoft.CodeAnalysis.CSharp.dll BindIfStatement():0, Binder (Microsoft.CodeAnalysis.CSharp)@Microsoft.CodeAnalysis.CSharp.dll BindStatement():0, Binder (Microsoft.CodeAnalysis.CSharp)@Microsoft.CodeAnalysis.CSharp.dll BindBlockParts():0, Binder (Microsoft.CodeAnalysis.CSharp)@Microsoft.CodeAnalysis.CSharp.dll BindStatement():0, Binder (Microsoft.CodeAnalysis.CSharp)@Microsoft.CodeAnalysis.CSharp.dll BindMethodBody():0, Binder (Microsoft.CodeAnalysis.CSharp)@Microsoft.CodeAnalysis.CSharp.dll BindMethodBody():0, Binder (Microsoft.CodeAnalysis.CSharp)@Microsoft.CodeAnalysis.CSharp.dll BindMethodBody():0, MethodCompiler (Microsoft.CodeAnalysis.CSharp)@Microsoft.CodeAnalysis.CSharp.dll CompileMethod():0, MethodCompiler (Microsoft.CodeAnalysis.CSharp)@Microsoft.CodeAnalysis.CSharp.dll CompileNamedType():0, MethodCompiler (Microsoft.CodeAnalysis.CSharp)@Microsoft.CodeAnalysis.CSharp.dll <CompileNamedTypeAsTask>b__0():0, <>c__DisplayClass21_0 (Microsoft.CodeAnalysis.CSharp)@Microsoft.CodeAnalysis.CSharp.dll <WithCurrentUICulture>b__0():0, <>c__DisplayClass5_0 (Roslyn.Utilities)@Microsoft.CodeAnalysis.dll Execute():0, Task (System.Threading.Tasks)@mscorlib.dll RunInternal():0, ExecutionContext (System.Threading)@mscorlib.dll Run():278, ExecutionContext (System.Threading)@mscorlib.dll ExecuteWithThreadLocal():0, Task (System.Threading.Tasks)@mscorlib.dll ExecuteEntry():0, Task (System.Threading.Tasks)@mscorlib.dll Dispatch():0, ThreadPoolWorkQueue (System.Threading)@mscorlib.dll Native to Managed Transition:0, ()@
I would like to give more info, but it’s really hard to get more insight. Unfortunately, i can’t share my code. ( it’s enterprise code and it’s huge)¨ I would like to report a proper minimal example. But i am unable to do so, because i don’t know what exactly it causes. Do you have any tipps, how i can debug this?
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Reactions: 1
- Comments: 20 (12 by maintainers)
@epoyraz I suggest debugging the issue as follows:
cd Roslyn
(or wherever your git clone of Roslyn is) b.Restore.cmd
Roslyn.sln
in VS 2017F6
to Build (or, alternatively, typeMSBuild /m Roslyn.sln
in the command prompt)Visual Studio
folder)F5
to Start Visual Studio with your new Roslyn under the debuggerPlease let us know if you can do this, and if so what you learn.
This might be obvious to some but you must install donnet-sdk-2.1.200-rtm-00-88-66… before step 4, and F6 does nothing on my version of VS but I can use VS Menus or Ctrl+Shift+B to build.