I upgraded to wxWidgets 3.1.1 (vs2015, C++) in order to use the changes to wxWebView.
I changed the the backend of the WebView to MiniBlink with code from GitHub:
https://github.com/imReker/wxWebViewBlink
It is used in a frame-class:
Code: Select all
class WebFrame : public wxFrame
The next morning I got a null-ptr exception in the evtloop.cpp (see last lines):
Code: Select all
bool wxGUIEventLoop::PreProcessMessage(WXMSG *msg)
{
HWND hwnd = msg->hwnd;
wxWindow *wndThis = wxGetWindowFromHWND((WXHWND)hwnd);
wxWindow *wnd;
// this might happen if we're in a modeless dialog, or if a wx control has
// children which themselves were not created by wx (i.e. wxActiveX control children)
if ( !wndThis )
{
while ( hwnd && (::GetWindowLong(hwnd, GWL_STYLE) & WS_CHILD ))
{
hwnd = ::GetParent(hwnd);
// If the control has a wx parent, break and give the parent a chance
// to process the window message
wndThis = wxGetWindowFromHWND((WXHWND)hwnd);
if (wndThis != NULL)
break;
}
if ( !wndThis )
{
// this may happen if the event occurred in a standard modeless dialog (the
// only example of which I know of is the find/replace dialog) - then call
// IsDialogMessage() to make TAB navigation in it work
// NOTE: IsDialogMessage() just eats all the messages (i.e. returns true for
// them) if we call it for the control itself
return hwnd && ::IsDialogMessage(hwnd, msg) != 0; // <---- NULL PTR Exception
}
}
Any ideas how to catch or further debug this? I cant have my app randomly crash and I can't reproduce this behavior either. Putting the pc in energy saving mode doesnt produce it, it needs more time to occur.
The Frame does not need to be shown for this error (at least I am pretty sure it doesn't - will test this over night).
Best Natu