Re: strange segmentation fault error!
- From: Jan Kratochvil <rcpt-gtk-devel-list AT gnome org jankratochvil net>
- To: jscym singnet com sg
- Cc: gtk-devel-list gnome org
- Subject: Re: strange segmentation fault error!
- Date: Tue, 7 Oct 2003 15:56:27 +0200
Hi,
Just some general GNU debugging notes:
On Tue, 07 Oct 2003 09:37:54 +0200, jscym singnet com sg wrote:
...
> I encountered a strange bug in my program and would like to seek the
> expertise of the group.
...
> the program terminates with a segmentation fault error.
General first step: Run it as:
LD_PRELOAD=/usr/lib/libefence.so ./testapp
> On debugging with gdb, the error that caused the segmentation fault was a
> file called eval.c could not be located.
Compile both your application, ! glib !, and gtk+ library with -ggdb3.
For rpm case (replace gtk with glib etc.):
rpm -i gtk*.src.rpm
modify /usr/src/*/SPECS/gtk*.spec
-%configure --with-xinput=xfree --disable-gtk-doc
+export CFLAGS="-ggdb3"
+%configure --with-xinput=xfree --disable-gtk-doc --enable-debug=yes
rpmbuild -bb /usr/src/*/SPECS/gtk*.spec
rpm -U /usr/src/*/RPMS/i386/gtk*.i386.rpm
> Here is the error msg from gdb:
> program received signal SIGSEGV, segmentation faults.
> 0x00FA0000 in ??() at eval.c:41
> 41 eval.c:No such file or directory
> in eval.c
>
> and on using backtrace, the following msg was obtained:
> #0 0x00FA0000 in ??() at eval.c:41
^^^^^^^^^^
This is just bogus address - myfunction() jumped to junk
or some more serious stack frame corruption occured.
> #1 0x0804B9C3 in myfunction(data=0x0) at main.c:124
^^^^^^^^^^ what is on that line of yours?
> #2 0x4019B691 in g_timeout_dispatch() at eval.c:41
> #3 0x4019A773 in g_main_dispatch() at eval.c:41
...
> I am currently using GTK+ 1.2. Should I upgrade to GTK+ 2.0?
Before you upgrade I would not expect much help from the community.
1.x is deprecated now.
Bye,
Lace
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]