Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 354126 - Tooltips do not appear for any Eclipse icons
Summary: Tooltips do not appear for any Eclipse icons
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 4.2   Edit
Hardware: PC Linux-GTK
: P3 major (vote)
Target Milestone: 3.8 M4   Edit
Assignee: Silenio Quarti CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 357956 359830 362425 364237 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-08-08 07:26 EDT by Arun Thondapu CLA
Modified: 2011-12-06 08:59 EST (History)
15 users (show)

See Also:


Attachments
hs_err_pid24049.log (78.97 KB, text/plain)
2011-12-04 20:02 EST, Paul Webster CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Arun Thondapu CLA 2011-08-08 07:26:33 EDT
Build Identifier: I20110729-0200

I discovered while testing 4.2 M1 release that the tooltips were not appearing for any of the toolbar icons and even for icons in the various views.
I was testing on Ubuntu Linux 11.04 with GTK 2.24.

Reproducible: Always

Steps to Reproduce:
1. Launch Eclipse.
2. Hover mouse on any of the Toolbar icons.
3. Hover mouse on any of the view icons.
Comment 1 Remy Suen CLA 2011-08-08 08:03:46 EDT
And I guess it is fine for 3.8M1, correct?
Comment 2 Arun Thondapu CLA 2011-08-08 10:55:46 EDT
(In reply to comment #1)
> And I guess it is fine for 3.8M1, correct?

Yes it is fine for 3.8 M1.
Comment 3 Brian de Alwis CLA 2011-08-15 13:50:48 EDT
FWIW, tooltips appear with M20110810-2000 on MacOS X.
Comment 4 Remy Suen CLA 2011-09-16 13:06:29 EDT
*** Bug 357956 has been marked as a duplicate of this bug. ***
Comment 5 Remy Suen CLA 2011-09-16 13:07:02 EDT
Grant seems to think this might be a problem with SWT. Any ideas here?
Comment 6 Carolyn MacLeod CLA 2011-09-16 15:00:36 EDT
Grant said that the problem doesn't occur in the ControlExample, so I think he's saying that it's not an SWT problem. (At least, SWT's ToolItem.setToolTipText(String) appears to be working properly).

Grant and Arun saw it on Linux GTK. I see the problem on Solaris SPARC GTK. It doesn't happen on cocoa or Windows. So it appears to be related to GTK, and it only occurs in e4.

Is e4 Eclipse just being a good citizen and calling ToolItem.setToolTipText(String) for each tool item?
Or is something else going on, like fake (custom) tooltips made visible on MouseHover or something?

Note that on Solaris SPARC, in addition to tooltips not coming up at all, I see some additional weird tooltip behavior: tooltips coming up empty, tooltips flashing endlessly, or flashing once and disappearing... or trying to come up when the mouse crosses the border between tool items, i.e. where MouseLeave or MouseEnter events would occur.

