Closed DorloBorlo closed 8 months ago
hi @DorloBorlo. This is likely a first chance exception that is caught and handled by ILGPU.
ILGPU is trying to load debug symbols, and the call to a standard .NET function is throwing that exception. Shortly afterwords, ILGPU will catch the exception, and continue without issue.
You can turn off loading symbols using DebugSymbolsMode.Disabled
.
Is DebugSymbolsMode.Disabled
set using the context builder? I did the following:
Context context = Context.Create( builder => builder.DebugSymbolsMode(DebugSymbolsMode.Disabled));
The exceptions were still thrown, and when checking the context properties, it had DebugSymbolsMode set to "basic". I tried changing the mode to any of the other settings with the same method, but it always ended up as "basic".
@DorloBorlo Looks like there is a defect with ILGPU v1.5.1 that does not allow disabling the debug symbols. ILGPU is automatically setting the mode to DebugSymbols.Basic
when a debugger is attached.
In either case, it is safe to ignore this exception since ILGPU will catch it. In addition, in Release mode, the debug symbols will not be loaded.
In the next release (ILGPU v2.x) this has been fixed with a new DebugConfig()
option on Context Builder.
Closing this ticket. This is a first-chance exception that is caught internally by ILGPU. It is currently unavoidable in v1.5.1, and v2.x has a fix that will prevent ILGPU from attempting to load the symbols.
Whenever I run a kernel with ILGPU, these exceptions are thrown:
Everything was working fine previously, with the removal of new code added since this issue has occurred not having any effect. The methods still execute as intended, but this exception fills the output. I have checked that all projects are running on x64, as I read that this is the usual cause of a BadImageFormatException.