GNOME Bugzilla – Bug 308430
JVM crashes when removing all listeners of a same type
Last modified: 2009-08-15 18:40:50 UTC
Version details: 2.6.2 Distribution/Version: Ubuntu 5.04 AMD 64 Create a widget and add any number of listeners of the same type. Remove the new added listeners one by one. As long as there is a listener in the widget everything is fine, but when the last listener is removed the JVM crashes. The listeners can be removed in any order the problem is when the last one is removed. I tried this with SUN's JVM and BEA JRockit JVM.
If I run `apt-show-versions | grep libgtk' I get: libgtk2.0-dev/unknown uptodate 2.6.4-0ubuntu3 libgtk2.0-bin/unknown uptodate 2.6.4-0ubuntu3 My version of Java-GTK came from http://ftp.acc.umu.se/pub/GNOME/sources/libgtk-java/2.6/libgtk-java-2.6.2.tar.gz As listed in http://java-gnome.sourceforge.net/cgi-bin/bin/view/Main/GetJavaGnome#Releases
Created attachment 48052 [details] Crash report from JRockit This is the output of the JRockit JVM crash.
Created attachment 48053 [details] Crash report from SUN JVM # # An unexpected error has been detected by HotSpot Virtual Machine: # The crash report from Sun's JVM # SIGSEGV (0xb) at pc=0x0000002ae6790a35, pid=17055, tid=182899713184 # # Java VM: Java HotSpot(TM) 64-Bit Server VM (1.5.0_03-b07 mixed mode) # Problematic frame: # C [libgobject-2.0.so.0+0x21a35] g_type_check_instance+0x15 # # An error report file with more information is saved as hs_err_pid17055.log # # If you would like to submit a bug report, please visit: # http://java.sun.com/webapps/bugreport/crash.jsp #
Created attachment 48054 [details] Test Case Test case that I use to have the JVM crash.
Thanks for reporting this and for providing a test case. When I ran the test case against CVS HEAD, it worked fine. However, when I ran it against the gtk-java-2-6 branch, I got the following warnings (but no crash): (java-gnome:17572): GLib-GObject-WARNING **: invalid (NULL) pointer instance (java-gnome:17572): GLib-GObject-CRITICAL **: g_signal_handler_disconnect: assertion `G_TYPE_CHECK_INSTANCE (instance)' failed This needs further investigation as I am not sure why HEAD behaves differently as the relevant files do not differ in any relevant way.
It turns out that this is a duplicate of a bug I reported a couple of months ago, http://bugzilla.gnome.org/show_bug.cgi?id=300174 . :) Anyway, Jeff forgot to backport the fix to the gtk-2-6 branch. I have done it now. Please re-open if you still see the problem. Thanks.