This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 142850 - Blank gray bar sometimes displayed at top of Projects window
Summary: Blank gray bar sometimes displayed at top of Projects window
Status: RESOLVED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Explorer (show other bugs)
Version: 6.x
Hardware: All All
: P4 blocker with 1 vote (vote)
Assignee: Stanislav Aubrecht
URL:
Keywords: RANDOM
: 154522 187891 191797 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-08-04 20:50 UTC by Jesse Glick
Modified: 2012-01-07 16:21 UTC (History)
6 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Screenshot (JDK 6, Ubuntu, Ocean L&F) (29.36 KB, image/png)
2008-08-04 20:51 UTC, Jesse Glick
Details
Project that exhibits the error. (27.88 KB, application/zip)
2011-10-25 23:35 UTC, MackSix
Details
Hierarchy dump while problem was visible (50.47 KB, text/plain)
2011-12-15 21:30 UTC, Jesse Glick
Details
Hierarchy dump after problem corrected by Page Down (48.51 KB, text/plain)
2011-12-15 21:36 UTC, Jesse Glick
Details
What has changed when the problem corrected itself (174.47 KB, image/png)
2011-12-19 20:38 UTC, Jaroslav Tulach
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jesse Glick 2008-08-04 20:50:05 UTC
In recent dev builds, oftentimes the Projects window shows a blank gray area at the top, above any project root node
that might be open. Not sure if reproducible, and can go away with a simple window refresh. I am guessing this is
related to recent asynchronous Nodes changes.
Comment 1 Jesse Glick 2008-08-04 20:51:01 UTC
Created attachment 66530 [details]
Screenshot (JDK 6, Ubuntu, Ocean L&F)
Comment 2 Jesse Glick 2008-08-04 20:51:20 UTC
Sorry, wrong component.
Comment 3 Jesse Glick 2008-09-22 15:27:17 UTC
Can still be observed sometimes, e.g. in 080919.
Comment 4 Jaroslav Tulach 2010-04-07 20:28:10 UTC
I've seen this too in Metal L&F. I have no clue what it is caused by.
Comment 5 Jesse Glick 2010-04-29 00:05:52 UTC
*** Bug 154522 has been marked as a duplicate of this bug. ***
Comment 6 Jaroslav Tulach 2010-06-23 07:23:55 UTC
*** Bug 187891 has been marked as a duplicate of this bug. ***
Comment 7 malfunction84 2010-07-16 14:53:49 UTC
Bug 154522 documents a case where the gray bar appears at the top of the Files window.

I've seen the gray bar in the Editor window too, below the editor tabs and Editor Toolbar but above the editor itself.  I've also seen it in the Projects window, as the original reporter did.  Both instances were in 6.9 (Build 201006101454).
Comment 8 malfunction84 2010-07-19 16:49:31 UTC
Please disregard the reported instance of this showing up in editor bar.  The gray bar I saw in the editor was the one which displays the tag hierarchy of the cursor position in an HTML document.  At the time, the cursor was outside any tags, so the bar was blank.
Comment 9 Jesse Glick 2010-08-25 15:14:05 UTC
Happens to me pretty regularly, so if some diagnostic can be applied I would be happy to know what it is.
Comment 10 Jaroslav Tulach 2010-08-25 18:31:19 UTC
I have unassigned myself from the bug as a signal that I don't know have expertise to find out what is wrong, someone who understands Swing has to look at the problem. Don't assign the bug to me, it is useless, I am not going to do anything with it.
Comment 11 malfunction84 2010-11-09 22:24:38 UTC
I recently saw this happen when switching Project groups.  I assume that triggers a redraw.
Comment 12 Jesse Glick 2010-11-16 17:37:15 UTC
*** Bug 191797 has been marked as a duplicate of this bug. ***
Comment 13 Jesse Glick 2010-11-20 14:22:35 UTC
Just observed at top of Maven Repositories window, so not likely anything specifically about the Projects window; perhaps some issue with BeanTreeView.
Comment 14 MackSix 2011-10-25 23:35:21 UTC
Created attachment 112430 [details]
Project that exhibits the error.

See video for how to reproduce with attached project.

Video: http://www.youtube.com/watch?v=msSJ0HAryRI
Comment 15 MackSix 2011-10-26 00:10:06 UTC
Product Version: NetBeans IDE Dev (Build 201110240600)
Java: 1.7.0_01; Java HotSpot(TM) Client VM 21.1-b02
System: Windows Vista version 6.0 running on x86; Cp1252; en_US (nb)
Comment 16 Stanislav Aubrecht 2011-10-26 10:11:46 UTC

