Hi, After help on this list, I got my API documentation to work properly, and have since added GObject-Introspection annotations so that I could use it from perl.
When running the following script: --- use Glib::Object::Introspection; Glib::Object::Introspection->setup( basename => "Joy", version => "1.0", package => "Joy"); my $stick = Joy::Stick->open("/dev/input/js0"); if(!$stick->get("open")) { print("Joystick could not be opened.\n"); exit 0; } print "Joystick " . $stick->describe() . " has " . $stick->get_button_count() . " buttons and " . $stick->get_axis_count() . " axes\n"; --- then the output is: Joystick Logitech Inc. WingMan Gamepad Extreme has 10 buttons and 4 axes GLib-GObject-CRITICAL **: g_object_get_qdata: assertion 'G_IS_OBJECT (object)' failed during global destruction. GLib-GObject-CRITICAL **: g_object_steal_qdata: assertion 'G_IS_OBJECT (object)' failed during global destruction. GLib-GObject-CRITICAL **: g_object_unref: assertion 'G_IS_OBJECT (object)' failed during global destruction. (or, when no joystick is present:) Joystick could not be opened. GLib-GObject-CRITICAL **: g_object_get_qdata: assertion 'G_IS_OBJECT (object)' failed during global destruction. GLib-GObject-CRITICAL **: g_object_steal_qdata: assertion 'G_IS_OBJECT (object)' failed during global destruction. GLib-GObject-CRITICAL **: g_object_unref: assertion 'G_IS_OBJECT (object)' failed during global destruction. This occurs because somehow, perl seems to have a higher reference count than does glib, causing it to deref the object when it's already been destroyed. I've been trying to figure out what the problem is, but so far without luck. Anyone know what's happening? Code is at https://github.com/yoe/libjoy Thanks, -- It is easy to love a country that is famous for chocolate and beer -- Barack Obama, speaking in Brussels, Belgium, 2014-03-26 _______________________________________________ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list