Bug 285363 - [package explorer] Package Explorer has redraw issues on Windows 7
[package explorer] Package Explorer has redraw issues on Windows 7
Status: REOPENED
Product: Platform
Classification: Eclipse
Component: SWT
3.5
PC Windows 7
: P3 normal with 18 votes (vote)
: ---
Assigned To: Felipe Heidrich CLA Friend
:
: 308059 321207 350604 (view as bug list)
Depends on:
Blocks:
  Show dependency tree
 
Reported: 2009-08-01 10:47 EDT by Prashant Deva CLA Friend
Modified: 2013-11-08 06:56 EST (History)
34 users (show)

See Also:


Attachments
Package Explorer not redrawn (10.12 KB, image/png)
2009-08-01 10:47 EDT, Prashant Deva CLA Friend
no flags Details
screen shot (30.24 KB, image/jpeg)
2010-04-04 12:30 EDT, Rory S CLA Friend
no flags Details
screen shot (87.00 KB, image/jpeg)
2010-04-05 11:49 EDT, Rory S CLA Friend
no flags Details
screen shot (222.64 KB, image/jpeg)
2010-04-05 11:50 EDT, Rory S CLA Friend
no flags Details
screen shot (142.99 KB, image/jpeg)
2010-04-05 15:00 EDT, Rory S CLA Friend
no flags Details
Screenshot before minimize, showing editor state (275.75 KB, image/jpeg)
2010-04-22 12:44 EDT, William CLA Friend
no flags Details
Screenshot after minimize and restore, showing error state (237.30 KB, image/jpeg)
2010-04-22 12:49 EDT, William CLA Friend
no flags Details
Screen recorded after black area appear... (864.39 KB, application/octet-stream)
2012-02-16 04:54 EST, Beck Yang CLA Friend
no flags Details
Screenshot of blank Package Explorer (268.78 KB, image/png)
2013-11-08 06:27 EST, Manju Mathew CLA Friend
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Prashant Deva CLA Friend 2009-08-01 10:47:23 EDT
Created attachment 143215 [details]
Package Explorer not redrawn

In eclipse 3.5 on win 7 rc,  a lot of times when I switch back to the eclipse window, the package explorer view does not seem to refresh until I close and reopen it. 
Image attachment shows the issues.

In the instance of eclipse shown in the image attached, if i were to switch to the Outline View and back to Package Explorer, the view would display properly.

This problem seems to occur only for the Pkg Explorer view and not any other view.
Comment 1 Dani Megert CLA Friend 2009-08-03 03:07:40 EDT
Anything in .log? Can you also try using the Project Explorer or Navigator?
Comment 2 Markus Keller CLA Friend 2009-08-06 05:59:16 EDT
Moving to SWT. The Package Explorer doesn't do anything special regarding redraw, except for owner-drawn labels (but we have that in other views like Outline, Search, Hierarchy, ... as well).

In the Package Explorer view toolbar, I see an additional button (3 gray balls). Prashant, could you please also try to reproduce with a plain Eclipse SDK without third-party plug-ins?
Comment 3 Felipe Heidrich CLA Friend 2009-08-06 09:53:18 EDT
I've worked on Windows 7 quite a bit recently and never seen this problem.

Do you have steps to reproduce this problem ?
Comment 4 Bogdan Gheorghe CLA Friend 2009-09-01 10:00:21 EDT
Please reopen with requested information. Thanks!
Comment 5 Terry W CLA Friend 2010-03-18 20:46:13 EDT
When I maximize the editor, the left taskbar minimizes. When I then re-maximize the taskbar, the Package Explorer doesn't redraw except for the left-most 1/4 inch. When I move my mouse over that strip, the collapse/expand arrow(s) appear, but that doesn't refresh the rest of the pane. I've tried closing and restarting PackExp, but the only remedy is to restart Eclipse.

I can easily replicate the bug by simply doing it over again. I don't know of any other conditions that have to be met, aside from using Windows 7. I use Win7 Home Premium Edition. Also, it's "linked to editor", but I don't know if that has anything to do with the problem.
Comment 6 Rory S CLA Friend 2010-04-04 12:30:48 EDT
Created attachment 163785 [details]
screen shot

screen shot
Comment 7 Rory S CLA Friend 2010-04-04 12:31:23 EDT
Hi all, has this been solved?

I’ve experienced this issue myself with my recent fresh install of Windows 7 - ultimate edition.
Screen shot hopefully attached. In my case it happens often on minimize and maximise of the eclipse window. It also happens to the outline view on the far right.
Using latest version of Eclipse Java EE – 3.5.2 if I am not mistaken (downloaded file was: eclipse-jee-galileo-SR2-win32.zip)

