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



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'


A good way to find out where this is happening is to do this after calling
gtk_init():

  g_log_set_fatal_mask ("g_log_domain_glib", G_LOG_LEVEL_CRITICAL | G_LOG_LEVEL_WARNING);
  g_log_set_fatal_mask ("Gdk", G_LOG_LEVEL_CRITICAL | G_LOG_LEVEL_WARNING);
  g_log_set_fatal_mask ("Gtk", G_LOG_LEVEL_CRITICAL | G_LOG_LEVEL_WARNING);
  g_log_set_fatal_mask (NULL, G_LOG_LEVEL_CRITICAL | G_LOG_LEVEL_WARNING);


Then the warning messages cause an abort() and you can use gdb to find out
exactly where it happened.

(By the way, should the log domain names be standardized?)

Damon




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