Bog heroically says he'll take this one.  :)
Comment 7 Remy Suen CLA 2011-09-16 15:19:20 EDT
(In reply to comment #6)
> Grant said that the problem doesn't occur in the ControlExample, so I think
> he's saying that it's not an SWT problem.

Grant filed bug 357956 against Platform SWT originally and said "- the same build works fine on 64-bit Cocoa, so I'm assuming it's an swt issue".

Although yes, he also said "- these tooltips work fine in the Control Example, so presumably there's something special about the case in e4", so maybe it's a problem on the UI side.

> Is e4 Eclipse just being a good citizen and calling
> ToolItem.setToolTipText(String) for each tool item?
> Or is something else going on, like fake (custom) tooltips made visible on
> MouseHover or something?

We don't do this although we do call setToolTipText(String) once or twice every second. I don't know if this is an issue or not. Perhaps that explains the flashing behaviour that's exhibited on SPARC.
Comment 8 Carolyn MacLeod CLA 2011-09-16 15:29:56 EDT
> we do call setToolTipText(String) once or twice every second.

Hee hee - that's hilarious!  :)
Any idea why?
Comment 9 Remy Suen CLA 2011-09-16 15:35:17 EDT
(In reply to comment #8)
> > we do call setToolTipText(String) once or twice every second.
> 
> Hee hee - that's hilarious!  :)
> Any idea why?

It's what we use right now for making sure the tool items reflect the current state of the application.

Paul would know more about this.
Comment 10 Paul Webster CLA 2011-09-23 15:17:43 EDT
(In reply to comment #9)
> Paul would know more about this.

This might be caused by changing IEclipseContext/keybinding active contexts, causing a re-calculation (as the active contexts changed).  If that's the case, we probably need a "if getToolTip != newToolTip then setToolTip"

PW
Comment 11 Remy Suen CLA 2011-10-04 08:58:14 EDT
*** Bug 359830 has been marked as a duplicate of this bug. ***
Comment 12 Arun Thondapu CLA 2011-10-11 07:19:35 EDT
I just realized that the tooltips were in fact appearing if I hover for a long time (a minute or two generally) on the icons. So this seems more like a performance issue now.
Comment 13 Andrey Loskutov CLA 2011-10-30 06:52:13 EDT
*** Bug 362425 has been marked as a duplicate of this bug. ***
Comment 14 Andrey Loskutov CLA 2011-10-30 06:53:20 EDT
(In reply to comment #12)
> I just realized that the tooltips were in fact appearing if I hover for a long
> time (a minute or two generally) on the icons. So this seems more like a
> performance issue now.

Not sure. I've tried to wait but with no result => I can't see any tooltip.
Comment 15 Bryan Hunt CLA 2011-10-30 14:17:40 EDT
I noticed with 4.2M3 that if you start with the leftmost icon on the toolbar (New in my case) and slowly move the mouse to the right, the tooltips will appear.  If you mouse hover over a random toolbar icon, the tooltips do not appear.  This appears to be the case for views as well as the main toolbar.
Comment 16 Bryan Hunt CLA 2011-10-30 14:24:24 EDT
Also, the problem is not specific to Linux GTK.  I'm running on OS X Cocoa 64.
Comment 17 Stephan Herrmann CLA 2011-11-20 10:26:23 EST
*** Bug 364237 has been marked as a duplicate of this bug. ***
Comment 18 Stephan Herrmann CLA 2011-11-20 10:39:04 EST
Comming from bug 364237 two comments:

- I didn't expect this bug in the SWT bucket because the same
  swt versions work just fine in a 3.x setting on the same machine, hm?

- Classifying this bug as p3 / major sounds like a big understatement to me.
  With bugs like this 4.x cannot be perceived as a step forward, I'd say.
Comment 19 Carolyn MacLeod CLA 2011-11-20 15:01:17 EST
Paul or Eric or Remy, would you be able to help Bog out by narrowing this down to a JFace snippet, or perhaps try Paul's idea in comment 10? So far, it seems that it is not a Windows problem, but it has been seen on several Linux systems and OS X 64.
Comment 20 Thomas Schindl CLA 2011-11-21 03:03:45 EST
(In reply to comment #15)
> I noticed with 4.2M3 that if you start with the leftmost icon on the toolbar
> (New in my case) and slowly move the mouse to the right, the tooltips will
> appear.  If you mouse hover over a random toolbar icon, the tooltips do not
> appear.  This appears to be the case for views as well as the main toolbar.

Same for me.
Comment 21 Silenio Quarti CLA 2011-11-23 11:44:38 EST
Calling ToolItem.setEnabled() and ToolItem.setTooltipText() and ToolItem.setText() every half second is causing this problem. I added checks to run away when the values are the the same.

Fixed
http://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/?id=823cc6c2771fef0325da5857f1a25b2b047efde4
Comment 22 Stephan Herrmann CLA 2011-11-28 21:41:31 EST
(In reply to comment #21)
> Fixed
> http://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/?id=823cc6c2771fef0325da5857f1a25b2b047efde4

Shouldn't the target milestone read 4.2 M4 then?
Is there any I-build with this fix already that I could try?
Comment 23 Remy Suen CLA 2011-11-28 21:49:21 EST
(In reply to comment #22)
> Is there any I-build with this fix already that I could try?

Not yet, we usually tend to only have I builds on Tuesdays.
Comment 24 Paul Webster CLA 2011-12-04 20:01:45 EST
This causes SIGSEGV while running our tests.  I'll attach the hs_pid file.

PW
Comment 25 Paul Webster CLA 2011-12-04 20:02:31 EST
Created attachment 207892 [details]
hs_err_pid24049.log

snippet:

C  [libc.so.6+0x7da10]  strcmp+0x90

[error occurred during error reporting (printing native stack), id 0xb]

Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
j  org.eclipse.swt.internal.gtk.OS.strcmp(J[B)I+0
j  org.eclipse.swt.widgets.Shell.setToolTipText(JJLjava/lang/String;)V+85
j  org.eclipse.swt.widgets.Shell.setToolTipText(JLjava/lang/String;)V+4
j  org.eclipse.swt.widgets.ToolItem.setToolTipText(Lorg/eclipse/swt/widgets/Shell;Ljava/lang/String;)V+6
j  org.eclipse.swt.widgets.ToolItem.setToolTipText(Ljava/lang/String;)V+25
Comment 26 Bogdan Gheorghe CLA 2011-12-05 13:58:34 EST
I was able to reproduce this running the UI tests.

Fixed in master > 20111205
Comment 27 Arun Thondapu CLA 2011-12-06 07:41:14 EST
(In reply to comment #26)
> I was able to reproduce this running the UI tests.
> 
> Fixed in master > 20111205

Tooltips are working but the segmentation fault issue is still occurring.
I can consistently re-create the crash.
The most common crash scenario I have faced is this:
On any of the Eclipse views, hover over the close icon to see the tooltip 'Close' appear. Any mouse click anywhere after this sequence causes a crash for me.

I tested with 4.2 M4 build id I20111205-1810.
Comment 28 Paul Webster CLA 2011-12-06 07:49:24 EST
(In reply to comment #27)
> 
> I tested with 4.2 M4 build id I20111205-1810.

The fix made it into I20111205-2330

PW
Comment 29 Arun Thondapu CLA 2011-12-06 08:59:55 EST
(In reply to comment #28)
> The fix made it into I20111205-2330

Thanks Paul! I can confirm it works well with this build. Sorry for the confusion!