Hello,
I just compiled CodeBlocks from the CVS agains the wx2.6 Library. All is ok. But If I start it, i got a segfault. :(
How have I change the Makefile to compile with Debugger-Infos, so I can see in gdb whats wrong?
I 'm afraid CVS HEAD is not currently working with wx-2.6.1. I 'm investigating it but can't give you any direction yet...
If you want to debug it and maybe find a solution, use gdb. Here's how:
1) copy devel/run.sh to devel/dbg.sh
2) edit devel/dbg.sh and edit the last line to read like this:
gdb $APP_DIR/codeblocks.exe $@
Now run devel/dbg.sh. This will drop you in the gdb command line where issuing "run" (or just "r") will start C::B under gdb.
Yiannis.
Hello,
well the Problem is, that the Binary is not compiled with debugger infos. So gdb does not show useful infos:
(gdb) r
Starting program: /usr/src/apps/codeblocks-1.0-RC1/CVS/codeblocks/src/output/codeblocks.exe
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
[Thread debugging using libthread_db enabled]
[New Thread -1228272832 (LWP 345)]
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1228272832 (LWP 345)]
0xe08da5e0 in ?? ()
(gdb) bt
#0 0xe08da5e0 in ?? ()
#1 0xb7c6a52a in wxWindowBase::GetClientSize () from /usr/lib/libwx_gtk2_core-2.6.so.0
#2 0x080642ef in Configurations::operator[] ()
#3 0x080636cf in Configurations::operator[] ()
#4 0x0805d5e7 in ?? ()
#5 0x0805da5c in ?? ()
#6 0x0805eddc in wxAppConsole::CallOnInit ()
#7 0xb791689c in wxEntry () from /usr/lib/libwx_base-2.6.so.0
#8 0x0805cce4 in ?? ()
#9 0xb7444fe7 in __libc_start_main () from /lib/tls/libc.so.6
#10 0xbff06d84 in ?? ()
#11 0xbff06d8c in ?? ()
#12 0xb7f0a694 in ?? ()
#13 0xb755aff4 in ?? () from /lib/tls/libc.so.6
#14 0xbff06d10 in ?? ()
#15 0x08083700 in wxLayoutAlgorithm::~wxLayoutAlgorithm ()
Previous frame inner to this frame (corrupt stack?)
(gdb) q
The program is running. Exit anyway? (y or n) y
So here my Question again: How have I change the Makefile that codeblocks is compiled with Debugger Infos? ;)
eASy
I am working on the CVS version of codeblocks here, hopefully what I have found will be helpfull.
EDIT: RedHat Enterprise Linux WS wxGTK-2.6.1
I am sure Mandrav has already seen this, but I guess it would be good to post. Here (http://www.wxwidgets.org/manuals/2.6.1/wx_changes.html) is the list of incompatibilities wxWidgets 2.6.1 has with wxWidgets 2.4.2. I have also attached a log from valgrind 2.4.1 (http://www.valgrind.org/), which does a really good job of chasing down memory errors and leaks, but only on linux.
There are also two mismatched delete/delete[] errors in wxZipMemory before this error occurs, but valgrind says they aren't related. They stem from the InitXRCStuff (specifically the call to xmlResource::Get()->Load...) method which is called right before InitFrame call that sets off the creation of the MainFrame and the CreateIDE call.
==882== Use of uninitialised value of size 4
==882== at 0x1BD00845: wxWindowBase::GetClientSize() const (in /usr/local/lib/libwx_gtk2_core-2.6.so.0.0.0)
==882== by 0x8064316: MainFrame::CreateIDE() (main.cpp:419)
==882== by 0x8063832: MainFrame::MainFrame(wxWindow*) (main.cpp:362)
==882== by 0x805D466: CodeBlocksApp::InitFrame() (app.cpp:176)
==882== by 0x805D931: CodeBlocksApp::OnInit() (app.cpp:249)
==882== by 0x805ED27: wxAppConsole::CallOnInit() (app.h:87)
==882== by 0x1BEB61E0: wxEntry(int&, char**) (in /usr/local/lib/libwx_base-2.6.so.0.0.0)
==882== by 0x805CAEE: main (app.cpp:79)
==882==
==882== Invalid read of size 4
==882== at 0x1BD00845: wxWindowBase::GetClientSize() const (in /usr/local/lib/libwx_gtk2_core-2.6.so.0.0.0)
==882== by 0x8064316: MainFrame::CreateIDE() (main.cpp:419)
==882== by 0x8063832: MainFrame::MainFrame(wxWindow*) (main.cpp:362)
==882== by 0x805D466: CodeBlocksApp::InitFrame() (app.cpp:176)
==882== by 0x805D931: CodeBlocksApp::OnInit() (app.cpp:249)
==882== by 0x805ED27: wxAppConsole::CallOnInit() (app.h:87)
==882== by 0x1BEB61E0: wxEntry(int&, char**) (in /usr/local/lib/libwx_base-2.6.so.0.0.0)
==882== by 0x805CAEE: main (app.cpp:79)
==882== Address 0x320 is not stack'd, malloc'd or (recently) free'd
==882==
==882== Process terminating with default action of signal 11 (SIGSEGV)
==882== Access not within mapped region at address 0x320
==882== at 0x1BD00845: wxWindowBase::GetClientSize() const (in /usr/local/lib/libwx_gtk2_core-2.6.so.0.0.0)
==882== by 0x8064316: MainFrame::CreateIDE() (main.cpp:419)
==882== by 0x8063832: MainFrame::MainFrame(wxWindow*) (main.cpp:362)
==882== by 0x805D466: CodeBlocksApp::InitFrame() (app.cpp:176)
==882== by 0x805D931: CodeBlocksApp::OnInit() (app.cpp:249)
==882== by 0x805ED27: wxAppConsole::CallOnInit() (app.h:87)
==882== by 0x1BEB61E0: wxEntry(int&, char**) (in /usr/local/lib/libwx_base-2.6.so.0.0.0)
==882== by 0x805CAEE: main (app.cpp:79)
EDIT: Just realized this should probably be in the dev forum, thats if I am helping.
I got the wxZip error to go away by, they forgot to use "delete[]" instead of "delete" in the destructor of wxZipMemory on line line 488 of zipstrm.cpp. The segfault is still there though, with an additional error that I forgot to mention before:
==882== Conditional jump or move depends on uninitialised value(s)
==882== at 0x805CD8F: CodeBlocksApp::LoadConfig() (app.cpp:92)
==882== by 0x805D61C: CodeBlocksApp::OnInit() (app.cpp:222)
==882== by 0x805ED27: wxAppConsole::CallOnInit() (app.h:87)
==882== by 0x1BEB61E0: wxEntry(int&, char**) (in /usr/local/lib/libwx_base-2.6.so.0.0.0)
==882== by 0x805CAEE: main (app.cpp:79)
I am trying to track down the cause right now, but it appears that m_HasDebugLog is used in the LoadConfig function of CodeBlocksApp before it is actually assigned a value. It appears only to be assigned a value in CmdLineParse which isn't called till after that point.
EDIT: This rabbit whole is way deeper than I have time to fix right now. I got rid of the call to "GetClientSize" just to test, but I still gets lots of pointer errors (ie use of an unintialized value 4 bytes in size) related to GetSize. Not to mention other errors related to conditional statements based on undefined values. Later I think I will try to compile under wxGTK-2.4.2 and see how many of these errors are wxGTK 2.6.1 related.
hi there i've the VERION_1_= from the cvs an i can't start the programm too.
i use wxWidgets 2.4.x
here the debug
NU 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-linux-gnu"...Using host libthread_db library "/lib/libthread_db.so.1".
(gdb) r
Starting program: /usr/local/src/codeblocks/src/devel/codeblocks.exe
[Thread debugging using libthread_db enabled]
[New Thread 16384 (LWP 30177)]
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 16384 (LWP 30177)]
0xb7e91179 in wxWindowBase::FindWindow () from /usr/lib/libwx_gtk2-2.4.so
(gdb) bt
#0 0xb7e91179 in wxWindowBase::FindWindow () from /usr/lib/libwx_gtk2-2.4.so
#1 0xb7a82cda in EditorManager (this=0x82fa8f8, parent=0x812a920) at editormanager.cpp:176
#2 0xb7a822f4 in EditorManager::Get (parent=0x812a920) at editormanager.cpp:143
#3 0xb7a99e53 in Manager::GetEditorManager (this=0x81fa978) at manager.cpp:284
#4 0x08060ad6 in MainFrame::CreateMenubar (this=0x812a920) at main.cpp:524
#5 0x0806032e in MainFrame::CreateIDE (this=0x812a920) at main.cpp:457
#6 0x0805f0ef in MainFrame (this=0x812a920, lang=@0x80ce22c, parent=0x0) at main.cpp:370
#7 0x08057515 in CodeBlocksApp::InitFrame (this=0x80ce1d0) at app.cpp:176
#8 0x08057de8 in CodeBlocksApp::OnInit (this=0x80ce1d0) at app.cpp:301
#9 0xb7d30a38 in wxEntry () from /usr/lib/libwx_gtk2-2.4.so
#10 0x08056ba2 in main (argc=1, argv=0xbffff544) at app.cpp:79
(gdb)