[Glade-users] libglade: please help: file gobject.c: line 1222 (g_object_get): assertion `G_IS_OBJECT (object)' failed



Hello,

I just almost finished building my user interface with glade, so I wanted to use
libglade to load it. So here we go, I use the example from the docs on my system
found in:

/usr/share/gtk-doc/html/libglade/libglade-notes.html

and figured out what arguments to pass with gcc, so it compiles fine, but
when I run it I get a segfault. Not sure whether I have a duplicate label, I
will check (and wish glade could check this for me from a menu).

Where is the problem likely to be, given my error message?

Thanks,

Neil

jdoe@fedoracore2 $ cat test.c
#include <gtk/gtk.h>
#include <glade/glade.h>

void some_signal_handler_func(GtkWidget *widget, gpointer user_data) {
  /* do something useful here */
}

int main(int argc, char *argv[]) {
    GladeXML *xml;

    gtk_init(&argc, &argv);

    /* load the interface */
    xml = glade_xml_new("filename.glade", NULL, NULL);

    /* connect the signals in the interface */
    glade_xml_signal_autoconnect(xml);

    /* start the event loop */
    gtk_main();

    return 0;
}
jdoe@fedoracore2 $ gcc -o test test.c `pkg-config --cflags --libs
gtk+-2.0 libglade-2.0`
jdoe@fedoracore2 $ ./test

(test:5626): GLib-GObject-CRITICAL **: file gobject.c: line 1222
(g_object_get): assertion `G_IS_OBJECT (object)' failed

(test:5626): GLib-GObject-CRITICAL **: file gobject.c: line 1222
(g_object_get): assertion `G_IS_OBJECT (object)' failed
Segmentation fault
jdoe@fedoracore2 $ 

Thanks,

Neil




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