Possible issues that could have led to this are:
•	I installed the 64 bit version of Windows 7.
•	I installed the 64 bit version of JAVA (jdk-1_5_0_22-windows-amd64.exe) Confused as to why it has AMD in the name but I decided to wing it (Even though my laptop has an Intel based CPU). Got an error message on start-up of eclipse which I move past by installing a 32 bit version of java (jdk-6u18-windows-i586.exe). So I assumed the 64 bit version was a bad move on my part. Makes sense as I believe Eclipse for windows and MyEclipse only comes in a 32 bit version.
•	Have changed my Windows background colour from the default eye frying white to a darker grey. (Would’ve liked to change everything to black, similar to my putty consoles but I assume that would wreak havoc.)
•	Installed MyEclipse on the side before I moved to plain eclipse. Both use separate workspaces but I’m not sure if they possibly share some sort of resource I’m not aware of.
•	Have multiple versions of JAVA installed as I said before. 1 x 64bit version as I said before in the “Program files\Java” folder (ver: 1.5.0.22) and 1 x 32 bit JRE version 6, and 1 x 32 bit JDK 1.6.0.18 both in the “Program files (x86)\Java” folder.

As far as I can remember i didn’t customized Windows 7 too much.

I installed an identical second laptop at work for a fellow developer recently; after my experience with the 64 AMD version of java I made better choices this time and as far as I recall installed the 32 bit versions only (will check with him when I next get the chance). Long story short, the problem seems not to occur on his laptop / dev environment. I dread the thought of reinstalling/config so I’m hoping for a quick fix.
Comment 8 Rory S CLA Friend 2010-04-04 13:25:59 EDT
Additional Notes:

• Problem can be fixed for that occurrence by triggering a redraw event of sorts i.e. dragging the horizontal scroll bar right and then back left again, or opening a new file (sometimes), or using the “link with editor” button to shift between open files enough as to trigger a redraw in the project explorer window.
• Problem doesn't seem to occur when the vertical scroll bar is present. In other words the Project Explorer view is full with say 3 projects all expanded so they pass over the max available view space and hence require a scroll bar. I can even see the redraw of all the views taking place on min and maximize of the eclipse window. Black and then wam … correct. Might be my system specs, although (Dell vostro 1720, 512 okish gfx card, 4 gig ddr2 800) makes me think otherwise.
• After a while of min and maximizing / opening files in the editor or playing with the project explorer view I find the problem is no longer reproducible for that session. I’ve not been developing much of late so I’ve not much else to comment on.

