Re: [gtk-list] Re: misleading error messages from style/set_name problems



In message <Pine.BSF.4.02A.9903190021110.14088-100000@zirx.pair.com>you write:
>
>On Fri, 19 Mar 1999, Paul Barton-Davis wrote:
>> I'm getting quite a few of these (glib-1.2.0, gtk+-1.2.0, Gtk---1.0.0)
>> 
>> Gtk-CRITICAL **: file gtkobject.c: line 1037 (gtk_object_get_data):
>>                                assertion `GTK_IS_OBJECT (object)' failed.
>> 
>> Gtk-WARNING **: invalid class type `gchar' in cast to `GtkObject'
>> 
>> These are *very* unhelpful messages. As best I can tell, they arise
>> from having used gtk_widget_set_name() with an argument that doesn't
>> resolve to a known style (i.e. an rc file says "widget FOO style BAR",
>> calling gtk_widget_set_name (FOO), but BAR isn't found). 
>> 
>
>Unlikely (but possible I guess). If a name doesn't resolve to a known
>style it's not an error, it just uses the default style.
>
>This kind of error often means "memory corruption," in particular "the
>supposed GtkObject is actually random garbage." Thus the type flag is
>wrong. So you might look for a bug like that.

I will, but having stepped all the way through it in gdb, certainly
the apparent cause of the error is the failure to find the named
style. I'm quite open to the possibility of memory corruption,
although if I just drop the gtk_widget_set_name()'s, nothing else goes
wrong and the messages go away.

--p



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