Re: gtk2 Segmentation faults



Michael Torrie <torriem cs byu edu> wrote:
> On Sun, 2002-03-17 at 15:39, Kristian Peters wrote:
> > 
> > Yes ok. That was copy'n'paste. Sorry for confusion. My fault. It's too late already. The program crashes between that two printf statements:
> > 
> > #include <stdio.h>
> > #include <gtk/gtk.h>
> > 
> > int main( int   argc,
> >           char *argv[] )
> > {
> >     GtkWidget *window;
> > printf("2\n");   
> >     gtk_init (&argc, &argv);
> > printf("1\n");   
> >     window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
> >     gtk_widget_show  (window);
> >     
> >     gtk_main ();
> >     
> >     return 0;
> > }
> > 
> > $ ./test 
> > 1
> > Segmentation fault
> > 
> > I tried the binary rpms from gtk.org and with them the program crashes _after_
> > 
> > GtkWidget *window;
> > 
> 
> But before the next statement?  If so that is *really* odd.

Argh !!!

It must be:

$ ./test 
2
Segmentation fault

Impossible ! I'll fetch some sleep now.

*Kristian

  :... [snd.science] ...:
 ::
 :: http://www.korseby.net
 :: http://gsmp.sf.net
  :..........................:



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