crash in custom widget using gnome canvas
- From: Bastien Nocera <hadess hadess net>
- To: Gnome-devel <gnome-devel-list gnome org>
- Subject: crash in custom widget using gnome canvas
- Date: 06 May 2001 07:50:21 +0100
Hi,
I'm trying to create a custom button for one of my projects. It's a
Canvas, with a GdkPixbuf CanvasItem inside that can get the clicked
signal. Internally, it will also use the mouse_over signal to create a
saturated version of the button. (Much like the icons in the panel, but
stand-alone).
Here is what I get when I try out my test application:
Starting program: /home/hadess/devel/button-widget/./dial_test
Program received signal SIGSEGV, Segmentation fault.
0xf718974 in free () from /lib/libc.so.6
(gdb) backtrace
#0 0xf718974 in free () from /lib/libc.so.6
#1 0xfa0d4b8 in g_free () from /usr/lib/libglib-1.2.so.0
#2 0xfc135e4 in gtk_type_free () from /usr/lib/libgtk-1.2.so.0
#3 0xfbbc508 in gtk_object_destroy () from /usr/lib/libgtk-1.2.so.0
#4 0xfbbf14c in gtk_object_unref () from /usr/lib/libgtk-1.2.so.0
#5 0xfb9724c in gtk_layout_get_vadjustment () from
/usr/lib/libgtk-1.2.so.0
#6 0xfb97690 in gtk_layout_set_vadjustment () from
/usr/lib/libgtk-1.2.so.0
#7 0xff2315c in gnome_canvas_get_type () from /usr/lib/libgnomeui.so.32
#8 0xfc134a4 in gtk_type_new () from /usr/lib/libgtk-1.2.so.0
#9 0xff2358c in gnome_canvas_new_aa () from /usr/lib/libgnomeui.so.32
#10 0x10001648 in tictactoe_new (path=0x1000182c "play.png",
path_clicked=0x1000182c "play.png") at tictactoe.c:143
#11 0x10001178 in main (argc=1, argv=0x7ffff8f4) at ttt_test.c:31
I based my work on Owen's tictactoe example in the gtk+ tutorial, so
that explains the name of the files.
I attached the 3 files to this mail, hope it's not too big. Compile
with:
gcc -Wall -g -o ttt_test -I. ttt_test.c tictactoe.c `gnome-config
--cflags --libs gtk glib gnomeui gdk_pixbuf gnomecanvaspixbuf`
I didn't include the "play.png" file, just get any image file that you
rename to play.png.
If anybody can spot what is wrong, I'll be grateful. I have used my
forces for now, resorting to the subscribers of this list to give me the
enlightenment =)
Cheers
--
/Bastien Nocera
http://hadess.net
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]