Author Topic: wxwindows debug & assertions  (Read 6072 times)

grv575

  • Guest
wxwindows debug & assertions
« on: September 06, 2005, 02:20:58 am »
Just checking codeblocks with wxWidgets assertions turned on (wx26 nonunicode, cvs head).  Looks surprisingly clean.  One thing though: I'm sure we've all gotten one of the OnIdle() -> some sort of crash before.  One of the assertions failing on shutdown is:

wx26: src\common\wincmn.cpp:1007
Code
    wxFAIL_MSG( _T("where has the event handler gone?") );

which I think is happening because of the following chain of events (pseudocode):
Code
~MainFrame() ->
delete pLayoutManager; ->
~wxLayoutManager() (in wxDockit) ->
RemoveEventHandler(wxLayoutManager.parent)

but the parent event handler is already destroyed.  my thought is that if MainFrame derives from some base class then it's destructor may be called first and remove the event handler, ..., or something  :)

.rpt (when you get an assertion you can click yes to stop application and generate the .rpt stack trace):

Code
C:\codeblocks\src\devel\codeblocks.exe caused a Breakpoint at location 7c901230 in module C:\WINDOWS\system32\ntdll.dll.

Registers:
eax=00000006 ebx=0045b864 ecx=7c91056d edx=00250608 esi=00000018 edi=036cd85c
eip=7c901230 esp=0022f79c ebp=0022f7a8 iopl=0         nv up ei pl nz na po nc
cs=001b  ss=0023  ds=0023  es=0023  fs=003b  gs=0000             efl=00000206