Rory
Comment 9 Prashant Deva CLA Friend 2010-04-04 13:30:20 EDT
since the problem seems to be occuring for  other people too and they are able to reproduce it, I am reopening this bug.
Someone in the eclipse team needs to fix this.
Comment 10 Rory S CLA Friend 2010-04-04 13:42:27 EDT
(In reply to comment #9)
> since the problem seems to be occuring for  other people too and they are able
> to reproduce it, I am reopening this bug.
> Someone in the eclipse team needs to fix this.

Happy to hear I'm not alone on this one. Hopefully I don't have to reinstall Win7.

Ror
Comment 11 Prashant Deva CLA Friend 2010-04-04 13:46:51 EDT
(In reply to comment #10)
> (In reply to comment #9)
> > since the problem seems to be occuring for  other people too and they are able
> > to reproduce it, I am reopening this bug.
> > Someone in the eclipse team needs to fix this.
> 
> Happy to hear I'm not alone on this one. Hopefully I don't have to reinstall
> Win7.
> 
> Ror

you definitely arent alone. i face issue all the time on win7 and reinstallation doesnt help :(
Comment 12 Felipe Heidrich CLA Friend 2010-04-05 09:29:55 EDT
I have 64bit Windows 7 Ultimate; 32bit ibm java 1.5; 32bit win32 eclipse 3.6 M6.

steps:
maximize java editor
restore package explorer view

I did that several times (vertical scrollbar visible and not visible, linked to editor mode on and off, etc). I could not reproduce the problem.

Are you sure you are not running the WPF port ?
Comment 13 Felipe Heidrich CLA Friend 2010-04-05 09:33:30 EDT
*** Bug 308059 has been marked as a duplicate of this bug. ***
Comment 14 Felipe Heidrich CLA Friend 2010-04-05 09:34:55 EDT
I also tried the steps from bug 308059:

1. maximize eclipse window
2. minimize eclipse window
3. restore eclipse window 

I tried that several times, it worked for me everytime.
Comment 15 Rory S CLA Friend 2010-04-05 11:47:45 EDT
Hi Felipe 

http://www.eclipse.org/downloads/download.php?file=/technology/epp/downloads/release/galileo/SR2/eclipse-jee-galileo-SR2-win32.zip

Above is the link to the eclipse version I downloaded; have never heard of the WPF port till you mentioned it (Previously used MyEclipse, which I have installed on the side at present for migration purposes).

Will attach some screen shots containing version info below this message, hopefully they help in some way.

Played with the IDE for about +30 minutes yesterday (minimizing, restoring etc.) and at some point the black project explorer issues went away. The only way I could get it back was to restart windows 7. Played with it again now after capturing the screenshot and +/- 3 minutes later I can't reproduce the problem again.

About to restart Windows, remove 64 bit java version and see what happens.

Rory
Comment 16 Rory S CLA Friend 2010-04-05 11:49:44 EDT
Created attachment 163809 [details]
screen shot
Comment 17 Rory S CLA Friend 2010-04-05 11:50:14 EDT
Created attachment 163810 [details]
screen shot
Comment 18 Felipe Heidrich CLA Friend 2010-04-05 12:17:00 EDT
Thanks Rory, would you be able to try with Eclipse 3.6 M6 
Please let me know if (and how) you can reproduce the problem with http://fullmoon/downloads/drops/S-3.6M6-201003121448/index.php
Comment 19 Rory S CLA Friend 2010-04-05 14:58:27 EDT
Using Eclipse 3.5.2 (eclipse-jee-galileo-SR2-win32.zip) and replacing JDK 1.5 (64 bit) for JDK 1.5 (32 bit) and adding JRE 1.5 ALmost seemed to fix the issue. Took about +/-20 minutes to reproduce the issue again :( but once again I had the black project explorer. I will compare my setup tomorrow to the other developer’s laptop I helped install.

Then tried the “Eclipse 3.6 M6” as you requested. Link you posted seems to be incomplete (missing "download.eclipse.org/eclipse/" in place of fullmoon), so downloaded from http://download.eclipse.org/eclipse/downloads/drops/S-3.6M6-201003121448/index.php instead.

Available downloads options were more numerous than I expected: “Eclipse SDK”, “Platform Runtime Binary”, “Platform SDK” all in 32 bit and 64 bit versions stood out. 

I have downloaded the Eclipse SDK 32 bit version (eclipse-SDK-3.6M6-win32.zip) hopefully that is ok for your test.

Took a while to download, but after a Windows restart the Eclipse SDK 3.6 M6 also gave me the black project explorer.

So steps to reproduce:

1)	Have a Windows 7 environment setup like mine (could still be something I am setting up outside of eclipse differently, as I mentioned the developers laptop I setup that is not having this issue)
2)	Download and extract Eclipse version using 7zip to a folder. (c:\tools\eclipse_3.6_M6\)
3)	Run eclipse.exe
4)	Choose a workspace location. (In my case this is on different truecrypted partition e:\projects\workspaces\eclipse_3.6_M6\), make this the default location for the workspace.
5)	Waited for new shiny eclipse screen to finish loading.
6)	Closed the “welcome / tutorial” tab
7)	Checked the JRE versions eclipse has discovered and is using in the eclipse preferences menu; seems to be using newer 1.6 which is expected.
8)	Imported an existing project. Noticed that the newer version of eclipse has hidden the JARs in my lib directory :) very nice and neat.
9)	Played around by expanding the folders of my project tree, open a couple of files, pressed the linked with editor button, max, min, restore, close files, and more random min, max and restoring and walla …. Problem reproduced. Then a couple minutes later… problem gone, and then back if I open my project tree a little more or something like that or restart windows and start fresh with a little bit of project tree opening.
10)	So far since posting I’ve not noticed the outline view having this issue again, but that could be due to my lack of dev work in the last 3 months.

Thanks for the idea.
Will attach a new picture below of newer version with black project explorer view.

Rory
Comment 20 Rory S CLA Friend 2010-04-05 15:00:03 EDT
Created attachment 163826 [details]
screen shot
Comment 21 Prashant Deva CLA Friend 2010-04-05 15:37:29 EDT
if i am correct you have to have the package explorer view(or any other view) open when you minimize eclipse and then when you maximize it you see the issue.