*** This bug has been marked as a duplicate of bug 197514 ***
Comment 17 Jesse Glick 2011-10-26 21:48:28 UTC
Were you able to reproduce according to instructions from comment #14 and confirm that 07e9d09018bf fixes it? And if so, any clue why getPathBounds would be returning a rectangle with a negative height? (This sounds like a Swing bug.)
Comment 18 Stanislav Aubrecht 2011-10-27 06:36:27 UTC
(In reply to comment #17)
> Were you able to reproduce according to instructions from comment #14 and
> confirm that 07e9d09018bf fixes it? And if so, any clue why getPathBounds would
> be returning a rectangle with a negative height? (This sounds like a Swing
> bug.)

yes, i did reproduce it
i'm just guessing but it might have been root node which is set not to show in the tree.
Comment 19 Jesse Glick 2011-12-10 13:53:26 UTC
This does not seem to be fixed. Happened to me in 20111209-74a6d3d1f6af on 7u1 on Linux, Ocean L&F. Projects tab showed a one-row gray space above the root node for the one open project. As in bug #197514 comment #5, docking Files into its own mode fixed the rendering of Projects as a side effect.
Comment 20 Jesse Glick 2011-12-14 23:29:39 UTC
Happening frequently in my usual userdir, and has been observed in GTK L&F on 6u30 in a test userdir.
Comment 21 Jaroslav Tulach 2011-12-15 09:14:05 UTC
Try to generate AWT component hierarchy dump (Ctrl-Shift-F1). Hopefully it explains something.
Comment 22 Jesse Glick 2011-12-15 21:29:26 UTC
Just happened to me when opening a project group. (dev build, 7u2, Oneiric). Here is something of interest: I pressed Page Down, moving the selection from the first project in the group to the last, and suddenly the blank area disappeared (with the project nodes moving up one row). Will attach hierarchy dumps.
Comment 23 Jesse Glick 2011-12-15 21:30:01 UTC
Created attachment 114236 [details]
Hierarchy dump while problem was visible
Comment 24 Jesse Glick 2011-12-15 21:36:27 UTC
Created attachment 114237 [details]
Hierarchy dump after problem corrected by Page Down

Diffing to the previous dump, there are a few relevant changes (i.e. those inside ProjectTab.ProjectTreeView):

1. lastPaintPosition for ProjectTreeView and its JViewport changed from (0,18) to (0,0).

2. The y-position of the TreeView.ExplorerTree changed from 18 to 0.

3. An HtmlRendererImpl inside the CellRendererPane inside the ExplorerTree vanished.
Comment 25 Jaroslav Tulach 2011-12-19 20:38:33 UTC
Created attachment 114323 [details]
What has changed when the problem corrected itself

There were some changes in notifications UI, but they are likely unrelated.

However the wrong AWT hierarchy snapshot contains "HtmlRendererImpl" which is missing in corrected snapshot. TreeView$ExplorerTree is at position 18 on the wrong snapshot (explains why there is a gray area) - I am not sure if this can be related to present/missing HtmlRendererImpl class.

Swing related issue. Stando, do you have any comments?
Comment 26 Jesse Glick 2011-12-19 21:44:30 UTC
Yes, my guess was that the HtmlRendererImpl has a height of 18 pixels and is causing the problem; but I am unsure how this got added as a child. Maybe it is being added and then removed to set parent properties correctly for rendering, but the remove occasionally fails and so it does not get cleaned up? I tried to look through the cell rendering code in Swing but got lost.
Comment 27 Stanislav Aubrecht 2012-01-05 14:59:16 UTC
my guess is that the blank bar is caused by JTree.scrollRectToVisible() call with negative y value. pressing page down key changes the selection which means another scrollRectToVisible() call with corrected coordinates.

jesse, can you reproduce this?
Comment 28 Jesse Glick 2012-01-05 15:02:17 UTC
(In reply to comment #27)
> pressing page down key changes the selection

But note that changing the selection in other ways - e.g. Down arrow key - does not correct it. Just Page Down.

> can you reproduce this?

No, but it happens frequently.
Comment 29 Stanislav Aubrecht 2012-01-05 15:08:03 UTC
(In reply to comment #28)
> (In reply to comment #27)
> > pressing page down key changes the selection
> 
> But note that changing the selection in other ways - e.g. Down arrow key - does
> not correct it. Just Page Down.
> 
> > can you reproduce this?
> 
> No, but it happens frequently.

i can try overriding scrollRectToVisible in TreeView to refuse scrolling to negative coords. would you be willing to test the patch to see if the makes any difference?
Comment 30 Jesse Glick 2012-01-05 15:41:21 UTC
Well I have no way of knowing how long I would have to wait to see this happen, and I would rather not run patched builds indefinitely.

If you believe negative coords are the problem, and these ought to be invalid, then try just adding an assertion. If it never gets reported, then something else was the problem. If it does get reported in some dev build, you have confirmed your hypothesis and may be able to fix the bug.
Comment 31 Stanislav Aubrecht 2012-01-05 16:28:26 UTC
actually it seems that Jarda reintroduced this problem in #200865
so i've corrected his fix in core-main c49b31f59436. let's see if it helps
Comment 32 Quality Engineering 2012-01-07 16:21:30 UTC
Integrated into 'main-golden'
Changeset: http://hg.netbeans.org/main-golden/rev/c49b31f59436
User: S. Aubrecht <saubrecht@netbeans.org>
Log: #142850 - Blank gray bar sometimes displayed at top of Projects window (fixing patch for #200865)