Call stack:
7C901230  C:\WINDOWS\system32\ntdll.dll:7C901230  DbgBreakPoint
1000289D  C:\codeblocks\src\devel\wxmsw26d_gcc_cb.dll:1000289D  DoShowAssertDialog(wxString const&)  C:/Devel/wxWidgets-2.6.1/build/msw/../../src/common/appbase.cpp:693
100023FD  C:\codeblocks\src\devel\wxmsw26d_gcc_cb.dll:100023FD  wxAppTraitsBase::ShowAssertDialog(wxString const&)  C:/Devel/wxWidgets-2.6.1/build/msw/../../src/common/appbase.cpp:550
101714A8  C:\codeblocks\src\devel\wxmsw26d_gcc_cb.dll:101714A8  wxGUIAppTraitsBase::ShowAssertDialog(wxString const&)  C:/Devel/wxWidgets-2.6.1/build/msw/../../src/common/appcmn.cpp:530
10002A7C  C:\codeblocks\src\devel\wxmsw26d_gcc_cb.dll:10002A7C  ShowAssertDialog(char const*, int, char const*, char const*, wxAppTraits*)  C:/Devel/wxWidgets-2.6.1/build/msw/../../src/common/appbase.cpp:846
100021DD  C:\codeblocks\src\devel\wxmsw26d_gcc_cb.dll:100021DD  wxAppConsole::OnAssert(char const*, int, char const*, char const*)  C:/Devel/wxWidgets-2.6.1/build/msw/../../src/common/appbase.cpp:462
10002533  C:\codeblocks\src\devel\wxmsw26d_gcc_cb.dll:10002533  wxOnAssert(char const*, int, char const*, char const*)  C:/Devel/wxWidgets-2.6.1/build/msw/../../src/common/appbase.cpp:652
100024A8  C:\codeblocks\src\devel\wxmsw26d_gcc_cb.dll:100024A8  wxAssert(int, char const*, int, char const*, char const*)  C:/Devel/wxWidgets-2.6.1/build/msw/../../src/common/appbase.cpp:617
101EDAE1  C:\codeblocks\src\devel\wxmsw26d_gcc_cb.dll:101EDAE1  wxWindowBase::RemoveEventHandler(wxEvtHandler*)  C:/Devel/wxWidgets-2.6.1/build/msw/../../src/common/wincmn.cpp:1009
0042DFDD  C:\codeblocks\src\devel\codeblocks.exe:0042DFDD  wxLayoutManager::~wxLayoutManager()  C:/codeblocks/src/src/wxDockit/src/generic/layoutmanager.cpp:91
00413ED1  C:\codeblocks\src\devel\codeblocks.exe:00413ED1  MainFrame::~MainFrame()  C:/codeblocks/src/src/main.cpp:399
1017100B  C:\codeblocks\src\devel\wxmsw26d_gcc_cb.dll:1017100B  wxAppBase::DeletePendingObjects()  C:/Devel/wxWidgets-2.6.1/build/msw/../../src/common/appcmn.cpp:388
101712FC  C:\codeblocks\src\devel\wxmsw26d_gcc_cb.dll:101712FC  wxAppBase::OnIdle(wxIdleEvent&)  C:/Devel/wxWidgets-2.6.1/build/msw/../../src/common/appcmn.cpp:465
100C0E84  C:\codeblocks\src\devel\wxmsw26d_gcc_cb.dll:100C0E84  wxApp::OnIdle(wxIdleEvent&)  C:/Devel/wxWidgets-2.6.1/build/msw/../../src/msw/app.cpp:542
10001DD6  C:\codeblocks\src\devel\wxmsw26d_gcc_cb.dll:10001DD6  wxAppConsole::HandleEvent(wxEvtHandler*, void (wxEvtHandler::*)(wxEvent&), wxEvent&) const  C:/Devel/wxWidgets-2.6.1/build/msw/../../src/common/appbase.cpp:329
100A3950  C:\codeblocks\src\devel\wxmsw26d_gcc_cb.dll:100A3950  wxEvtHandler::ProcessEventIfMatches(wxEventTableEntryBase const&, wxEvtHandler*, wxEvent&)  C:/Devel/wxWidgets-2.6.1/build/msw/../../src/common/event.cpp:1185
100A2760  C:\codeblocks\src\devel\wxmsw26d_gcc_cb.dll:100A2760  wxEventHashTable::HandleEvent(wxEvent&, wxEvtHandler*)  C:/Devel/wxWidgets-2.6.1/build/msw/../../src/common/event.cpp:867
100A3B41  C:\codeblocks\src\devel\wxmsw26d_gcc_cb.dll:100A3B41  wxEvtHandler::ProcessEvent(wxEvent&)  C:/Devel/wxWidgets-2.6.1/build/msw/../../src/common/event.cpp:1247
10171139  C:\codeblocks\src\devel\wxmsw26d_gcc_cb.dll:10171139  wxAppBase::ProcessIdle()  C:/Devel/wxWidgets-2.6.1/build/msw/../../src/common/appcmn.cpp:413
100E2386  C:\codeblocks\src\devel\wxmsw26d_gcc_cb.dll:100E2386  wxEventLoop::Run()  C:/Devel/wxWidgets-2.6.1/build/msw/../../src/msw/evtloop.cpp:231
10170CB0  C:\codeblocks\src\devel\wxmsw26d_gcc_cb.dll:10170CB0  wxAppBase::MainLoop()  C:/Devel/wxWidgets-2.6.1/build/msw/../../src/common/appcmn.cpp:272
10170E2A  C:\codeblocks\src\devel\wxmsw26d_gcc_cb.dll:10170E2A  wxAppBase::OnRun()  C:/Devel/wxWidgets-2.6.1/build/msw/../../src/common/appcmn.cpp:341
1003D7F0  C:\codeblocks\src\devel\wxmsw26d_gcc_cb.dll:1003D7F0  wxEntryReal(int&, char**)  C:/Devel/wxWidgets-2.6.1/build/msw/../../src/common/init.cpp:417
100AA9F8  C:\codeblocks\src\devel\wxmsw26d_gcc_cb.dll:100AA9F8  wxEntry(int&, char**)  C:/Devel/wxWidgets-2.6.1/build/msw/../../src/msw/main.cpp:248
100AABBC  C:\codeblocks\src\devel\wxmsw26d_gcc_cb.dll:100AABBC  wxEntry(HINSTANCE__*, HINSTANCE__*, char*, int)  C:/Devel/wxWidgets-2.6.1/build/msw/../../src/msw/main.cpp:299
0040131A  C:\codeblocks\src\devel\codeblocks.exe:0040131A  WinMain  C:/codeblocks/src/src/app.cpp:297
00440A7A  C:\codeblocks\src\devel\codeblocks.exe:00440A7A
004011E7  C:\codeblocks\src\devel\codeblocks.exe:004011E7
00401238  C:\codeblocks\src\devel\codeblocks.exe:00401238
7C816D4F  C:\WINDOWS\system32\kernel32.dll:7C816D4F  RegisterWaitForInputIdle