OK, I found some clue.
When a tooltip window is destroyed, a function will be called
In sdk\wxscintilla\src\PlatWX.cpp line 749
void Window::Destroy()
{
if (wid) {
Show(false);
GETWIN(wid)->Destroy();
}
wid = 0;
}
This will internally call a "delete this" statement, so the whole Window object is deleted.
But later, I see that this deleted Window is still used, so some function like:
// Main window proc
LRESULT WXDLLEXPORT APIENTRY _EXPORT wxWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{
// trace all messages - useful for the debugging
#ifdef __WXDEBUG__
wxLogTrace(wxTraceMessages,
wxT("Processing %s(hWnd=%08lx, wParam=%8lx, lParam=%8lx)"),
wxGetMessageName(message), (long)hWnd, (long)wParam, lParam);
#endif // __WXDEBUG__
wxWindowMSW *wnd = wxFindWinFromHandle((WXHWND) hWnd);
// when we get the first message for the HWND we just created, we associate
// it with wxWindow stored in gs_winBeingCreated
if ( !wnd && gs_winBeingCreated )
{
wxAssociateWinWithHandle(hWnd, gs_winBeingCreated);
wnd = gs_winBeingCreated;
gs_winBeingCreated = NULL;
wnd->SetHWND((WXHWND)hWnd);
}
LRESULT rc;
if ( wnd && wxEventLoop::AllowProcessing(wnd) )
rc = wnd->MSWWindowProc(message, wParam, lParam);
else
rc = ::DefWindowProc(hWnd, message, wParam, lParam);
return rc;
}
Will still be called. Note that in this case, "wnd" (in the statement of rc = wnd->MSWWindowProc(message, wParam, lParam)
is an already destroyed pointer in In sdk\wxscintilla\src\PlatWX.cpp line 749.
If I remember correctly, I have see such crash issue when I debug CC. Some one has a fix patch, let's see I can find it on the forum.