Re: Segmentation fault with gdk_draw_rgb_image
- From: Tim Müller <zen18864 zen co uk>
- To: gtk-app-devel-list gnome org, raul o <rotaiza2003 yahoo co uk>
- Cc:
- Subject: Re: Segmentation fault with gdk_draw_rgb_image
- Date: Fri, 19 Nov 2004 09:40:10 +0000
On Friday 19 November 2004 02:06, raul o wrote:
well, I'm programming a program with GTK 1.2.10 and ...
Gtk-1.2.10 is ancient, unmaintained and basically unsupported ...
.. use gdk_draw_rgb_image for to show a few images. When I
resize the window the program crash with the next message:
Program terminated with signal 11, Segmentation fault.
Using gdb and the core file I have the next message:
(gdb) backtrace
#0 0x4022c354 in gdk_rgb_gc_set_background () from
/usr/lib/libgdk-1.2.so.0
#1 0x4022de04 in gdk_rgb_gc_set_background () from
/usr/lib/libgdk-1.2.so.0
#2 0x4022df1c in gdk_draw_rgb_image () from
/usr/lib/libgdk-1.2.so.0
#3 0x08088a5c in expose_event_preview () at
atom.c:305
#4 0x4017b64d in gtk_marshal_BOOL__POINTER () from
/usr/lib/libgtk-1.2.so.0
Anybody can help me? Clues, links, docs, etc. are
welcome
This stack trace is completely useless. At the very least, you should:
* compile your code with debugging symbols (-g compiler flag)
* provide the source code of expose_event_preview() with line numbers
* provide the declaration of any global variables used
so people have at least an idea what you're doing.
If your distro has the gtk libraries with debugging symbols, you might want to
install those as well, to get a more informative stack trace. On debian,
you'd do
apt-get install libgtk1.2-dbg libglib1.2-dbg
and then run your program with:
% LD_LIBRARY_PATH=/usr/lib/debug ./yourprogram
Also, make sure you compile your program with the -Wall -O2 compiler flags to
make the compiler warn you about all kinds of things, like using
uninitialised variables, etc. (and _fix_ all those before you continue
debugging)
Lastly, you might want to run your program in 'valgrind', which is a very
powerful memory debugging tool (and dead simple to use as well).
Cheers
-Tim
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]