Yes it happens with the outline view too.
Comment 22 Terry W CLA Friend 2010-04-06 01:00:07 EDT
(In reply to comment #12)
> I have 64bit Windows 7 Ultimate; 32bit ibm java 1.5; 32bit win32 eclipse 3.6
> M6.
> 
> steps:
> maximize java editor
> restore package explorer view
> 
> I did that several times (vertical scrollbar visible and not visible, linked to
> editor mode on and off, etc). I could not reproduce the problem.
> 
> Are you sure you are not running the WPF port ?

I have a 64x Win7 Home Edition, and it doesn't redraw right at all for me. Furthermore, when I unmaximize the Eclipse app window, the Outline view goes all funky too, but corrects itself when I remaximize the app window.
Comment 23 Rory S CLA Friend 2010-04-06 06:54:51 EDT
Run out of ideas to try on this side.

The second developer at work has exactly the same laptop specs as I do. Same version of Windows 7, similar versions of java installed (including a 64 bit version), He had a JAVA_HOME environment variable which I didn’t, pointing to the 64 bit version of java. Both of us have use the java directory in the path variable. He has tweaked his eclipse layout a bit more but I can’t seem to reproduce this issue on his laptop (even after extracting a fresh copy of the older version of eclipse). 
On mine all I need to do is restart windows and the problem usually occurs soon after running eclipse. 

Something must be different on his setup... Will keep looking as I get time.
Comment 24 William CLA Friend 2010-04-21 14:22:47 EDT
I can reliably reproduce this by having the package explorer open and docked to the left and two java code editors side-by-side in a maximized window.  Then minimize and restore the window.  The package editor is now blacked out and won't redraw unless I adjust the width of the window a little.  Even if I then minimize and restore the package explorer, it remains in the error state.

Eclipse 3.5.2
Windows 7 Home Premium 64-bit
JRE 1.6.0_17 64-bit
Comment 25 Felipe Heidrich CLA Friend 2010-04-22 09:12:53 EDT
Can you attach a screenshot of eclipse right before you minimize the window ?
What part has the focus when you minimize eclipse ? (does it matter?)
Are the tree's expandos showing or hidden ? (does it matter ?)
the steps you have work for me.

Try going to the preference page, General -> Appearance and disable 'Use mixed fonts and colors for labels'. Can you still reproduce the problem ?
Comment 26 Dani Megert CLA Friend 2010-04-22 11:31:33 EDT
>the steps you have work for me.
Same here (I20100420-0800).
Comment 27 William CLA Friend 2010-04-22 12:44:51 EDT
Created attachment 165795 [details]
Screenshot before minimize, showing editor state
Comment 28 William CLA Friend 2010-04-22 12:49:27 EDT
Created attachment 165797 [details]
Screenshot after minimize and restore, showing error state
Comment 29 William CLA Friend 2010-04-22 12:53:00 EDT
(In reply to comment #25)
> Can you attach a screenshot of eclipse right before you minimize the window ?

Done.

> What part has the focus when you minimize eclipse ? (does it matter?)
> Are the tree's expandos showing or hidden ? (does it matter ?)

With the package explorer tree expanded, the package explorer was not redrawn after minimize regardless of where the focus is placed.  I tried the left editor, right editor, package explorer, and outline view docked on the right-side of the window.

Interestingly, when none of the trees in the package explorer were expanded, the package explorer *was* correctly redrawn after restore, again regardless of where the focus was placed. 

> the steps you have work for me.
> 
> Try going to the preference page, General -> Appearance and disable 'Use mixed
> fonts and colors for labels'. Can you still reproduce the problem ?

Disabling that setting made me unable to reproduce the issue.  Thanks!  I'm going to leave that turned off, especially since I can't determine a visible difference in the UI.
Comment 30 William CLA Friend 2010-04-23 11:04:39 EDT
(In reply to comment #29)
> > Try going to the preference page, General -> Appearance and disable 'Use mixed
> > fonts and colors for labels'. Can you still reproduce the problem ?
> 
> Disabling that setting made me unable to reproduce the issue.  Thanks!  I'm
> going to leave that turned off, especially since I can't determine a visible
> difference in the UI.

Well dang.  Now it's happening even with the 'Use mixed fonts and colors for labels' setting turned off.  Maximized window, package explorer tree expanded, doesn't matter where the focus is, changing the setting has no effect.
Comment 31 Felipe Heidrich CLA Friend 2010-04-26 12:35:04 EDT
William, can you reproduce the problem right after you start Eclipse ? Or do you need to 'use eclipse for awhile' before you get to a state where you reproduce the problem consistently ?
Please, try this build (or newer):
http://download.eclipse.org/eclipse/downloads/drops/I20100420-0800/index.php

Maybe this problem is also caused by bug 302396.
Comment 32 Spek CLA Friend 2010-04-28 04:44:03 EDT
Hi,
I have Windows 7 64 Enterprise and this problem happens to me with different versions of eclipse (3.4-32, 3.4-64, 3.5.2-64) with JRE 1.6.3-b01 64-bit.

I hope this helps:
I've noticed that this does not occur if the labels on the package explorer fit well on the container. I mean, if you resize the package explorer to avoid text to be truncated this refresh problem dissapears, so you can maximize the editor and restore anytime it's needed.

Regards,
Comment 33 Prashant Deva CLA Friend 2010-04-28 19:49:24 EDT
I also have had the same problem occur in 3.4 too.
Comment 34 Brett Randall CLA Friend 2010-04-28 23:27:39 EDT
I've managed to isolate this on my machine, Windows 7 Enterprise x64.  My video card is a NVIDIA Quadro NVS 160M.

*) With NVIDIA nView Desktop Manager v121.34 "Desktop Manager features" enabled, this can be reproduced consistently by minimizing and restoring the Eclipse IDE window.  Black panel can be fixed by restore/re-maximize.
*) With NVIDIA nView Desktop Manager disabled, cannot reproduce.

So for me this is probably associated with some particular modes/features of this graphics card.  I wonder if other reporters of this problem have the same video card and software installed / modes active.
Comment 35 Simon Ducharme Boutin CLA Friend 2010-04-29 01:14:40 EDT
(In reply to comment #34)
> I've managed to isolate this on my machine, Windows 7 Enterprise x64.  My video
> card is a NVIDIA Quadro NVS 160M.
> 
> *) With NVIDIA nView Desktop Manager v121.34 "Desktop Manager features"
> enabled, this can be reproduced consistently by minimizing and restoring the
> Eclipse IDE window.  Black panel can be fixed by restore/re-maximize.
> *) With NVIDIA nView Desktop Manager disabled, cannot reproduce.
> 
> So for me this is probably associated with some particular modes/features of
> this graphics card.  I wonder if other reporters of this problem have the same
> video card and software installed / modes active.

