User forums > Using Code::Blocks

Compilation successfull but cant start.

(1/5) > >>

eASy:
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?

Or there are other ways to see whats wrong?


eASy

mandrav:

--- Quote from: eASy on July 27, 2005, 08:30:52 pm ---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?

--- End quote ---

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:

--- Code: ---gdb $APP_DIR/codeblocks.exe $@
--- End code ---

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.

eASy:
Hello,

well the Problem is, that the Binary is not compiled with debugger infos. So gdb does not show useful infos:


--- Code: ---(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
--- End code ---

So here my Question again: How have I change the Makefile that codeblocks is compiled with Debugger Infos? ;)


eASy

mandrav:
I told you to work under devel/
You 're working under output/
These files are stripped from debugging symbols. Please work with the files under devel/

Yiannis.

eASy:
Oh Im sorry. Misunderstodd you. :(

Here are now the Output of the devel-dir:

workstation devel $ cat run.sh
#!/bin/sh

APP_DIR=/usr/src/apps/codeblocks-1.0-RC1/CVS/codeblocks/src/devel
export LD_LIBRARY_PATH=$APP_DIR:$LD_LIBRARY_PATH
$APP_DIR/codeblocks.exe $@
workstation devel $ ./run.sh
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-linux-gnu"...Using host libthread_db library "/lib/tls/libthread_db.so.1".

(gdb) r
Starting program: /usr/src/apps/codeblocks-1.0-RC1/CVS/codeblocks/src/devel/codeblocks.exe
[Thread debugging using libthread_db enabled]
[New Thread -1227859136 (LWP 15792)]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1227859136 (LWP 15792)]
0x00000013 in ?? ()
(gdb) bt
#0  0x00000013 in ?? ()
#1  0xb7ccf52a in wxWindowBase::GetClientSize () from /usr/lib/libwx_gtk2_core-2.6.so.0
#2  0x080642ef in MainFrame::CreateIDE (this=0x8159c18) at main.cpp:418
#3  0x080636cf in MainFrame (this=0x8159c18, parent=0x0) at main.cpp:362
#4  0x0805d5e7 in CodeBlocksApp::InitFrame (this=0x80ae178) at app.cpp:175
#5  0x0805da5c in CodeBlocksApp::OnInit (this=0x80ae178) at app.cpp:248
#6  0x0805eddc in wxAppConsole::CallOnInit (this=0x80ae178) at app.h:87
#7  0xb797b89c in wxEntry () from /usr/lib/libwx_base-2.6.so.0
#8  0x0805cce4 in main (argc=1, argv=0xbf86cd14) at app.cpp:78


Looks like a bug in wxGTK 2.6.1, or what do you mean?


eASy

Navigation

[0] Message Index

[#] Next page

Go to full version