GNOME Bugzilla – Bug 460194
Gtk tooltips + swt crash
Last modified: 2007-09-24 18:52:53 UTC
Steps to reproduce: In Eclipse / JBuilder 2007 1. Move around the toolbar bringing up tooltips 2. Tooltips appear fine 3. After a short period, the JVM crashes Stack trace: Stack: [0xbf8f5000,0xbfaf5000), sp=0xbfaf0880, free space=2030k Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code) C [libgtk-x11-2.0.so.0+0x2593dc] gtk_tooltips_set_tip+0x1dc C [libswt-pi-gtk-3236.so+0x38abf] Java_org_eclipse_swt_internal_gtk_OS__1gtk_1tooltips_1set_1tip+0x74 j org.eclipse.swt.internal.gtk.OS._gtk_tooltips_set_tip(II[B[B)V+0 j org.eclipse.swt.internal.gtk.OS.gtk_tooltips_set_tip(II[B[B)V+11 j org.eclipse.swt.widgets.Shell.setToolTipText(ILjava/lang/String;Ljava/lang/String;)V+142 j org.eclipse.swt.widgets.Control.setToolTipText(Lorg/eclipse/swt/widgets/Shell;Ljava/lang/String;Ljava/lang/String;)V+7 j org.eclipse.swt.widgets.Control.setToolTipText(Ljava/lang/String;)V+14 j org.eclipse.swt.custom.CTabFolder._setToolTipText(II)V+30 j org.eclipse.swt.custom.CTabFolder.onMouse(Lorg/eclipse/swt/widgets/Event;)V+771 j org.eclipse.swt.custom.CTabFolder$1.handleEvent(Lorg/eclipse/swt/widgets/Event;)V+248 Java frames: (J=compiled Java code, j=interpreted, Vv=VM code) j org.eclipse.swt.internal.gtk.OS._gtk_tooltips_set_tip(II[B[B)V+0 j org.eclipse.swt.internal.gtk.OS.gtk_tooltips_set_tip(II[B[B)V+11 j org.eclipse.swt.widgets.Shell.setToolTipText(ILjava/lang/String;Ljava/lang/String;)V+142 j org.eclipse.swt.widgets.Control.setToolTipText(Lorg/eclipse/swt/widgets/Shell;Ljava/lang/String;Ljava/lang/String;)V+7 j org.eclipse.swt.widgets.Control.setToolTipText(Ljava/lang/String;)V+14 j org.eclipse.swt.custom.CTabFolder._setToolTipText(II)V+30 j org.eclipse.swt.custom.CTabFolder.onMouse(Lorg/eclipse/swt/widgets/Event;)V+771 j org.eclipse.swt.custom.CTabFolder$1.handleEvent(Lorg/eclipse/swt/widgets/Event;)V+248 v ~C2IAdapter J org.eclipse.swt.widgets.EventTable.sendEvent(Lorg/eclipse/swt/widgets/Event;)V v ~I2CAdapter j org.eclipse.swt.widgets.Widget.sendEvent(Lorg/eclipse/swt/widgets/Event;)V+25 j org.eclipse.swt.widgets.Display.runDeferredEvents()Z+84 j org.eclipse.swt.widgets.Display.readAndDispatch()Z+33 Other information: Apologies if this is the wrong place to report this bug; I'm using ubuntu-gutsy and JBuilder 2007 (built on Eclipse). dpkg -l reports the following gtk components: ii gtk-qt-engine 1:0.8~svn-rev36-2ubuntu2 theme engine using Qt for GTK+ 2.x ii libgtk2.0-0 2.11.6-1ubuntu1 The GTK+ graphical user interface library ii libgtk2.0-bin 2.11.6-1ubuntu1 The programs for the GTK+ graphical user int ii libgtk2.0-common 2.11.6-1ubuntu1 Common files for the GTK+ graphical user int
I'm seeing the same issue here. Eclipse crashes when I move the mouse over the tabs for the open documents. # # An unexpected error has been detected by Java Runtime Environment: # # SIGSEGV (0xb) at pc=0x00002aaac66ca346, pid=22286, tid=1076017472 # # Java VM: Java HotSpot(TM) 64-Bit Server VM (1.6.0_02-b05 mixed mode) # Problematic frame: # C [libgtk-x11-2.0.so.0+0x240346] gtk_tooltips_set_tip+0x216 # # An error report file with more information is saved as hs_err_pid22286.log # # If you would like to submit a bug report, please visit: # http://java.sun.com/webapps/bugreport/crash.jsp # Using: x11-libs/gtk-2.11.6 dev-libs/glib-2.14.0 dev-java/swt-3.3_rc4
I guess eclipse tries to access tip_label and tip_window. Could somebody try if this still crashes with latest trunk?
I rebuilt the svn snapshot from scratch and put the libs into /usr. It still crashes. I even restarted X11 to verify that it's not the old version.
Created attachment 95260 [details] [review] Patch for gtktooltips.c against r18587
Comment on attachment 95260 [details] [review] Patch for gtktooltips.c against r18587 Adding a check for tooltipsdata in gtktooltips.c solves the crash with Eclipse.
Could you please attach a patch created with diff -up?
Can anybody tell what eclipse is exactly doing here? In trunk active_tips_data is never set to something else than NULL, so that if branch should never be entered. Of course it will be entered if Eclipse manipulates active_tips_data or something else...
Created attachment 95291 [details] [review] Patch -up for gtktooltips.c against r18587 I've attached the gtktooltips diff created with -up.
*** Bug 477388 has been marked as a duplicate of this bug. ***
with patch from c#8 Eclipse works OK for me. Could anybody commit this patch to trunc?
As I said in comment 7, I want to know what exactly is going on before I am going to apply patches ... Once I get the time I can look in the SWT/GTK source myself.
I guess this is the code in question ? http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.swt/Eclipse%20SWT/gtk/org/eclipse/swt/widgets/ToolTip.java?revision=1.14&view=markup
It can't be patched in Eclipse anyway since this exclusively affects old builds. All the new Eclipse builds (3.3 Europa) seem to work just fine. Unfortunately, some of us have to use old builds. I don't see what's objectionable to adding a NULL check for a variable just before it's going to be used. Since that codepath can apparently be traversed by the host application.
I've actually been getting almost immediate crashes with Eclipse 3.3 (Europa), and I was waiting to see whether it was this tooltip issue or not (I've tried that patch and it didn't fix my problem, so it suggests I've got a different one). Could someone else please confirm whether Eclipse 3.3 breaks/works for them using the latest gtk+? Depending on the answer I'll go file a separate bug. Thanks... 5:)
The patch makes sense to me, anyway. Kris, there are already NULL checks in other parts of the same function.
(In reply to comment #14) > I've actually been getting almost immediate crashes with Eclipse 3.3 (Europa), > and I was waiting to see whether it was this tooltip issue or not (I've tried > that patch and it didn't fix my problem, so it suggests I've got a different > one). > > Could someone else please confirm whether Eclipse 3.3 breaks/works for them > using the latest gtk+? Depending on the answer I'll go file a separate bug. > Thanks... 5:) > i had the same problem ... see my bugreport on gentoo bugzilla .. http://bugs.gentoo.org/show_bug.cgi?id=192310
(In reply to comment #12) > I guess this is the code in question ? > > http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.swt/Eclipse%20SWT/gtk/org/eclipse/swt/widgets/ToolTip.java?revision=1.14&view=markup > I think so and as I expected they are directly modifying the value of active_tips_data. So yeah, the patch kinda makes sense to me too at this stage.
Committed r18864. Mike: if you are still experiencing your "different problem", please open a new bug for it ;) Thanks!
Kris, we've tracked it down to a bug-buddy gnome-breakpad issue. It revolves around Java sending out SIGVs which it then catches itself, only now bug-buddy catches them too, which causes java to actually crash. There's more on the bug report Florian pointed out (which links off to an opensolaris bug). I was waiting to see if one of the earlier reporters would file the bug, but since nobody seems to have, I've just made bug 479929.