Re: [gtk-list] Re: problems upgrading from 0.99.8 to 1.0



On 15 Apr 1998, Owen Taylor wrote:

> The last few errors are the ones leak likely to be useful. As
> soon as GTK starts producing such warnings, it means something
> has gone drastically wrong. So you want to identify the portion
> of your code that first produces such warnings.
> 
I've tracked it down to the following line of code from one of my
constructors:

Fract_Gui::Fract_Gui(fractal * _fract): fract(_fract)
{
    gen_func = new Gtk_Entry;
                   ^^^^^^^^^ 

Fract_Gui inherits from Gtk_Window.

The following errors all appear to be associated with it:

** WARNING **: file gtkentry.c: line 1425 (gtk_entry_grow_text):
"GTK_IS_ENTRY (entry)"

** WARNING **: invalid class type `(unknown)' in cast to `GtkEditable'

** WARNING **: invalid class type `(unknown)' in cast to `GtkWidget'

** WARNING **: invalid class type `(unknown)' in cast to `GtkObject'

** WARNING **: file gtkobject.c: line 1519 (gtk_object_ref):
"GTK_IS_OBJECT (object)"

** WARNING **: file gtkobject.c: line 429 (gtk_object_sink):
"GTK_IS_OBJECT (object)"

** WARNING **: file gtkobject.c: line 1084 (gtk_object_get_data_by_id):
"GTK_IS_OBJECT (object)"

** WARNING **: file gtkobject.c: line 988
(gtk_object_set_data_by_id_full): "GTK_IS_OBJECT (object)"

> (Usually these warnings indicate that you are passing bad pointers
> into GTK, or pointers to freed memory.)
> 
> In general gtk-1.0 is quite compatible with earlier versions,
> so this problem probably indicates that something in your program
> is wrong. (Or possibly a new bug was introduced into GTK)
> 
> Without knowing what your program does, its quite hard to guess
> what could be wrong. You can go back and check the release
> announcements, for 0.99.9 and 0.99.10, which mention any potential
> incompatibilties. But as far as I recall, the only problems that
> should occur happen if you are creating your own widgets.
> 
Well, I did create a widget of my own, through subclassing with gtk--.
But that's how all of my gui stuff was created, by subclassing from
Gtk_Window.  I'm guessing that everything I've been doing would then 
classify as custom widgets.  I'm also guessing that the problem was
caused by one of the bugs fixed by 0.99.10, specifically the one with
respect to the initial bogus size.  

I've looked at the 0.99.10 announcement, and I don't think that I'm
assuming anything about the size of any widgets, but then again, I don't
know what else could be wrong.  The 0.99.10 announcement talks about
realize() and size_allocate() methods, which are something that I've not
had to deal with.

Thanks for the help.

-Brian



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