Code::Blocks Forums

Developer forums (C::B DEVELOPMENT STRICTLY!) => Development => Topic started by: rickg22 on January 14, 2006, 05:21:23 am

Title: rev 1751 crash on exit (FIXED, rev 1753)
Post by: rickg22 on January 14, 2006, 05:21:23 am
Quote
#0  0x7c911231 in ntdll!DbgUiConnectToDbg () from ntdll.dll
#1  0x7c97c943 in ntdll!RtlpNtMakeTemporaryKey () from ntdll.dll
#2  0x0022dde8 in ?? ()
#3  0x7c959eb9 in ntdll!RtlInsertElementGenericTableAvl () from ntdll.dll
#4  0x01603448 in ?? ()
#5  0x00000054 in ?? ()
#6  0x003e0000 in ?? ()
#7  0x00000001 in ?? ()
#8  0x50000161 in ?? ()
#9  0x7c92b686 in wcsncat () from ntdll.dll
#10 0x021b0000 in ?? ()
#11 0x0000001c in ?? ()
#12 0x003e0000 in ?? ()
#13 0x00000054 in ?? ()
#14 0x0022de18 in ?? ()
#15 0x02015430 in ?? ()
#16 0x7c92b686 in wcsncat () from ntdll.dll
#17 0x0000001c in ?? ()
#18 0x003e0000 in ?? ()
#19 0x01702d50 in ?? ()
#20 0x02058ac0 in ?? ()
#21 0x00000080 in ?? ()
#22 0x021b0000 in ?? ()
.
.
.
#115 0x00000000 in ?? () from
#116 0x01603448 in ?? ()
#117 0x7c97cde9 in ntdll!RtlpNtMakeTemporaryKey () from ntdll.dll
#118 0x04030000 in ?? ()
#119 0x00000000 in ?? () from
#120 0x00000050 in ?? ()
#121 0x0000000e in ?? ()
#122 0x0022db9c in ?? ()
#123 0x0001fff8 in ?? ()
#124 0x0022de2c in ?? ()
#125 0x7c91ee18 in strchr () from ntdll.dll
#126 0x0092b690 in CallTip::PaintContents (this=0x1603448, surfaceWindow=0x54,
    draw=124) at sdk/wxscintilla/src/scintilla/src/CallTip.cxx:145
Previous frame inner to this frame (corrupt stack?)

:(

By the way, this happened only after the main window was gone. Probably a cleanup issue?

EDIT: I added a breakpoint at Manager::Shutdown(). The breakpoint is NOT reached before the crash.
Title: Found it!
Post by: rickg22 on January 14, 2006, 05:33:30 am
Quote
main.cpp:1869    Hide();

And wham!

EDIT! Fixed! :) I only had to move this line AFTER all the event handlers were removed. Ta-da :D I'll commit now.

EDIT: Committed! At revision: 1752
Title: Re: Found it!
Post by: 280Z28 on January 14, 2006, 05:42:58 am
Quote
main.cpp:1869    Hide();

And wham!

Hmm. I'm not getting that crash. :) No crashes so far for me in 1745 or 1751.
Title: Re: rev 1751 crash on exit
Post by: 280Z28 on January 14, 2006, 05:46:05 am
ACTUALLY, can you try this:

Leave the Hide() call where it was.

In wxAUI/manager.cpp, change line(s) 1103/4 from this:

Code
    if (m_frame->GetEventHandler() == this)
        m_frame->PopEventHandler();

to just this:

Code
    m_frame->RemoveEventHandler(this);

And see if THAT is a fix for the problem.
Title: Re: rev 1751 crash on exit (FIXED, rev 1752)
Post by: rickg22 on January 14, 2006, 07:50:37 am
Question - why? The events weren't triggered by wxAUI manager, but by wxScintilla, besides why would i have to change code that's part of the wxAUI toolkit, if my change DID fix the problem?

Edit: AH, I see now. You're right (in part), that code has to be changed. I submitted the bug to the wxAUI project, and also committed on SVN :)