Re: [gtk-list] Re: Killing Widgets: simple source




> so we can get a full stack trace and understand your problem.

	I have to second Mr INTERLOG (or is it ACCOUNT?)
	Not sure, but I think it's a mistake in the tutorial. If you try the
first hello-world in the tutorial I have, you will find this (I think you know
the full code ;-):

void destroy (GtkWidget *widget, gpointer *data)
{
    gtk_main_quit ();
}
int main (int argc, char *argv[])
{
[...]
gtk_signal_connect (GTK_OBJECT (window), "destroy";,
                        GTK_SIGNAL_FUNC (destroy), NULL);
[...]
}

	So, this, if I call the destroy from Afterstep (middle button on tiotle
bar, then select destroy), makes :
chouchen:~/test-gtk$ hello

** ERROR **: an x io error occurred
IOT trap/Abort (core dumped)

chouchen:~/test-gtk$ gdb hello core
GDB is free software and you are welcome to 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.
GDB 4.16 (i486-slackware-linux),
Copyright 1996 Free Software Foundation, Inc...
Core was generated by `hello'.
Program terminated with signal 6, IOT trap/Abort.
Reading symbols from /usr/local/lib/libglib.so.1...done.
Reading symbols from /usr/local/lib/libgdk.so.1...done.
Reading symbols from /usr/local/lib/libgtk.so.1...done.
Reading symbols from /usr/X11R6/lib/libX11.so.6...done.
Reading symbols from /usr/X11R6/lib/libXext.so.6...done.
Reading symbols from /lib/libm.so.5...done.
Reading symbols from /lib/libc.so.5...done.
Reading symbols from /lib/ld-linux.so.1...done.
#0  0x401643c5 in __kill ()
(gdb) where
#0  0x401643c5 in __kill ()
#1  0x4014d39d in gsignal ()
#2  0x4001b5dc in gdk_x_io_error (display=0x8049dd0) at gdk.c:2667
#3  0x400c22a5 in _XIOError ()
#4  0x400c0370 in _XRead ()
#5  0x400c00cb in _XEventsQueued ()
#6  0x400b676e in XPending ()
#7  0x40018bfe in gdk_events_pending () at gdk.c:504
#8  0x40054de5 in gtk_main_iteration () at gtkmain.c:408
#9  0x40054ab9 in gtk_main () at gtkmain.c:408
#10 0x8048ba2 in main (argc=1, argv=0xbffffc20) at hello-world.c:91
#11 0x80488ce in ___crt_dummy__ ()
(gdb) quit
chouchen:~/test-gtk$


	So probably just a mistake in the tutorial that makes a bad call of the
exit functions, or I missed something? (Always remember that I'm a mssing
expert...).

	I understand for gtk_exit :
chouchen:~/test-gtk$ grep gtk_exit !$
grep gtk_exit /usr/local/include/gtk/*.h
/usr/local/include/gtk/gtkmain.h:void      gtk_exit      (gint   error_code);


but for gtk_main_quit...

chouchen:~/test-gtk$ grep gtk_main_quit !$/*.h
grep gtk_main_quit /usr/local/include/gtk/*.h
/usr/local/include/gtk/gtkmain.h:void      gtk_main_quit         (void);


					Happy Xmas ;-).
							Francois.


P.S.: if this helps :
chouchen:~/test-gtk$ uname -a
Linux chouchen 2.0.32 #3 Tue Nov 25 12:52:49 MET 1997 i586

and gtk+-971201

-- 
Francois Jeanmougin     | groupe de bioinformatique / bioinformatics groupe
tel:(+33) 3 88 65 32 71 | IGBMC BP 163 67404 Illkirch France
e-mail: jeanmougin@igbmc.u-strasbg.fr
"Ce sont des desespoirs d'intellectuels ennuyes, ou des ennuis 
d'intellectuels desesperes, comme vous voulez, comme vous voulez" M. Benin



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]