Re: gtk_widget_set_state



George Strauss <george s3i com> writes:

Hi,
I am working on the gui  to a simulation model using gtk and C++ and  I
was hoping someone could enlighten me as to what the following error
message means.

Gtk-CRITICAL **: file gtkwidget.c: line 3249 (gtk_widget_set_state):
assertion `widget != NULL' failed.

This is telling you that the widget variable passed into
gtk_widget_set_state is NULL, when an actual widget is expected.

The code doesn't easily lend itself to posting in this type of forum.
In a nutshell this occurs after an item is added to a tree.  The tree is
created of off a config file which is updated after each insertion and
removal.  This error only occurs when a third (and subsequent) level is
added to or removed from the tree.  What is the gtk tree trying to do
other than the obvious?  The gui works fine with this error,  but I
would much rather find out what is going on and the gtk documentation is
rather thin. Any help would be appreciated.


Are you ever calling this function?  If so, you should check it to be
sure that you aren't passing NULL in.  Another neat trick if that
doesn't work is to put the app in a debugger, break on g_log, and check
the back-trace.  You can see where your code is calling GTK+.

Thanks,
-Jonathan




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