A Windows mixed-mode application terminates with a message box: (Exception Processing Message 0xc0000005 - Unexpected parameters)
There is an entry in the event log:
Application: sdmail.exe Framework Version: v4.0.30319 Description: The process was terminated due to an internal error in the .NET Runtime at IP 733270F0 (731A0000) with exit code 80131506.
To find/fix the problem I tried:
- Install .net 4.81 and all current fixes for .Net
- Disable concurrent background garbage collection .
- Force re-generation of the .NET Core-Libraries (ngen.exe update /force)
- Try to analyzing a crash dump with WinDbg (The memory address is different because there was a different occurrence): EXCEPTION_RECORD: 00b3dd60 -- (.exr 0xb3dd60) ExceptionAddress: 74c20f7c (clr!standalone::ScanStackRoots+0x00000020) ExceptionCode: c0000005 (Access violation) ExceptionFlags: 00000001 NumberParameters: 2 Parameter[0]: 00000000 Parameter[1]: 1710f344 Attempt to read from address 1710f344
I’m not able to tell where the address 1710f344 is coming from. If look likes the corruption usually occurred long before the crash.
Does anyone have an idea how to find the problem?
I tried to catch the exception to avoid the message box with no success.
At unmanaged code at main:
try
{
…
}
catch(LPEXCEPTION_POINTERS ep)
{
...
}
catch(...)
{
}
And I installed also a handler with SetUnhandledExceptionFilter but I cannot catch the exception.
Any idea how to catch the exception?