Hi,
     I've the same problem and I have an ATI 4870x2 videocard.

Thank you and have a nice day
Comment 36 Spek CLA Friend 2010-04-29 02:55:03 EDT
(In reply to comment #34)
> I've managed to isolate this on my machine, Windows 7 Enterprise x64.  My video
> card is a NVIDIA Quadro NVS 160M.
> 
> *) With NVIDIA nView Desktop Manager v121.34 "Desktop Manager features"
> enabled, this can be reproduced consistently by minimizing and restoring the
> Eclipse IDE window.  Black panel can be fixed by restore/re-maximize.
> *) With NVIDIA nView Desktop Manager disabled, cannot reproduce.
> 
> So for me this is probably associated with some particular modes/features of
> this graphics card.  I wonder if other reporters of this problem have the same
> video card and software installed / modes active.

I have an ATI too, 3450hd.
Comment 37 Rory S CLA Friend 2010-04-29 04:58:05 EDT
(In reply to comment #34)
> I've managed to isolate this on my machine, Windows 7 Enterprise x64.  My video
> card is a NVIDIA Quadro NVS 160M.
> 
> *) With NVIDIA nView Desktop Manager v121.34 "Desktop Manager features"
> enabled, this can be reproduced consistently by minimizing and restoring the
> Eclipse IDE window.  Black panel can be fixed by restore/re-maximize.
> *) With NVIDIA nView Desktop Manager disabled, cannot reproduce.
> 
> So for me this is probably associated with some particular modes/features of
> this graphics card.  I wonder if other reporters of this problem have the same
> video card and software installed / modes active.

Hi, I've got a Laptop with a NVIDIA GeForce 9600 GS. Dell based drives without NView from what I can tell.

Thanks
Comment 38 Vladimir Sizikov CLA Friend 2010-05-23 18:02:27 EDT
I'm having the same refresh problems in outline view on a very recent Eclipse:

Version: 3.6.0
Build id: I20100429-1549

I"m running Windows 7 x64 Ultimate, with the very latest JDK 6.0. Been having this problem for a year at least, on two Windows 7 machines. *VERY* annoying.

