Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 398046 - ToolTip takes a very long time to show when tooltip message is very long
Summary: ToolTip takes a very long time to show when tooltip message is very long
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 3.7.2   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: 4.3 M5   Edit
Assignee: Silenio Quarti CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 431302 (view as bug list)
Depends on:
Blocks:
 
Reported: 2013-01-13 22:01 EST by Qian Liang CLA
Modified: 2014-05-09 03:10 EDT (History)
4 users (show)

See Also:


Attachments
Sample code (8.59 KB, text/plain)
2013-01-13 22:01 EST, Qian Liang CLA
no flags Details
patch for 3.7.2 (6.64 KB, patch)
2013-01-21 15:19 EST, Silenio Quarti CLA
no flags Details | Diff
screenshot (524.34 KB, image/jpeg)
2013-01-25 10:43 EST, Silenio Quarti CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Qian Liang CLA 2013-01-13 22:01:34 EST
Created attachment 225547 [details]
Sample code

Create a ToolTip object, and set a very long text to its message. When we try to show this ToolTip, it takes a very long time. And during that time, there is no response for whole program. It seems to hang. But after tooltip finally shown, program will come back.
I attached the sample code in attachement.
Comment 1 Bogdan Gheorghe CLA 2013-01-15 17:52:27 EST
We put a fix for a similar problem (Bug 395464) but your example still fails with that change.
Comment 2 Silenio Quarti CLA 2013-01-21 15:05:10 EST
This is a bug in Window 7. Other applications also have this problem. Take a look at:

http://social.msdn.microsoft.com/Forums/en-US/windowsuidevelopment/thread/a5a95763-9f10-4640-9d32-afd050a60bb3/

This patch works around the problem:

http://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/?id=d3b70aad7149876ba42093794d2909bb52409b12
Comment 3 Silenio Quarti CLA 2013-01-21 15:19:53 EST
Created attachment 225910 [details]
patch for 3.7.2

Note that this patch also includes the fix for bug#395464.
Comment 4 ChunYan Zhang CLA 2013-01-23 01:08:24 EST
Hi Silenio, the hang issue has been resolved. But the patch has another problem. The tooltip will disappear quickly.

You can reproduce this problem with our sample code. When you hover that button, you can see the tooltip quickly disappear.

Could you help to take a look at it again? Thanks.
Comment 5 Silenio Quarti CLA 2013-01-23 09:56:58 EST
(In reply to comment #4)
> Hi Silenio, the hang issue has been resolved. But the patch has another
> problem. The tooltip will disappear quickly.
> 
> You can reproduce this problem with our sample code. When you hover that
> button, you can see the tooltip quickly disappear.
> 
> Could you help to take a look at it again? Thanks.

The sample works fine to me on 3.7.2 and 4.3 (with patch applied). Steps I use:

1) Run app and window show near to the top left corner of the screen.
2) Move mouse over button and leave it stead. The tooltip appears with the tip pointing where the mouse is. The tooltip stays up for about 5 seconds and then fades away.

Is there something different with your configuration or something missing on my steps?
Comment 6 ChunYan Zhang CLA 2013-01-24 04:57:16 EST
Hi Silenio, is it possible there are another codes not included the patch for 3.7.2? On 2 Winodws 7, we can see the long tooltip quickly disappear. Not last for 1 second. If the tooltip is not so long, it won't quickly disappear. 

Also I tried the sample code on Windows XP without any patch, the long tool tip is also quickly disappear. You can try that.
Comment 7 ChunYan Zhang CLA 2013-01-24 05:02:42 EST
What's your tooltip? Could you give us a screen shot for it? We set the tool tip as a very long text in the Sample code.
Comment 8 Silenio Quarti CLA 2013-01-25 10:43:49 EST
Created attachment 226112 [details]
screenshot

This is a the tooltip that shows for me running the attached Snippet.   I cannot reproduce your problem on WinXp and Windows7 running 3.7.2 with the patch applied and latest code.
Comment 9 ChunYan Zhang CLA 2013-01-30 00:51:21 EST
Hi Silenio, we just applied the patch for 3.7.2( https://bugs.eclipse.org/bugs/attachment.cgi?id=225910&action=diff). Is that correct? I found you also provided a git patch(http://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/?id=d3b70aad7149876ba42093794d2909bb52409b12). Which one is correct? Currently, we are using the patch for 3.7.2. Maybe the long tooltip disappear is caused by some different between our local changes and yours.
Comment 10 Silenio Quarti CLA 2013-01-31 16:36:14 EST
(In reply to comment #9)
> Hi Silenio, we just applied the patch for 3.7.2(
> https://bugs.eclipse.org/bugs/attachment.cgi?id=225910&action=diff). Is that
> correct? I found you also provided a git
> patch(http://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/
> ?id=d3b70aad7149876ba42093794d2909bb52409b12). Which one is correct?
> Currently, we are using the patch for 3.7.2. Maybe the long tooltip
> disappear is caused by some different between our local changes and yours.

The patch from comment#3 is for the R3_7_maintenance branch. The patch for comment#2 was released into master.

I was able to see the problem when I connected to your machine (Thanks).

The problem happens in your machine because the tooltip is taller than the screen. This causes the tooltip to be display under the mouse pointer which triggers the underlying code that hides it.  This is a bug in Window 7 itself.  I will investigate whether we can work around it.
Comment 11 ChunYan Zhang CLA 2013-03-05 00:07:44 EST
Hi Silenio, is there a possible available workaround in SWT Cocoa? Any updates about this bug? Thanks very much.
Comment 12 Silenio Quarti CLA 2013-03-13 15:23:45 EDT
Sorry, I have not been able to find any work around.
Comment 13 Brian de Alwis CLA 2014-04-03 11:08:54 EDT
*** Bug 431302 has been marked as a duplicate of this bug. ***