Re: [gtk-list] Re: sigsegv on gtk_signal_connect
- From: Matt Hoffman <mhoffman earthlink net>
- To: gtk-list redhat com
- Subject: Re: [gtk-list] Re: sigsegv on gtk_signal_connect
- Date: Wed, 08 Jul 1998 12:32:16 +0000
Tim Janik wrote:
> On Tue, 7 Jul 1998, Matt Hoffman wrote:
>
> > Any suggestions as to why I get a SIGSEGV when calling
> > gtk_signal_connect? This is happening while trying to run
> > the example programs in the tutorial.
>
> you are most likely passing an invalid widget pointer into this function.
> do you have an example snippet?
>
> >
> > thanks,
> > matt
> >
>
> ---
> ciaoTJ
>
> --
> To unsubscribe: mail -s unsubscribe gtk-list-request@redhat.com < /dev/null
I am trying to run helloworld (&others) from the gtk+-1.0.4 tutorial.
I also have gtk-0.99.970925-3 and gtk-devel-0.99.970925-3 installed on this
machine under /usr and gtk+-1.0.4 under /usr/local
gtk-config is using:
-L/usr/local/lib -L/usr/X11R6/lib -lgtk -lgdk -lglib -lXext -lX11 -lm
-I/usr/local/lib/glib/include -I/usr/local/include -I/usr/X11R6/include
am I somehow using some of the 0.99 library stuff with the 1.0.4?
here is some of the code and what gdb tells me.
int main (int argc, char *argv[])
{
/* GtkWidget is the storage type for widgets */
GtkWidget *window;
GtkWidget *button;
/* this is called in all GTK applications. arguments are parsed from
* the command line and are returned to the application. */
gtk_init (&argc, &argv);
/* create a new window */
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
/* when the window is given the "delete_event" signal (this is given
* by the window manager (usually the 'close' option, or on the
* titlebar), we ask it to call the delete_event () function
* as defined above. The data passed to the callback
* function is NULL and is ignored in the callback. */
gtk_signal_connect (GTK_OBJECT (window), "delete_event",
<== stops here
GTK_SIGNAL_FUNC (delete_event), NULL);
gdb output:
file hello_world
(xxgdb) run
Program received signal SIGSEGV, Segmentation fault.
0x8048890 in main (argc=1, argv=0xbffffd14) at helloworld.c:54
Thanks ,
Matt
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]