After some more toying around I found out that it only
appears to be the gtk_entry_new() function call that
causes problems.  The entry box in my main window is
somehow a null widget and when I spawn a new window
from double clicking on an item in the clist I get a
seg fault.  I have found that the seg fault happens
from the gtk_entry_new call.  The thing that really
bugs me is that I had some old compiled versions of my
program sitting around that I know for certain would
work and when I tried to execute them the same error
msgs came up as below.  Now mind you I did not compile
these old versions once I updated GCC, they are
exactly the same as they were when they were built, 2
weeks old.  Now, if I copy these old binarys over to
another linux computer I have running slackware 8.1
and execute them they run perfectly without any
problems.  They are exactly the same as the files on
my main computer that will not run correctly. 
Obviously something with gtk/libs/deps must be messed
up but I cannot figure it out.  I installed the newest
1.2.10 Gtk and the glib 1.2.10.  I also stepped back a
version in GCC to 3.2.1  but none of this helped.  I
am currently running slackware 8.1 w/gtk1.2.10,
glib1.2.10, and gcc 3.2.1.  If ANYONE has some
suggestions please let me know.  If you need any more
info about my system also ask.

Thanks guys!
David Swiston

--- David Swiston <skyrat_backup23 yahoo com> wrote:
> Hello all.  I recently got an itch to update GCC
> from
> 2.9.5 to 3.2.2.  In doing so I have ran across a few
> problems.  After changing over from the deprecated
> headers I got my program to compile fine, however
> when
> executing it an entry box causes these errors msgs:
> Gtk-CRITICAL **: file gtkwidget.c: line 2728
> (gtk_widget_event): assertion `GTK_IS_WIDGET
> (widget)'
> failed.
> Gtk-CRITICAL **: file gtkwidget.c: line 2728
> (gtk_widget_event): assertion `GTK_IS_WIDGET
> (widget)'
> failed.
> Gtk-CRITICAL **: file gtkwidget.c: line 2386
> (gtk_widget_size_request): assertion `GTK_IS_WIDGET
> (widget)' failed.
> and some more just like these.  These error msgs
> appear right after the program is executed without
> any
> user interaction.  All that is done is the main is
> executed and a window is drawn.  Non of the other
> widgets in the window complain, I have some pixmaps,
> a
> scrolledwindow, a clist, two buttons, and some
> boxes. 
> I did not touch the functions that the creating of
> the
> window resides in.   In addition, I randomly get the
> same errors when I open other windows from a double
> click on the clist and or close them after they are
> created.  Anyone have any ideas?  I thought it MAY
> have been some linking/out-of-date deps/libs so I
> downloaded newer versions of pango/atk/glib and
> compiled them with the new GCC however that has not
> helped.  If anyone has some ideas please share.
> Here is a snippet of code where I create the entry
> box
> that gives me an error everytime:
> entry1 = gtk_entry_new_with_max_length(15);
> //This is a function that I made to check if the var
> is in fact a widget
> //It returns GTK_IS_WIDGET()
> std::cout << isWidget(entry1);
> gtk_widget_ref (entry1);
> gtk_object_set_data_full (GTK_OBJECT (window1),
> "entry1", entry1,  
>                             (GtkDestroyNotify)
> gtk_widget_unref);
> gtk_widget_set_usize (entry1, 75, 0);
> gtk_box_pack_start (GTK_BOX (hbox2), entry1, TRUE,
> TRUE, 0);
> gtk_entry_set_text (GTK_ENTRY (entry1), ("Enter
> IP"));
> gtk_widget_show (entry1);
> Again, this code always gives the error, when its
> commented out the error disappears and so does the
> entry box! =)   Also I get spuratic similar errors
> for
> other windows once created through user interaction.
> Thanks guys,
> David Swiston
> __________________________________________________
> Do you Yahoo!?
> Yahoo! Tax Center - forms, calculators, tips, more

Do you Yahoo!?
Yahoo! Tax Center - forms, calculators, tips, more

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