Developer forums (C::B DEVELOPMENT STRICTLY!) > Plugins development
unknown exception
grv575:
I'll check that in a second. But the gdb thing seems like a bug:
I create a new wxWidgets project, compile it, run it, no problems. Then goto debug->start and it brings up the wxWidgets sample app main window. When I close that gdb does not exit. It's in an endless loop:
--- Code: ---Command-line: C:\MinGW\bin\gdb.exe -nx -fullname -args wxwidgets.exe
Working dir : C:\Documents and Settings\coke.COKE-31670BAFF9\Desktop\New Folder (2)\1\
> set prompt (gdb)
GNU gdb 6.3
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i686-pc-mingw32"...
(no debugging symbols found)
(gdb) (gdb)
> set confirm off
(gdb)
> set width 0
(gdb)
> set height 0
(gdb)
> set breakpoint pending on
(gdb)
> set print asm-demangle on
(gdb)
> set disassembly-flavor intel
(gdb)
> directory C:/DOCUME~1/COKE~1.COK/Desktop/NEWFOL~2/1/
(gdb)
> delete
(gdb)
> run
DBG_CONTINUE);
ContinueDebug
Event (cpid=3548, ctid=1868, DBG_CONTINUE);
ON_DEBUG_EVENT)
id=3548 tid=1868 code=EXCEPTION_DEBUG_EVENT)
NUE);
EVENT)
id=1868 code=EXCEPTION_DEBUG_EVENT)
gdb
: kernel event for pid=3548 tid=1868 code=EXCEPTION_DEBUG_EVENT)
ctid=1868, DBG_CONTINUE);
Co
ntinueDebugEvent (cpid=3548, ctid=1868, DBG_CONTINUE);
ode=EXCEPTION_DEBUG_EVENT)
event for pid=3548 tid=1868 code=EXCEPTION_DEBUG_EVENT)
, DBG_CONTINUE);
ContinueDeb
ugEvent (cpid=3548, ctid=1868, DBG_CONTINUE);
TION_DEBUG_EVENT)
pid=3548 tid=1868 code=EXCEPTION_DEBUG_EVENT)
TINUE);
cpid=3548, ctid=1868, DBG_CONTINUE);
G_EVENT)
tid=1868 code=EXCEPTION_DEBUG_EVENT)
g
db: kernel event for pid=3548 tid=1868 code=EXCEPTION_DEBUG_EVENT)
, ctid=1868, DBG_CONTINUE);
code=EXCEPTION_DEBUG_EVENT)
l event for pid=3548 tid=1868 code=EXCEPTION_DEBUG_EVENT)
68, DBG_CONTINUE);
...(forever until I kill gdb.exe)...
--- End code ---
grv575:
The unknown exception problem definately has something to do with the codeblocks default.conf parsing. It's very repeatable:
1. delete default.conf
2. select gcc as default compiler again, turn off tips on startup
3. settings->debugger->enable display debugger log
4. close cb
5. open cb
6. no problems yet
7. close cb
8. open cb
9. not problems yet (??? odd)
10. close cb
11. open cb = unhandled exception
12. open cb = unhandled exception
...
If I leave the unhandled exception dialog box open long enough, dr mingw pops up, but only gives:
--- Code: ---codeblocks.exe caused an Access Violation at location 60538f8e in module codeblocks.dll Reading from location 00000308.
Registers:
eax=01441870 ebx=013c8850 ecx=00000001 edx=00000308 esi=004a5030 edi=0022f150
eip=00000000 esp=0022fff8 ebp=00000000 iopl=0 nv up ei pl nz na pe nc
cs=001b ss=0023 ds=0023 es=0023 fs=003b gs=0000 efl=00000202
Call stack:
00000000
--- End code ---
Jumped the gun, finally it produced a .rpt:
--- Code: ----------------------
Error occured on Thursday, December 15, 2005 at 21:21:13.
C:\1\src\devel\codeblocks.exe caused an Access Violation at location 60538f8e in module C:\1\src\devel\codeblocks.dll Reading from location 00000308.
Registers:
eax=01441870 ebx=013c8850 ecx=00000001 edx=00000308 esi=004a5030 edi=0022f150
eip=60538f8e esp=0022ef50 ebp=0022ef68 iopl=0 nv up ei pl nz na pe nc
cs=001b ss=0023 ds=0023 es=0023 fs=003b gs=0000 efl=00010202
Call stack:
60538F8E C:\1\src\devel\codeblocks.dll:60538F8E EditorManager::GetActiveEditor() C:/1/src/sdk/editormanager.cpp:628
00459D87 C:\1\src\devel\codeblocks.exe:00459D87
00406EF3 C:\1\src\devel\codeblocks.exe:00406EF3 CodeBlocksApp::OnAppActivate(wxActivateEvent&) C:/1/src/src/app.cpp:734
100AA0E8 C:\1\src\devel\wxmsw26u_gcc_cb.dll:100AA0E8 _ZN12wxEvtHandler21ProcessEventIfMatchesERK21wxEventTableEntryBasePS_R7wxEvent
100AA4AC C:\1\src\devel\wxmsw26u_gcc_cb.dll:100AA4AC _ZN16wxEventHashTable11HandleEventER7wxEventP12wxEvtHandler
100AB489 C:\1\src\devel\wxmsw26u_gcc_cb.dll:100AB489 _ZN12wxEvtHandler12ProcessEventER7wxEvent
1018413C C:\1\src\devel\wxmsw26u_gcc_cb.dll:1018413C _ZN9wxAppBase9SetActiveEbP8wxWindow
1011466E C:\1\src\devel\wxmsw26u_gcc_cb.dll:1011466E _ZN8wxWindow13MSWWindowProcEjjl
101390FA C:\1\src\devel\wxmsw26u_gcc_cb.dll:101390FA _ZN7wxFrame13MSWWindowProcEjjl
1010C750 C:\1\src\devel\wxmsw26u_gcc_cb.dll:1010C750 _Z9wxWndProcP6HWND__jjl@16
77D48709 C:\WINDOWS\system32\USER32.dll:77D48709 GetDC
77D487EB C:\WINDOWS\system32\USER32.dll:77D487EB GetDC
77D4B368 C:\WINDOWS\system32\USER32.dll:77D4B368 DefWindowProcW
77D4B3B4 C:\WINDOWS\system32\USER32.dll:77D4B3B4 DefWindowProcW
7C90EAE3 C:\WINDOWS\system32\ntdll.dll:7C90EAE3 KiUserCallbackDispatcher
77D493DF C:\WINDOWS\system32\USER32.dll:77D493DF PeekMessageW
77D6E92B C:\WINDOWS\system32\USER32.dll:77D6E92B CallMsgFilterW
77D5688A C:\WINDOWS\system32\USER32.dll:77D5688A LoadBitmapA
77D6B7C5 C:\WINDOWS\system32\USER32.dll:77D6B7C5 SoftModalMessageBox
77D6B12B C:\WINDOWS\system32\USER32.dll:77D6B12B MessageBoxIndirectA
77D95FDF C:\WINDOWS\system32\USER32.dll:77D95FDF MessageBoxTimeoutW
77D80574 C:\WINDOWS\system32\USER32.dll:77D80574 MessageBoxExW
77D9615B C:\WINDOWS\system32\USER32.dll:77D9615B MessageBoxW
1005159D C:\1\src\devel\wxmsw26u_gcc_cb.dll:1005159D _Z17wxSafeShowMessageRK8wxStringS1_
004044BC C:\1\src\devel\codeblocks.exe:004044BC CodeBlocksApp::OnInit() C:/1/src/src/app.cpp:408
0045800C C:\1\src\devel\codeblocks.exe:0045800C
100437F9 C:\1\src\devel\wxmsw26u_gcc_cb.dll:100437F9 _Z14wxUninitializev
100B33BA C:\1\src\devel\wxmsw26u_gcc_cb.dll:100B33BA _Z7wxEntryP11HINSTANCE__S0_Pci
0040148A C:\1\src\devel\codeblocks.exe:0040148A WinMain C:/1/src/src/app.cpp:297
004522EA C:\1\src\devel\codeblocks.exe:004522EA
004011E7 C:\1\src\devel\codeblocks.exe:004011E7
00401238 C:\1\src\devel\codeblocks.exe:00401238
7C816D4F C:\WINDOWS\system32\kernel32.dll:7C816D4F RegisterWaitForInputIdle
--- End code ---
280Z28:
Haha that's the same place (function) mine was crashing, only mine didn't give a line number I don't think!
grv575:
OK traced the bug by comparing default.conf files at various stages.
A default conf file with these lines does not load (gives the exception):
--- Code: --- <main_frame>
<layout>
<TOOLBAR_SHOW bool="1" />
<LEFT_BLOCK_SELECTION int="0" />
<BOTTOM_BLOCK_SELECTION int="0" />
<MAXIMIZED bool="1" />
</layout>
<LAYOUT>
<bin crc="0">FQAAAHd4RG9ja2luZy1TdHJlYW0tdjEuMAgAAAA8bGF5b3V0PgIAAAAFAAAAZnJhbWVAAAAAQAAAAMgAAAA2AgAAAAEAAAAACAAAAExlZnRIb3N0AgAAAGQxYAAAAGAAAAAYAwAAlgAAAAABAAAAAAoAAABCb3R0b21Ib3N0BAAAAAcAAABUb3BIb3N0lgAAAAAAAAAAAAAACgAAAEJvdHRvbUhvc3SWAAAAAAAAAAEAAAACAAAAZDEIAAAATGVmdEhvc3TIAAAAAAAAAAEAAAAFAAAAZnJhbWUJAAAAUmlnaHRIb3N0yAAAAAAAAAAAAAAAFgAAAHd4U2xpZGVCYXItU3RyZWFtLXYxLjABAAAAAAgAAAA8bGF5b3V0PgMAAAAEAAAATWFpbgEIAAAAQ29tcGlsZXIBCAAAAERlYnVnZ2VyAQ==</bin>
</LAYOUT>
</main_frame>
--- End code ---
Note the crc of 0. If I change that one line to:
--- Code: --- <bin crc="2111425552">FQAAAHd4RG9ja2luZy1TdHJlYW0tdjEuMAgAAAA8bGF5b3V0PgIAAAAFAAAAZnJhbWVAAAAAQAAAAMgAAAA2AgAAAAEAAAAACAAAAExlZnRIb3N0AgAAAGQxYAAAAGAAAAAYAwAAlgAAAAABAAAAAAoAAABCb3R0b21Ib3N0BAAAAAcAAABUb3BIb3N0lgAAAAAAAAAAAAAACgAAAEJvdHRvbUhvc3SWAAAAAAAAAAEAAAACAAAAZDEIAAAATGVmdEhvc3TIAAAAAAAAAAEAAAAFAAAAZnJhbWUJAAAAUmlnaHRIb3N0yAAAAAAAAAAAAAAAFgAAAHd4U2xpZGVCYXItU3RyZWFtLXYxLjABAAAAAAgAAAA8bGF5b3V0PgMAAAAEAAAATWFpbgEIAAAAQ29tcGlsZXIBCAAAAERlYnVnZ2VyAQ==</bin>
--- End code ---
Which is the value it had previously, then it load up again fine. But on shutdown it again puts a 0 for the crc. This is the only difference that makes it crash vs not. Looks like something wrong with the crc calculation not getting run or...?
280Z28:
It's obvious. Unchecked pointer.
--- Code: ---if(!m_pNotebook) return 0;
--- End code ---
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version