Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 389491 - [Win32] Screen turns black when moving tabs
Summary: [Win32] Screen turns black when moving tabs
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 4.3   Edit
Hardware: PC Windows All
: P3 normal with 10 votes (vote)
Target Milestone: 4.3 RC1   Edit
Assignee: Silenio Quarti CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 325100 396486 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-09-13 06:59 EDT by Lucas Werkmeister CLA
Modified: 2015-03-18 18:17 EDT (History)
18 users (show)

See Also:
markus.kell.r: review+


Attachments
A screenshot of the bug. Please view in fullscreen. (61.29 KB, image/png)
2012-09-13 06:59 EDT, Lucas Werkmeister CLA
no flags Details
Only half the screen turns black. Tab location marker is still drawn in black area. (280.57 KB, image/png)
2012-09-13 07:00 EDT, Lucas Werkmeister CLA
no flags Details
Another screenshot where only part of the window goes black. (325.59 KB, image/png)
2012-09-13 07:01 EDT, Lucas Werkmeister CLA
no flags Details
The whole screen except for the tab marker goes black (even the windows taskbar). (46.82 KB, image/png)
2012-09-13 07:02 EDT, Lucas Werkmeister CLA
no flags Details
fix (1.45 KB, patch)
2013-05-07 13:25 EDT, Silenio Quarti CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Lucas Werkmeister CLA 2012-09-13 06:59:58 EDT
Created attachment 221026 [details]
A screenshot of the bug. Please view in fullscreen.

