On Mon, Nov 20, 2006 at 02:18:53PM +0530, Shyjumon N. wrote: > Can any body help me to find out why i am getting > segmentation fault for the following code. Because you never assign anything to windowa, so it is NULL when you test its state. Now, how you can find that out yourself in 10 seconds instead of writing e-mails to mailing lists: 1. compile it with -ggdb gcc option (Since you always use -ggdb during development, no action is necessary.) 2. ulimit -c unlimited (Since you always have this set during development, no action is necessary.) 3. run it toggling to window b Segmentation fault (core dumped) (Since you have already done this, no action is necessary.) 4. gdb HOW-IS-THE-EXECUTABLE-CALLED core 5. (gdb) backtrace Program terminated with signal 11, Segmentation fault. #0 0x000000000040144c in main (argc=1, argv=0x7fffa0ead448) at z.c:119 119 if (GTK_WIDGET_STATE (windowa) == GTK_STATE_NORMAL) So what's wrong with windowa? 6. (gdb) print windowa $1 = (GtkWidget *) 0x0 It's NULL. Was it that hard? Bloody no. Yeti -- Whatever. _______________________________________________ gtk-list mailing list gtk-list@xxxxxxxxx http://mail.gnome.org/mailman/listinfo/gtk-list