After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 300174 - GObject#removeEventHandler() causes crash.
GObject#removeEventHandler() causes crash.
Status: VERIFIED FIXED
Product: java-gnome
Classification: Bindings
Component: GTK
mainline
Other Linux
: Normal critical
: ---
Assigned To: java-gnome bindings maintainers
java-gnome bindings maintainers
Depends on:
Blocks:
 
 
Reported: 2005-04-11 11:39 UTC by Ismael Juma
Modified: 2009-08-15 18:40 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Simple file that causes the crash (440 bytes, text/plain)
2005-04-11 11:40 UTC, Ismael Juma
Details
Sun's jdk crash log (16.22 KB, text/plain)
2005-04-11 11:41 UTC, Ismael Juma
Details

Description Ismael Juma 2005-04-11 11:39:11 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.
Comment 1 Ismael Juma 2005-04-11 11:40:40 UTC
Created attachment 45131 [details]
Simple file that causes the crash
Comment 2 Ismael Juma 2005-04-11 11:41:58 UTC
Created attachment 45132 [details]
Sun's jdk crash log
Comment 3 Jeffrey Morgan 2005-04-12 01:27:13 UTC
This issue has been resolved and checked into cvs.  Your example now runs
without errors.
Comment 4 Jeffrey Morgan 2005-04-12 01:27:35 UTC
This issue has been resolved and checked into cvs.  Your example now runs
without errors.