jirentabu / crashrpt

Automatically exported from code.google.com/p/crashrpt
0 stars 0 forks source link

MFC message loop suppresses exceptions and results in activation context problems #168

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I have just noted one problem in MFC, which suppresses access violations in the 
message proc.
See here:
http://stackoverflow.com/questions/2631452/64bit-exceptions-in-wndproc-silently-
fail[^]
and here:
http://stackoverflow.com/questions/2622200/exceptions-silently-caught-by-windows
-how-to-handle-manually[^]

To work around this, I changed the first line in 
CCrashHandler::SetProcessExceptionHandlers():
//SetUnhandledExceptionFilter(SehHandler);
AddVectoredExceptionHandler(1, SehHandler);

AddVectoredExceptionHandler() makes our SehHandler number one again.

Please let me know if you approve of this change, or if there is something 
wrong with this approach.

Original issue reported on code.google.com by zexspect...@gmail.com on 2 Oct 2012 at 5:06

GoogleCodeExporter commented 9 years ago
Hello, I would like to close this issue, as it only happened with the 
standalone CrashHandler on codeproject.
Using the CrashRpt library, everything is in apple pie order!

Original comment by joconner...@gmail.com on 2 Oct 2012 at 9:56

GoogleCodeExporter commented 9 years ago
OK, closing the issue.

Original comment by zexspect...@gmail.com on 8 Oct 2012 at 12:06