It is rather easy to reproduce for me: Start Eclipse, do some work, minimize, maximize, minimize, maximize, and bam, Outline View is black :(

Please, any hints?
Comment 39 Felipe Heidrich CLA Friend 2010-05-25 12:26:12 EDT
(In reply to comment #38)
> Please, any hints?

I really want to fix this problem, but without being able to reproduce this problem myself it is rather dificult for me to work on it.

Would you be able to help me ?
You would need to download SWT from the CVS (see http://www.eclipse.org/swt/cvs.php) and start self-hosting eclipse in debug mode.
Let me know if you have time to help me on this, I can send you more detailed instructions and code changes to try out. Thank you.
Comment 40 Wojciech Galanciak CLA Friend 2010-05-28 08:07:10 EDT
Hi Felipe,
I am using Windows 7 and fortunately (or maybe not) I am able to reproduce this problem. I will try to find some time to work on it and try to find the cause.
Comment 41 Wojciech Galanciak CLA Friend 2010-05-31 07:14:14 EDT
The problem is repeatable. It occurs only if there is vertical scrollbar in package explorer (and each common navigator, outline and some other too) in the custom-sized Eclipse window (not maximized). In all attached screenshots this vertical bar is visible. Black is the only that part of the view which is covered by this view in custom-sized window and the rest is gray (this is the reason why only part of the view is black).

Felipe, do you have any idea what can cause such problem?
Comment 42 Felipe Heidrich CLA Friend 2010-06-01 09:31:43 EDT
(In reply to comment #41)
> Felipe, do you have any idea what can cause such problem?

In Tree#WM_PAINT, find out if doubleBuffer is false and why (likely TVS_EX_DOUBLEBUFFER is set in the OS). 
Try to change the code so TVS_EX_DOUBLEBUFFER is never set in the OS, it is done in createHandle() by calling SendMessage with TVM_SETEXTENDEDSTYLE.

Other idea is in Tree#WM_VSCROLL, it has a fixScroll flag, make sure the flag is always false and try to reproduce the problem.

Thank you
Comment 43 Wojciech Galanciak CLA Friend 2010-06-08 04:35:02 EDT
(In reply to comment #42)
> In Tree#WM_PAINT, find out if doubleBuffer is false and why (likely
> TVS_EX_DOUBLEBUFFER is set in the OS). 
> Try to change the code so TVS_EX_DOUBLEBUFFER is never set in the OS, it is
> done in createHandle() by calling SendMessage with TVM_SETEXTENDEDSTYLE.

I changed the code (doubleBuffer is true) but it doesn't help.

> Other idea is in Tree#WM_VSCROLL, it has a fixScroll flag, make sure the flag
> is always false and try to reproduce the problem.

The same as in previous case, no change.

I have noticed that horizontal scrolling (even if there is no horizontal scrollbar in custom-sized and in maximized window) refresh view correctly. Vertical scrolling doesn't help.

Problem doesn't occur when there is a vertical scrollbar in both custom-sized and maximized windows.
Comment 44 Felipe Heidrich CLA Friend 2010-06-09 09:28:20 EDT
Okay, so the problem happens happens regardless if TVS_EX_DOUBLEBUFFER is set or not.
Go back to Tree#createHandle(), we are also setting OS.TVS_EX_FADEINOUTEXPANDOS when calling TVM_SETEXTENDEDSTYLE. Can you see if removing this flag fixes the problem ? 

What if you remove custom draw, does the problem happen ?
In the very beginning of Tree#_addListener(int, Listener) and add this code.
	switch (eventType) {
		case SWT.MeasureItem:
		case SWT.EraseItem:
		case SWT.PaintItem: {
			return;
		}
	}

When the tree is in the bad state, do you know if WM_PAINT messages are being sent ? (add a println() to Tree#WM_PAINT). If you resize the view does it fixes the drawing ?

Thank you
Comment 45 Wojciech Galanciak CLA Friend 2010-06-11 09:37:14 EDT
(In reply to comment #44)
> Okay, so the problem happens happens regardless if TVS_EX_DOUBLEBUFFER is set
> or not.
> Go back to Tree#createHandle(), we are also setting OS.TVS_EX_FADEINOUTEXPANDOS
> when calling TVM_SETEXTENDEDSTYLE. Can you see if removing this flag fixes the
> problem ? 

Doesn't fix the problem.

> What if you remove custom draw, does the problem happen ?
> In the very beginning of Tree#_addListener(int, Listener) and add this code.
>     switch (eventType) {
>         case SWT.MeasureItem:
>         case SWT.EraseItem:
>         case SWT.PaintItem: {
>             return;
>         }
>     }

Doesn't fix the problem.

> When the tree is in the bad state, do you know if WM_PAINT messages are being
> sent ? (add a println() to Tree#WM_PAINT). If you resize the view does it fixes
> the drawing ?

So when a tree is in bad state when I move a mouse over it there are WM_PAINT calls only when I move over the bar with triangles to expand projects. I see that this bar is in correct state cause I can expand and collapse projects but even when I am doing that the rest of tree is still in incorrect state.

> Thank you
Comment 46 Wojciech Galanciak CLA Friend 2010-06-11 09:54:42 EDT
About resizing window with broken tree, there are couple different behaviors, depends on action:

- when window is maximized and I press button in right top corner to back to normal size, the problem is fixed

- when window is maximized and I hold top title bar and drag it (it will cause that window is resized to normal size) tree is refreshed but there is no vertical scrollbar which should be displayed

- when window is half-screen maximized to left (by hold window and move it to screen edge) and I move it to the same state but to right part of screen tree is refreshed but there is no vertical scrollbar

- when window is half-screen maximized and I resize it, the problem is fixed
Comment 47 Dani Megert CLA Friend 2010-06-21 03:15:42 EDT
Maybe related to bug 317390?
Comment 48 Felipe Heidrich CLA Friend 2010-06-22 08:57:48 EDT
(In reply to comment #47)
> Maybe related to bug 317390?

It crossed my mind, but it is not.
I asked Wojciech  to remove the TVS_EX_FADEINOUTEXPANDOS flag and it didn't fix the bug (comment 45).

I really thought this was a problem with double buffering, but I could not prove that either (comment 43).

I know Windows 7 is retained graphics mode, I suspect that the tree draws while in a "bad" state (clipping nil or something). The pixels generate during this state are retained and the tree remains black till a full redraw happens.

We need to prove that, find out what causes the bad state happen or detect that the tree is in the bad state. Once we can detect the bad state we can decide on a fix (I think a old good redraw will do it).
Comment 49 Benji Smith CLA Friend 2010-07-17 13:07:47 EDT
I can confirm that this bug is still an issue in the Eclipse Helios Release (build id:20100617-1415). I'm running Windows 7 x64, on a Core2 Duo, with an Intel GMA 4500MHD graphics card. And even though I'm using a 64-bit OS, I have a 32-bit JDK and the 32-bit Eclipse build.

I experienced this same issue under Galileo, and I was really hoping it'd be fixed in Helios.

Every time I minimize and then restore Eclipse, the Package Explorer fails to redraw (unless the vertical scrollbar is active).

On a similar note, the Outline view is doing a similar thing. However, whereas the Package Explorer renders as a black box, the Outline renders as a white box.

Really hoping you guys figure this out soon and release a patch. It's extremely annoying.

Thanks!
Comment 50 Harsha CLA Friend 2010-07-23 07:39:21 EDT
Is there any patch for this reported issue? I installed the Helios last night on my Windows 7 Laptop and found to be disturbing.

Harsha
Comment 51 gnom1gnom CLA Friend 2010-07-26 05:24:49 EDT
I described this problem on Eclipse forum: http://www.eclipse.org/forums/index.php?t=msg&goto=531007&#msg_531007.

You may watch the sceen capture on how to reproduce this problem.

Hope this helps.
Comment 52 Felipe Heidrich CLA Friend 2010-07-29 08:55:21 EDT
*** Bug 321207 has been marked as a duplicate of this bug. ***
Comment 53 Erik Tittel CLA Friend 2011-01-14 07:52:32 EST
(In reply to comment #52)
> *** Bug 321207 has been marked as a duplicate of this bug. ***

(In reply to comment #50)
> Is there any patch for this reported issue? I installed the Helios last night
> on my Windows 7 Laptop and found to be disturbing.
> 
> Harsha

I still experience this issue on Helios 3.6.1 (SR1) with Win7, 64 Bit.

However when I maximize and restore the editor, the issue with not redrawing happens to package explorer and outline view. Sometimes only to one of them.
Comment 54 Glenview Jeff CLA Friend 2011-04-09 10:32:19 EDT
Happening here too.  Happens on both Win7 32 and 64 w/NVidia graphics card.
Comment 55 Stephan Wahlbrink CLA Friend 2011-05-09 06:29:09 EDT
The error still occurs in Eclipse 3.7 (I20110428-0848)...
Comment 56 Dani Megert CLA Friend 2011-07-05 02:48:08 EDT
*** Bug 350604 has been marked as a duplicate of this bug. ***
Comment 57 zeus andrade CLA Friend 2011-07-28 17:00:03 EDT
I can reproduce it on Indigo (Release Build id: 20110615-0604) and SpringSource Tool Suite (Version: 2.6.1.RELEASE, Build Id: 201105041000).

Steps to reproduce:
Open eclipse
In the package explorer expand any tree until a vertical scroll bar appears
Collapse the tree until the vertical scroll bar disappears
Minimize eclipse window
Maximize eclipse window
Comment 58 Philipp CLA Friend 2011-08-03 12:21:05 EDT
On my Win7 64bit I also observe the same redraw problems with Eclipse (Indigo, Build id: 20110615-0604)

I also have similar redraw problems with Chandler (http://chandlerproject.org/) which is AFAIK written in Python and uses wxPython (wxWidget wrapper), as well as with Adobe Acrobat 8.1.4.

Both other apps have problems when they are started in not maximized mode, and then are being maximized. 
I don't know if this is related, but thought it may be helpful.
Comment 59 Michael Rehberg CLA Friend 2011-09-12 02:37:58 EDT
Having the same issues here. 
(Windows 7 Business 64bit, using JDK 1.6 Update 27 (64bit))

(adding myself to cc)

rgds

Michael
Comment 60 beecub CLA Friend 2011-09-16 07:31:23 EDT
Same thing here. Windows 7, 64bit. JDK 1.7.0.
Build: 20110218-0911
Comment 61 Felipe Heidrich CLA Friend 2011-09-16 10:06:00 EDT
Can you guys try with our newest build ?
it is possible that the fix for bug355149 (fixed last week) has fixed this bug too.
Comment 62 Christian K. CLA Friend 2011-09-16 11:36:45 EDT
I was still able to reproduce the error (outline view is black) with:
Version: 3.8.0
Build id: I20110915-1308
Comment 63 Christian K. CLA Friend 2011-09-16 12:21:33 EDT
While experimenting with this issue I just found out that the behavior if the view is drawn correctly or not is also influenced by the non-maximized (restored) size of the Eclipse window. If I make the restored window very small re-draw issues are more likely to occur.

The reproduction steps in comment 57 alone don't seem to be sufficient, at least I was not able to reproduce the issue reliably with just the steps mentioned there.

I got the idea of fiddling with the restored window size by reading the description of bug 355149.

Also the redraw issues only occur when going from minimized to maximized. Going from restored to maximized works fine.

As a side note the re-draw issue does not always manifest itself by having a black box in the view the box might also have some other color, e.g. grey.
Comment 64 Christian K. CLA Friend 2011-09-19 06:06:05 EDT
After taking a closer look at the most recent build (I20110915-1308). It seems like the behavior has slightly changed. Originally the entire content area of the view was not redrawn correctly but now only the area that should be occupied by the horizontal scroll bar at the bottom of the view stays black.

Still the issue can only be reproduced with a certain restored window size where the views have a vertical scroll bar with the restored size and not in the maximized size.
Comment 65 Beck Yang CLA Friend 2012-02-16 04:54:46 EST
Created attachment 211091 [details]
Screen recorded after black area appear...

I cannot find the steps for reproduce the problem.
After black area appear, I record the screen by "Wink" and save the output to  attachment package_explorer_black_e362.swf. If the video is not clear enough, please let me know. I can upload the .wnk file saved by Wink(file size is 5MB)
Hope it is helpful...

Platform: Eclipse v3.6.2 on Windows XP SP2
eclipse.buildId=M20110210-1200
java.version=1.6.0_27
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=zh_TW
Command-line arguments:  -os win32 -ws win32 -arch x86
Comment 66 Rory S CLA Friend 2012-03-29 05:48:44 EDT
Since reinstall of "Indigo SR2 64 bit - Build id: 20120216-1857" 2 days ago problem has not returned. Could be a update / fix in Indigo, I just got lucky (nature of the problem to be weird and random), its coming back soon and I just don't know it, or I changed something as below.

Things I have changed (of little importance I'm sure)

* Moved from CVS to EGit (installed plugin). More correctly we are in the process of migrating some projects to EGit.
* Added "JAVA_HOME=C:\Program Files\Java\jdk1.6.0_23" - to environment variables
* Added "%JAVA_HOME%\bin" - to path environment variable
* Manually edited exported Ant/Run configurations using notepad++ to clear / neat Indigo entries.
* Re-created a fresh workspace, and created working sets for all projects which I imported into eclipse Package Explorer.
* Installed the following NEW plugins
  EGit + EGit Mylyn, Eclipse Colour themes (http://marketplace.eclipse.org/content/eclipse-color-theme)
* Changed "Colour theme" to use a black background - Theme name: Oblivion.
* Changed java default compiler, added 1.5 to installed JRA's
* added -vm flag to eclipse.ini to point to  1.6 64 bit java.
* added ssh key to eclipse and changed authentication order
* imported some more debug settings, unit test configs, etc etc.

That might be all I did.

Hope Indigo fixed this.

Regards
Rory
Comment 67 Rory S CLA Friend 2012-03-29 05:54:15 EDT
Previous post mistakes/typo's:

* Manually edited exported Ant/Run configurations using notepad++ to clear junk lines. i.e. old entries that no longer work because they point to directories that no longer exist. This happens due to eclipse export from MyEclipse to Eclipse for example. Probably also older versions of eclipse to newer versions

* Changed java default compiler, added 1.5 to installed JRE's not JRA's

Apologies
Rory
Comment 68 Manju Mathew CLA Friend 2013-11-08 06:27:37 EST
Created attachment 237306 [details]
Screenshot of blank Package Explorer

I have been encountering the blank Package Explorer for the 5th time today in the past one month. 
Today encountered the problem while using Eclipse Version: 4.4.0 Build id: I20131028-2000
I do not have the exact steps to reproduce the bug. It has happened mostly when the editor area is fully expanded and then when i restore the Package Explorer view it is blank. Just before the issue appeared i was viewing files opened from either JUnit View or Git Staging view and the Package Explorer view was in minimized state. There is nothing in the log which gives any lead.
Comment 69 Rory S CLA Friend 2013-11-08 06:56:47 EST
Am past this issue since a laptop upgrade.

Now using:

Windows 8 soon to be 8.1
Dell XP 1702x - which 3 gig GFX card and instead of the old forced Dell driver I have the latest Nvidia driver direct from Nvidia, which has solved so many of my graphics problems even with other programs (i.e. virtualbox).

I've done nothing else to eclipse version, JDK etc. I did upgrade recently to latest eclipse and still the problem is gone on this new configuration.

So personally I'm writing this bug off to system config (drivers, setup, versions of something other than eclipse and JDK) I could be wrong and I might get this again in my next upgrade / reinstall but I suspect not.

Good luck all.