I would like some insight into an error I'm receiving:
Managed Debugging Assistant 'FatalExecutionEngineError' has detected a problem in 'C:\app.exe'. Additional Information: The runtime has encountered a fatal error... This error may be a bug in the CLR or in the unsafe or non-verifiable portions of the user code. Common sources of this bug include user marshaling errors for COM-interop or PInvoke, which may corrupt the stack."
I would like to understand not only the error itself, but what/how CLR may play a part, and I've never really heard of COM-intercop or PInvoke are.. so some insight into those would also be helpful.
Also, the really odd part of it all is that if I continue through the breakpoints and do not step into or over, I do not see the error. However, if I step through line by line, the error pops up! Can anyone explain why I only see it while stepping through?
Not sure what other information would be useful.. please let me know (nicely of course!) what I could add.
Thank you in advance! :)
I ran into this working on a Dotnet Core project. I deleted the binaries and rebuilt, this fixed it for me. Simply doing a Clean and Build or just Rebuild had no effect.
It's most likely not a CLR bug, but probably a Heisenbug. We can't really say what's causing it, though, without seeing your code.
Try turning on Managed Debugging Assistants to figure out if some error or access violation is being suppressed.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With