Sometimes, when I move a tab (no matter from what window), the whole screen turns black - the only things that are still visible are the windows taskbar and the green "tab location" indicator. Sometimes it can happen that only part of the screen turns black (only witnessed one time, when filing this bug; will post screenshot as attachment 2 [details]). Sometimes it also can cover the whole screen, including the windows taskbar (also witnessed only one time, when filing this bug).
The black screen happens not always, but fairly often. It always disappears as soon as you "drop" the tab (release the mouse button), after which the window looks normal again.
I am running Windows 8 Release Preview (Build 8400) on a PC with an AMD Phenom (II) X4 970 Processor, 8 GB RAM, and a NVIDIA GeForce GTX 560. This graphics card is already known to cause problems with Firefox (https://bugzilla.mozilla.org/show_bug.cgi?id=686782), so it might be another problem of the NVIDIA driver and Windows 8.
My Java is:
java version "1.7.0_04"
Java(TM) SE Runtime Environment (build 1.7.0_04-b22)
Java HotSpot(TM) 64-Bit Server VM (build 23.0-b21, mixed mode)
If you need any more info, contact me.
Comment 1 Lucas Werkmeister CLA 2012-09-13 07:00:58 EDT
Created attachment 221028 [details]
Only half the screen turns black. Tab location marker is still drawn in black area.
Comment 2 Lucas Werkmeister CLA 2012-09-13 07:01:48 EDT
Created attachment 221029 [details]
Another screenshot where only part of the window goes black.
Comment 3 Lucas Werkmeister CLA 2012-09-13 07:02:29 EDT
Created attachment 221030 [details]
The whole screen except for the tab marker goes black (even the windows taskbar).
Comment 4 Ben Johnson CLA 2012-11-06 12:11:08 EST
I am observing the same behavior in Windows 7 x64.

When I attempt to reorder/rearrange editor tabs, the entire screen goes black for a split second about half the time.

I have noticed that if I pause for a moment after mousing-down on the tab and before attempting to drag said tab, the issue does not occur. In other words, to reproduce the issue, click the tab and drag it immediately after clicking.
Comment 5 Markus Keller CLA 2012-11-21 12:13:43 EST
(In reply to comment #4)
I see the same quick black flash of the entire screen (including Windows task bar) on Windows 7 in Eclipse 4.x , but not in 3.x.

I can always reproduce when I
- start dragging immediately after clicking the mouse, and
- drag an inactive view tab (either from a non-focused view stack or a tab that is stacked behind the active view).
Comment 6 Grant Gayed CLA 2012-11-22 15:49:38 EST
I've tried this on Windows 7 and Windows 8, running on the same machine.  I see the black flash (though it never stays black, unlike the OP) any time I mouse down and hold (no drag movement required) on a non-active view tab.
Comment 7 Markus Keller CLA 2012-11-23 07:20:04 EST
The flash happens in org.eclipse.swt.widgets.Tracker#open() on line 523 here:
    OS.ShowWindow (hwndOpaque, OS.SW_SHOWNOACTIVATE);

When I set Tracker#IsVista to false, then I don't see the flash, but I get the horrible tracker performance that the workaround fixes (e.g. when I open Quick Outline in the Java editor and then resize: Ctrl+O, Ctrl+F10, R).
Comment 8 David Wilson CLA 2012-12-05 14:02:38 EST
The only time this does not flash is if I activate an inactive tab, then drag it.  Any other combination (drag previously activated and moved tab, drag inactive tab), I get a split second black flash every time.  Win7_x64.
Comment 9 Dani Megert CLA 2012-12-13 05:52:41 EST
Changing the OS to 'Windows All' since it is not Windows 8 specific.
Comment 10 Dani Megert CLA 2012-12-13 05:52:49 EST
*** Bug 396486 has been marked as a duplicate of this bug. ***
Comment 11 Gonzague Reydet CLA 2013-03-05 09:52:10 EST
I also encounter this issue when Eclipse is running through a X-Win32 session.
Comment 12 Hironori Narushima CLA 2013-04-17 20:54:36 EDT
It's very stressful bug. very.
I can't touch inactive tab carefully. (but sometime touch and blacking, sick. why We can't fix it?)
Comment 13 Udo Walker CLA 2013-05-03 13:59:24 EDT
Does this bug relate to Bug 325100 ?
Comment 14 Markus Keller CLA 2013-05-03 14:39:31 EDT
> Does this bug relate to Bug 325100 ?

In both cases, the flashing happens with an SWT Tracker widget, but it's not clear whether a fix for one bug would also fix the other bug.
Comment 15 Silenio Quarti CLA 2013-05-07 13:25:43 EDT
Created attachment 230601 [details]
fix

The window flashes black because it is fully opaque until the first WM_PAINT event.  In WM_PAINT, it is filled with white which is the transparent color.

The fix is to only make it opaque after it has been drawn.
Comment 16 Silenio Quarti CLA 2013-05-07 13:26:58 EDT
Markus, please could you review this patch?
Comment 17 Markus Keller CLA 2013-05-07 15:09:19 EDT
(In reply to comment #15)
> Created attachment 230601 [details] [diff]
> fix

This is great! Code looks good, and fixes this bug as well as bug 325100.
Tested with all occurrences of Tracker in the SDK and SWT snippets.

+10 for RC1.
Comment 19 Silenio Quarti CLA 2013-05-07 15:31:38 EDT
*** Bug 325100 has been marked as a duplicate of this bug. ***
Comment 20 Nikolay Botev CLA 2013-05-07 22:34:38 EDT
Hi,

Would you also be willing to consider related bug 407749 for inclusion in 4.3 RC1?

The fix is simple and a patch is attached. I did this fairly quickly tonight inspired by the quick turnaround on the fix to this bug here.

Thanks,
Nikolay
Comment 21 Nikolay Botev CLA 2013-05-07 22:35:37 EDT
(In reply to comment #20)

That is bug 407479.

> Would you also be willing to consider related bug 407749
Comment 22 virtual eyes CLA 2013-06-16 13:10:33 EDT
Any chance this patch can get applied for Linux as well??

Getting exact same behavior that was affecting Windows users on Fedora 18 + Eclipse 4.3 RC4.

Or should I file a separate bug?

Thanks
Comment 23 Dani Megert CLA 2013-06-17 03:53:12 EDT
(In reply to comment #22)
> Any chance this patch can get applied for Linux as well??
> 
> Getting exact same behavior that was affecting Windows users on Fedora 18 +
> Eclipse 4.3 RC4.
> 
> Or should I file a separate bug?

Yes please. And post it here too.
Comment 24 Gonzague Reydet CLA 2013-07-01 04:55:14 EDT
I just tried the new Kepler release and I am sorry having to say that this issue is still present.
It is even worse as with Juno the screen turned black but with some kind of green rectangles delimiting the editor edge. Within Kepler the screen just turns blacks, now more rectangle to help in moving the editor at the proper place.

I am running Kepler on a RHEL 5 through a X-Win 32 session.

Should this bug be reopened?
Comment 25 Markus Keller CLA 2013-07-01 06:23:01 EDT
> Should this bug be reopened?

No, see comment 23. This bug was for Windows only. I don't see a similar bug for Linux, so you can open a new one and mention the other bug number in both bugs.
Comment 26 James Lang CLA 2013-12-10 03:56:17 EST
(In reply to Markus Keller from comment #25)
> > Should this bug be reopened?
> 
> No, see comment 23. This bug was for Windows only. I don't see a similar bug
> for Linux, so you can open a new one and mention the other bug number in
> both bugs.

Really? I filed the Linux version same day:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=414119

Hard to imagine a worse user experience: dragging tabs in Eclipse on Linux is so jarring to the eye that one actually has to look away, it's like a strobe light gone wrong ;-)
Comment 27 James Lang CLA 2013-12-10 04:01:00 EST
(In reply to James Lang from comment #26)
> (In reply to Markus Keller from comment #25)
> > > Should this bug be reopened?
> > 
> > No, see comment 23. This bug was for Windows only. I don't see a similar bug
> > for Linux, so you can open a new one and mention the other bug number in
> > both bugs.
> 
> Really? I filed the Linux version same day:
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=414119
> 
> Hard to imagine a worse user experience: dragging tabs in Eclipse on Linux
> is so jarring to the eye that one actually has to look away, it's like a
> strobe light gone wrong ;-)

Correction, Linux version of this bug was filed in late July, not same day. Regardless, Linux users are still plagued by this bug, please look into it.

Thanks!
Comment 28 Paul Atzberger CLA 2014-07-30 17:46:34 EDT
Eclipse screen flashes when moving tab.  White screen strobes.   Running under the Kubuntu 12.04 :  uname -a : Linux epsilon-laptop-kubuntu 3.2.0-67-generic #101-Ubuntu SMP Tue Jul 15 17:46:11 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
We use the -vm /usr/lib/jvm/jre1.7.0_65/bin/java.  

Very unfortunate bug rendering many operations in IDE sessions difficult to perform.
Comment 29 Rik Bartolini CLA 2015-03-18 11:43:41 EDT
Is it really fixed?

Eclipse for PHP Developers
Version: Luna Service Release 2 (4.4.2)
Build id: 20150219-0600

OS: Linux Mint

The above error is still there and when I move a tab every content on Eclipse disappears and the entire window turns to grey, and every window of the OS (e.g file manager, Pluma, etc.) blinks.
Comment 30 Markus Keller CLA 2015-03-18 18:17:14 EDT
(In reply to Rik Bartolini from comment #29)
> Is it really fixed?

Yes, this bug is really fixed (on Windows, see the "Hardware" field in this bug).

See bug 414119 for the Linux version.