User forums > Nightly builds
The 22 March 2014 build (9744) is out.
ollydbg:
OK, I found some clue.
When a tooltip window is destroyed, a function will be called
In sdk\wxscintilla\src\PlatWX.cpp line 749
--- Code: ---void Window::Destroy()
{
if (wid) {
Show(false);
GETWIN(wid)->Destroy();
}
wid = 0;
}
--- End code ---
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:
--- Code: ---// 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;
}
--- End code ---
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. :)
ollydbg:
--- Quote from: ollydbg on April 03, 2014, 03:34:50 pm ---
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. :)
--- End quote ---
It is here annoying crash when debugging CC's auto-suggestion
And I think p2rkw has a fix to the CC's auto suggestion list. Maybe we should have a similar fix for the tooltip window.
ollydbg:
--- Code: --- src/sdk/wxscintilla/src/scintilla/src/CallTip.cxx | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/src/sdk/wxscintilla/src/scintilla/src/CallTip.cxx b/src/sdk/wxscintilla/src/scintilla/src/CallTip.cxx
index 7dc23a4..64c9f0d 100644
--- a/src/sdk/wxscintilla/src/scintilla/src/CallTip.cxx
+++ b/src/sdk/wxscintilla/src/scintilla/src/CallTip.cxx
@@ -297,7 +297,11 @@ PRectangle CallTip::CallTipStart(int pos, Point pt, int textHeight, const char *
void CallTip::CallTipCancel() {
inCallTipMode = false;
if (wCallTip.Created()) {
- wCallTip.Destroy();
+/* C::B begin */
+// wCallTip.Destroy();
+ wCallTip.Show(false);
+/* C::B end */
+
}
}
--- End code ---
this fix the crash issue. but not sure it cause other issue, since I'm not quite familiar with the scintilla control, I just follow the way p2rkw did.
vwdvaan:
--- Quote from: ollydbg on April 03, 2014, 04:58:03 pm ---
--- Code: --- src/sdk/wxscintilla/src/scintilla/src/CallTip.cxx | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/src/sdk/wxscintilla/src/scintilla/src/CallTip.cxx b/src/sdk/wxscintilla/src/scintilla/src/CallTip.cxx
index 7dc23a4..64c9f0d 100644
--- a/src/sdk/wxscintilla/src/scintilla/src/CallTip.cxx
+++ b/src/sdk/wxscintilla/src/scintilla/src/CallTip.cxx
@@ -297,7 +297,11 @@ PRectangle CallTip::CallTipStart(int pos, Point pt, int textHeight, const char *
void CallTip::CallTipCancel() {
inCallTipMode = false;
if (wCallTip.Created()) {
- wCallTip.Destroy();
+/* C::B begin */
+// wCallTip.Destroy();
+ wCallTip.Show(false);
+/* C::B end */
+
}
}
--- End code ---
this fix the crash issue. but not sure it cause other issue, since I'm not quite familiar with the scintilla control, I just follow the way p2rkw did.
--- End quote ---
Thank you Olly! It's working now!
Alpha:
For whatever reason, I still have been unable to replicate this crash ( ??? ).
@ollydbg: I will see if I can test your patch for side effects this weekend.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version