This repository was archived by the owner on Nov 13, 2026. It is now read-only.
Repository navigation
This repository was archived by the owner on Nov 13, 2026. It is now read-only.
Unhandled Exception: ILCompiler.CodeGenerationFailedException: Code generation failed for method #8346
Copy link
Copy link
Open
Description
Unhandled Exception: Unhandled Exception: Unhandled Exception: Unhandled Exception: Unhandled Exception: Unhandled Exception: Unhandled Exception: Unhandled Exception: Unhandled Exception:
Unhandled Exception:
Unhandled Exception:
Unhandled Exception: ILCompiler.CodeGenerationFailedException: Code generation failed for method '[OpenTK]OpenTK.Graphics.ES30.GL+Qcom.ExtGetProgramBinarySource(int32,ShaderType,string&,int32[])'
at Internal.JitInterface.CorInfoImpl.CompileMethodInternal(IMethodNode methodCodeNodeNeedingCode, MethodIL methodIL)
at Internal.JitInterface.CorInfoImpl.CompileMethod(MethodCodeNode methodCodeNodeNeedingCode, MethodIL methodIL)
at ILCompiler.RyuJitCompilation.CompileSingleMethod(CorInfoImpl corInfo, MethodCodeNode methodCodeNodeNeedingCode)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location where exception was thrown ---
at System.Threading.ThreadPoolWorkQueue.Dispatch()
ILCompiler.CodeGenerationFailedException: Code generation failed for method '[OpenTK]OpenTK.Graphics.ES30.GL+Qcom.ExtGetProgramBinarySource(uint32,ShaderType,string&,int32&)'
at Internal.JitInterface.CorInfoImpl.CompileMethodInternal(IMethodNode methodCodeNodeNeedingCode, MethodIL methodIL)
at Internal.JitInterface.CorInfoImpl.CompileMethod(MethodCodeNode methodCodeNodeNeedingCode, MethodIL methodIL)
at ILCompiler.RyuJitCompilation.CompileSingleMethod(CorInfoImpl corInfo, MethodCodeNode methodCodeNodeNeedingCode)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location where exception was thrown ---
at System.Threading.ThreadPoolWorkQueue.Dispatch()
ILCompiler.CodeGenerationFailedException: Code generation failed for method '[OpenTK]OpenTK.Graphics.ES30.GL+Qcom.ExtGetProgramBinarySource(int32,ShaderType,string&,int32*)'
at Internal.JitInterface.CorInfoImpl.CompileMethodInternal(IMethodNode methodCodeNodeNeedingCode, MethodIL methodIL)
at Internal.JitInterface.CorInfoImpl.CompileMethod(MethodCodeNode methodCodeNodeNeedingCode, MethodIL methodIL)
at ILCompiler.RyuJitCompilation.CompileSingleMethod(CorInfoImpl corInfo, MethodCodeNode methodCodeNodeNeedingCode)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location where exception was thrown ---
at System.Threading.ThreadPoolWorkQueue.Dispatch()
ILCompiler.CodeGenerationFailedException: Code generation failed for method '[OpenTK]OpenTK.Graphics.ES30.GL+Qcom.ExtGetProgramBinarySource(int32,All,string&,int32[])'
at Internal.JitInterface.CorInfoImpl.CompileMethodInternal(IMethodNode methodCodeNodeNeedingCode, MethodIL methodIL)
at Internal.JitInterface.CorInfoImpl.CompileMethod(MethodCodeNode methodCodeNodeNeedingCode, MethodIL methodIL)
at ILCompiler.RyuJitCompilation.CompileSingleMethod(CorInfoImpl corInfo, MethodCodeNode methodCodeNodeNeedingCode)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location where exception was thrown ---
at System.Threading.ThreadPoolWorkQueue.Dispatch()
ILCompiler.CodeGenerationFailedException: Code generation failed for method '[OpenTK]OpenTK.Graphics.ES30.GL+Qcom.ExtGetProgramBinarySource(uint32,ShaderType,string&,int32[])'
at Internal.JitInterface.CorInfoImpl.CompileMethodInternal(IMethodNode methodCodeNodeNeedingCode, MethodIL methodIL)
at Internal.JitInterface.CorInfoImpl.CompileMethod(MethodCodeNode methodCodeNodeNeedingCode, MethodIL methodIL)
at ILCompiler.RyuJitCompilation.CompileSingleMethod(CorInfoImpl corInfo, MethodCodeNode methodCodeNodeNeedingCode)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location where exception was thrown ---
at System.Threading.ThreadPoolWorkQueue.Dispatch()
ILCompiler.CodeGenerationFailedException: Code generation failed for method '[OpenTK]OpenTK.Graphics.ES30.GL+Qcom.ExtGetProgramBinarySource(int32,All,string&,int32*)'
at Internal.JitInterface.CorInfoImpl.CompileMethodInternal(IMethodNode methodCodeNodeNeedingCode, MethodIL methodIL)
at Internal.JitInterface.CorInfoImpl.CompileMethod(MethodCodeNode methodCodeNodeNeedingCode, MethodIL methodIL)
at ILCompiler.RyuJitCompilation.CompileSingleMethod(CorInfoImpl corInfo, MethodCodeNode methodCodeNodeNeedingCode)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location where exception was thrown ---
at System.Threading.ThreadPoolWorkQueue.Dispatch()
ILCompiler.CodeGenerationFailedException: Code generation failed for method '[OpenTK]OpenTK.Graphics.ES30.GL+Qcom.ExtGetProgramBinarySource(uint32,All,string&,int32&)'
at Internal.JitInterface.CorInfoImpl.CompileMethodInternal(IMethodNode methodCodeNodeNeedingCode, MethodIL methodIL)
at Internal.JitInterface.CorInfoImpl.CompileMethod(MethodCodeNode methodCodeNodeNeedingCode, MethodIL methodIL)
at ILCompiler.RyuJitCompilation.CompileSingleMethod(CorInfoImpl corInfo, MethodCodeNode methodCodeNodeNeedingCode)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location where exception was thrown ---
at System.Threading.ThreadPoolWorkQueue.Dispatch()ILCompiler.CodeGenerationFailedException: Code generation failed for method '[OpenTK]OpenTK.Graphics.ES30.GL+Qcom.ExtGetProgramBinarySource(uint32,All,string&,int32*)'
at Internal.JitInterface.CorInfoImpl.CompileMethodInternal(IMethodNode methodCodeNodeNeedingCode, MethodIL methodIL)
at Internal.JitInterface.CorInfoImpl.CompileMethod(MethodCodeNode methodCodeNodeNeedingCode, MethodIL methodIL)
at ILCompiler.RyuJitCompilation.CompileSingleMethod(CorInfoImpl corInfo, MethodCodeNode methodCodeNodeNeedingCode)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location where exception was thrown ---
at System.Threading.ThreadPoolWorkQueue.Dispatch()ILCompiler.CodeGenerationFailedException: Code generation failed for method '[OpenTK]OpenTK.Graphics.ES30.GL+Qcom.ExtGetProgramBinarySource(uint32,ShaderType,string&,int32*)'
at Internal.JitInterface.CorInfoImpl.CompileMethodInternal(IMethodNode methodCodeNodeNeedingCode, MethodIL methodIL)
at Internal.JitInterface.CorInfoImpl.CompileMethod(MethodCodeNode methodCodeNodeNeedingCode, MethodIL methodIL)
at ILCompiler.RyuJitCompilation.CompileSingleMethod(CorInfoImpl corInfo, MethodCodeNode methodCodeNodeNeedingCode)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location where exception was thrown ---
at System.Threading.ThreadPoolWorkQueue.Dispatch()ILCompiler.CodeGenerationFailedException: Code generation failed for method '[OpenTK]OpenTK.Graphics.ES30.GL+Qcom.ExtGetProgramBinarySource(int32,ShaderType,string&,int32&)'
at Internal.JitInterface.CorInfoImpl.CompileMethodInternal(IMethodNode methodCodeNodeNeedingCode, MethodIL methodIL)
at Internal.JitInterface.CorInfoImpl.CompileMethod(MethodCodeNode methodCodeNodeNeedingCode, MethodIL methodIL)
at ILCompiler.RyuJitCompilation.CompileSingleMethod(CorInfoImpl corInfo, MethodCodeNode methodCodeNodeNeedingCode)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location where exception was thrown ---
at System.Threading.ThreadPoolWorkQueue.Dispatch()ILCompiler.CodeGenerationFailedException: Code generation failed for method '[OpenTK]OpenTK.Graphics.ES30.GL+Qcom.ExtGetProgramBinarySource(uint32,All,string&,int32[])'
at Internal.JitInterface.CorInfoImpl.CompileMethodInternal(IMethodNode methodCodeNodeNeedingCode, MethodIL methodIL)
at Internal.JitInterface.CorInfoImpl.CompileMethod(MethodCodeNode methodCodeNodeNeedingCode, MethodIL methodIL)
at ILCompiler.RyuJitCompilation.CompileSingleMethod(CorInfoImpl corInfo, MethodCodeNode methodCodeNodeNeedingCode)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location where exception was thrown ---
at System.Threading.ThreadPoolWorkQueue.Dispatch()ILCompiler.CodeGenerationFailedException: Code generation failed for method '[OpenTK]OpenTK.Graphics.ES30.GL+Qcom.ExtGetProgramBinarySource(int32,All,string&,int32&)'
at Internal.JitInterface.CorInfoImpl.CompileMethodInternal(IMethodNode methodCodeNodeNeedingCode, MethodIL methodIL)
at Internal.JitInterface.CorInfoImpl.CompileMethod(MethodCodeNode methodCodeNodeNeedingCode, MethodIL methodIL)
at ILCompiler.RyuJitCompilation.CompileSingleMethod(CorInfoImpl corInfo, MethodCodeNode methodCodeNodeNeedingCode)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location where exception was thrown ---
at System.Threading.ThreadPoolWorkQueue.Dispatch()
I am attempting to dotnet publish -r win-x64 -c Release a program and I receieve this error after the Generating compatible native code. message.
Metadata
Metadata
Assignees
Labels
No labels
Activity
jkotas commentedon Sep 22, 2020
OpenTK assembly contains invalid IL:
(This is just one example. There are more.)
It is crashing the JIT with
CORJIT_INTERNALERRORand in turn crashing the compiler.jkotas commentedon Sep 22, 2020
OpenTK project is using IL generator https://github.com/opentk/opentk/tree/master/src/Generator.Rewrite that seems to be responsible for the invalid IL.
We should look into reporting this error in a better way, but the underlying problem should be fixed in OpenTK project. @Powerlated Could you please open an issue on this in OpenTK project?