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 460194 - Gtk tooltips + swt crash
Gtk tooltips + swt crash
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: Other
unspecified
Other All
: Normal critical
: ---
Assigned To: gtk-bugs
gtk-bugs
: 477388 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2007-07-25 11:06 UTC by P W
Modified: 2007-09-24 18:52 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch for gtktooltips.c against r18587 (32 bytes, patch)
2007-09-10 08:46 UTC, Matthijs De Smedt
none Details | Review
Patch -up for gtktooltips.c against r18587 (368 bytes, patch)
2007-09-10 16:10 UTC, Matthijs De Smedt
none Details | Review

Description P W 2007-07-25 11:06:23 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
Comment 1 Christoph Brill 2007-08-17 08:23:48 UTC
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
Comment 2 Kristian Rietveld 2007-08-21 12:11:19 UTC
I guess eclipse tries to access tip_label and tip_window.  Could somebody try if this still crashes with latest trunk?
Comment 3 Christoph Brill 2007-08-21 23:47:48 UTC
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.
Comment 4 Matthijs De Smedt 2007-09-10 08:46:42 UTC
Created attachment 95260 [details] [review]
Patch for gtktooltips.c against r18587
Comment 5 Matthijs De Smedt 2007-09-10 08:52:46 UTC
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.
Comment 6 Kristian Rietveld 2007-09-10 09:53:51 UTC
Could you please attach a patch created with diff -up?
Comment 7 Kristian Rietveld 2007-09-10 13:08:26 UTC
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...
Comment 8 Matthijs De Smedt 2007-09-10 16:10:56 UTC
Created attachment 95291 [details] [review]
Patch -up for gtktooltips.c against r18587

I've attached the gtktooltips diff created with -up.
Comment 9 free.perception 2007-09-17 04:14:48 UTC
*** Bug 477388 has been marked as a duplicate of this bug. ***
Comment 10 free.perception 2007-09-17 06:01:35 UTC
with patch from c#8 Eclipse works OK for me.

Could anybody commit this patch to trunc?
Comment 11 Kristian Rietveld 2007-09-17 12:53:18 UTC
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.
Comment 13 Matthijs De Smedt 2007-09-23 09:49:30 UTC
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.
Comment 14 Mike Auty 2007-09-23 09:56:57 UTC
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:)
Comment 15 Matthias Clasen 2007-09-23 13:32:24 UTC
The patch makes sense to me, anyway. 
Kris, there are already NULL checks in other parts of the same function.
Comment 16 Florian Scandella 2007-09-23 13:39:53 UTC
(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
Comment 17 Kristian Rietveld 2007-09-23 13:45:42 UTC
(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.

Comment 18 Kristian Rietveld 2007-09-24 18:25:23 UTC
Committed r18864.


Mike: if you are still experiencing your "different problem", please open a new bug for it ;)  Thanks!
Comment 19 Mike Auty 2007-09-24 18:52:53 UTC
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.