Developer forums (C::B DEVELOPMENT STRICTLY!) > Development
Crash using copy and paste (reproducable)
Biplab:
@Pecan
My sincere thanks for the help. I'll try my best to learn GDB. :D
I tried for about 10 minutes, but didn't find any crash. It's strange I'm using the same application. I ran the application with the following script (from ur example).
--- Code: ---#!/bin/sh
APP_DIR=/usr/local
export LD_LIBRARY_PATH=$APP_DIR/lib:$LD_LIBRARY_PATH
$APP_DIR/bin/codeblocks --prefix=$APP_DIR $@
--- End code ---
I usually run the App using the following Desktop Shortcut (I'm not sure about it's Linux name)
--- Code: ---[Desktop Entry]
Version=1.0
Encoding=UTF-8
Name=Code::Blocks
Comment=
Comment[en_US]=
Exec='/usr/local/bin/codeblocks'
GenericName=Code::Blocks IDE
GenericName[en_US]=Code::Blocks IDE
Icon=
MimeType=;
Name[en_US]=Code::Blocks
Path=
StartupNotify=true
Terminal=false
TerminalOptions=
Type=Application
X-DCOP-ServiceType=
X-KDE-SubstituteUID=false
X-KDE-Username=
--- End code ---
I've to leave my lab right now (It's 12am and the AC is switched off ;)) But please point out any problem you find.
I'll keep trying to reproduce crash report, if any.
Thanks & Regards,
Biplab
Pecan:
--- Quote from: Biplab on February 12, 2007, 05:08:33 pm ---I tried for about 10 minutes, but didn't find any crash. It's strange I'm using the same application. I ran the application with the following script (from ur example).
--- Code: ---#!/bin/sh
APP_DIR=/usr/local
export LD_LIBRARY_PATH=$APP_DIR/lib:$LD_LIBRARY_PATH
$APP_DIR/bin/codeblocks --prefix=$APP_DIR $@
--- End code ---
--- End quote ---
To catch the crash you have to run from a terminal or xterm, and shouldn't that last line be:
gdb --args $APP_DIR/bin/codeblocks --prefix=$APP_DIR $@
I made the assumption that you're running the svn version of CB.
On Linux: in the /src/devel directory you'll find the distributed ./run.sh shell command. I modify that shell command to startup gdb with codeblocks as the debugee. That shell I posted is just a modification of the run.sh.
So when I test CodeBlocks, I do the following:
I start a terminal or xterm. I then
cd /home/pecan/devel/trunk/src/devel
./run.sh
On windows:
I start a dos session. Then issue the dos commands:
cd \usr\proj\trunk\src\devel
gdb codeblocks
I get the (gdb) prompt then type
run
Then I just do my thing until CB crashes, where upon I get the (gdb) prompt again with a message about a segxxx, where xxx is some sort of violation.
I issue:
bt full to get the backtrace.
--- Quote from: Biplab on February 12, 2007, 05:08:33 pm ---I usually run the App using the following Desktop Shortcut (I'm not sure about it's Linux name)
--- Code: ---[Desktop Entry]
Version=1.0
Encoding=UTF-8
Name=Code::Blocks
Comment=
Comment[en_US]=
Exec='/usr/local/bin/codeblocks'
GenericName=Code::Blocks IDE
GenericName[en_US]=Code::Blocks IDE
Icon=
MimeType=;
Name[en_US]=Code::Blocks
Path=
StartupNotify=true
Terminal=false
TerminalOptions=
Type=Application
X-DCOP-ServiceType=
X-KDE-SubstituteUID=false
X-KDE-Username=
--- End code ---
--- End quote ---
Sorry, I don't know what the above is. Some KDE thingie ?
Biplab:
--- Quote from: Pecan on February 12, 2007, 06:04:16 pm ---To catch the crash you have to run from a terminal or xterm, and shouldn't that last line be:
gdb --args $APP_DIR/bin/codeblocks --prefix=$APP_DIR $@
I made the assumption that you're running the svn version of CB.
On Linux: in the /src/devel directory you'll find the distributed ./run.sh shell command.
So when I test CodeBlocks, I do the following:
I start a terminal or xterm. I then
cd /home/pecan/devel/trunk/src/devel
./run.sh
That shell I posted is just a modification ofthe run.sh.
On windows:
I start a dos session. Then issue the dos commands:
cd \usr\proj\trunk\src\devel
gdb codeblocks
--- End quote ---
Ok, I was in a hurry so couldn't post much details.
What I did was to save that content in a run.sh file and then ran it by right-clicking on it. I know this is utterly wrong, but some Windows habits it is.
I was getting strange error that Permission denied when I was running from shell. So I changed the property of file to Executable (again Right-click) and then selected run menu option.
But I didn't notice any crash. Earlier during crash once I press Ctrl+V everything was gone.
Another point to note that after posting the crash report I downloaded the wx-2.6.3-p2 and reinstalled it.
I'm using SVN version and will try tomorrow again as you've demonstrated. Whenever I try to use ./run.sh in src/devel folder, I get "Permission denied" message. Even in SU mode, it throws same error. May be I need to do the Right-click again to make it executable.
Honestly speaking I'm a Newbie in Linux and I face these strange (but simple) problems. :)
--- Quote from: Pecan on February 12, 2007, 06:04:16 pm ---Sorry, I don't know what the above is. Some KDE thingie ?
--- End quote ---
That is equivalent of Shortcut in Windows. This is to help Newbies like us to launch an app without using shell script. :)
I posted it's content to show you how I launch C::B.
Thanks again for your introduction to GDB. :D
Regards,
Biplab
Pecan:
--- Quote from: Biplab on February 12, 2007, 06:28:30 pm ---I need to do the Right-click again to make it executable.
--- End quote ---
Oh, yes, you're right. It needs to be made executable
In a terminal or xterm issue the command:
cd to your .../src/devel
chmod +x run.sh (or whatever you named it.)
./run.sh
I copied my original run.sh to gdb.sh
modified it to execute gdb as we've discussed.
chmod +x gdb.sh
Then just cd to your ...src//devel
./gdb.sh
Biplab:
Thanks for the instruction. :D
But I would like to ask another question regarding debugging of wxWidgets based app with GDB in Linux. I read the following post in wxWidgets forum.
http://wxforum.shadonet.com/viewtopic.php?t=12530
It says that the user can't see the contents of wxString with GDB in Unicode mode. I tried it and found that in C::B too, in Watches Window I can't see the wxString contents. AFAIK it's possible to view the contents of wxString in Unicode mode with MS Debugger. Why is it so? :)
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version