GNOME Bugzilla – Bug 300174
GObject#removeEventHandler() causes crash.
Last modified: 2009-08-15 18:40:50 UTC
Distribution/Version: Fedora Core 4 Test 2 I've attached a simple file that causes the crash. I will paste a section: Gtk.init(args); Button button = new Button(); int id = button.addEventHandler("activate", "test", this); button.removeEventHandler(id); // <-- this causes the crash The crash also happens if I do: ButtonListener listener = new ButtonListener() { public void buttonEvent(ButtonEvent event) { System.out.println("test"); } }; button.addListener(listener); button.removeListener(listener); I've just used Button as an example here, but the problem happens with any subclass of GObject as far as I can see. I reproduced it with gij and jdk 1.5.0_02. CVS Head and libgtk-java 2.6.1.1. gij left the following message on the prompt: (java-gnome:5279): GLib-GObject-WARNING **: instance of invalid non-instantiatable type `(null)' (java-gnome:5279): GLib-GObject-CRITICAL **: g_signal_handler_disconnect: assertion `G_TYPE_CHECK_INSTANCE (instance)' failed I'm also attaching the .log file created by sun's jdk.
Created attachment 45131 [details] Simple file that causes the crash
Created attachment 45132 [details] Sun's jdk crash log
This issue has been resolved and checked into cvs. Your example now runs without errors.