Silent failures in C#, seemingly unhandled exceptions that does not crash the program

This is a known problem on x64 systems:

This is a known issue on 64-bit OS
platform. The reason is that the 64bit
OS core does not allow user mode
exception through kernal mode stacks.
The exception is swallowed by OS
sliently. That happens in FormLoad
handler, because it is called in an OS
callback. 32bits OS doesn’t do this,
so it doesn’t repro there.

The OS team is investigating related
issues. In the mean time, you do have
to work around this issue. Turning on
“Stop on first chance exception” will
make the debugger to stop in this
scenario. But it does make the
debugger to stop very often, so you
might want to do this only when you
find a problem.

The linked bug report was last updated February 2008, and doesn’t indicate what’s happened since then.

I can reproduce most poster’s behavior on my 32-bit system here, and I can reproduce the OP’s behavior on my 64-bit (Vista SP2, 3.5SP1 Framework) work PC.

Leave a Comment