Check for Win32 exceptions inside our WindowProc().

Don't let unhandled Win32 (i.e. structured) exceptions escape from wxWndProc()
as they can just disappear into thin air when running under WOW64 as 32 bit
exceptions can't propagate through 64 bit kernel. So catch them immediately
and pass them to the global handler while we have the chance to do it, as
we're never going to get it in the outer __try/__catch block in wxEntry() in
src/msw/main.cpp.

In particular, this allows to catch crashes in wxEVT_PAINT handlers, such as
the one in debughlp sample, again.

Closes #16656.
This commit is contained in:
Vadim Zeitlin
2015-06-18 23:57:59 +02:00
parent 6ae8145e9d
commit 39ad820bee
3 changed files with 19 additions and 6 deletions

View File

@@ -14,8 +14,8 @@
// the exception handler which should be called from the exception filter
//
// it calsl wxApp::OnFatalException() if possible
extern unsigned long wxGlobalSEHandler(EXCEPTION_POINTERS *pExcPtrs);
// it calls wxApp::OnFatalException() if wxTheApp object exists
WXDLLIMPEXP_BASE unsigned long wxGlobalSEHandler(EXCEPTION_POINTERS *pExcPtrs);
// helper macro for wxSEH_HANDLE
#if defined(__BORLANDC__)