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 251592 - When expending nodes, empty icon is quickly displayed before disapearing
Summary: When expending nodes, empty icon is quickly displayed before disapearing
Status: RESOLVED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Outline&TreeTable (show other bugs)
Version: 8.0.2
Hardware: PC Windows 7
: P3 normal (vote)
Assignee: Martin Entlicher
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-04-02 13:43 UTC by jmborer
Modified: 2015-05-27 05:54 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Video of the issue (353.50 KB, application/octet-stream)
2015-04-14 15:28 UTC, jmborer
Details
Another video (1.70 MB, application/octet-stream)
2015-04-14 15:33 UTC, jmborer
Details
Another video (3.01 MB, application/octet-stream)
2015-04-14 15:44 UTC, jmborer
Details
sample app (27.57 KB, application/zip)
2015-05-19 19:25 UTC, jmborer
Details
Another version of the demo app (27.81 KB, application/zip)
2015-05-20 06:34 UTC, jmborer
Details

Note You need to log in before you can comment on or make changes to this bug.
Description jmborer 2015-04-02 13:43:15 UTC
I used OutlineView as replacement of TreeTableView. When you expand a node with many children, you can spot a default node with no name and the default "blank page" icon (the one you get when you don't provide an icon for a node) that quickly appears (a fraction of second) and disappears when the actual node are finally displayed.

I am using a ChildrenFactory.

I first thought of an issue with the "waiting" node, but when I added an artificial sleep in "createKeys" the "wainting" node was displayed, then replaced by the "default" node and then the children a displayed.

I then replaced with TreeTableView and could not observe this phenomenom. 

Even though it quickly disappears, this intermediary "default" node was spotted by the clients which complain about it. 

Product Version: NetBeans IDE 8.0.2 (Build 201411181905)
Updates: NetBeans IDE is updated to version NetBeans 8.0.2 Patch 1
Java: 1.8.0_20; Java HotSpot(TM) 64-Bit Server VM 25.20-b23
Runtime: Java(TM) SE Runtime Environment 1.8.0_20-b26
System: Windows 7 version 6.1 running on amd64; Cp1252; en_US (nb)
User directory: C:\projects\.netbeans\8.0
Cache directory: C:\projects\.netbeans\cache\8.0
Comment 1 Martin Entlicher 2015-04-07 06:32:23 UTC
I did not reproduce anything like that in OutlineView used in NetBeans IDE. I observed debugger's Variables view and did not see any default, blank page icons.

The renderer properties can be observed in
OutlineView.OutlineViewOutline.TranslatedTableCellRenderer.getTableCellRendererComponent() method, where I added some print-outs. I did not see any intermediate empty nodes there.

Can you please provide some sample implementation of OutlineView, which manifests the faulty behavior?
Comment 2 jmborer 2015-04-09 22:00:30 UTC
I will try to build a standalone example extracted from my project where I can observe this behavior.
Comment 3 jmborer 2015-04-14 15:28:47 UTC
Created attachment 153192 [details]
Video of the issue

Here is a screencast of the bug. Notice the blank folder icon when expanding a node the first time. One can see it better when several children are present.
Comment 4 jmborer 2015-04-14 15:33:38 UTC
Created attachment 153193 [details]
Another video

Not sure compression settings were configured properly. Here another better video.

Maybe something to do with the "Please wait" icon, even though I artificially added a delay during the construction of the nodes and then saw the waiting glass.
Comment 5 jmborer 2015-04-14 15:44:38 UTC
Created attachment 153194 [details]
Another video

Here with the hour glass. One can see that the blank folder still appears sometimes.
Comment 6 Martin Entlicher 2015-04-14 16:22:46 UTC
Thanks for the videos, I see the node with the empty icon there. But, it does not help much to discover where is the problem in the code. It's always best to have a reproducible test case. Some sample implementation, which manifests the problem. I've debugged Outline view implementation, which is used in Variables view, but did not detect such an empty node. The problem can be somewhere else (in Children implementation?), or it's possible, that it occurs only in some kind of usage. Is it possible for you to provide a simple sample implementation where we can observe such behavior? Thanks.
Comment 7 jmborer 2015-04-15 08:38:54 UTC
As I said, I will do my best to create an example of the issue. I just need to find some time for that.
Comment 8 jmborer 2015-05-19 19:25:24 UTC
Created attachment 153755 [details]
sample app

Here is a sample project that demonstrates the issue
Comment 9 jmborer 2015-05-19 19:25:47 UTC
It is not solved. Reopening it.
Comment 10 jmborer 2015-05-20 06:34:27 UTC
Created attachment 153761 [details]
Another version of the demo app

In application1.zip, I forgot to remove the Thread.sleep() LoggerNode:LoggerChildrenFactory. Therefore the hourglass could be rendered. Once you comment the sleep, you can observe the "blank file type" glitch again.
Comment 11 Martin Entlicher 2015-05-21 15:53:03 UTC
Thanks for the demo application, I do see the empty icon, which is displayed for a short time.
Comment 12 jmborer 2015-05-21 16:17:56 UTC
Great. There are severe rendering issues with enum property renderers (combo box renderer). Could you have a look with Nimbus LaF on win and worst is not Mac. If you have the opportunity to run the demo on a Mac you will see it. Even the debugger variables in the IDE suffers from the bug (cell with black background). I had a look in the sources, but issue seems to be in the rendering layers. I not sure I found the right place to look for the issue. Any idea?
Comment 13 Martin Entlicher 2015-05-21 16:56:56 UTC
I hope to have the opportunity to check it on Mac next week. I'll work on a fix of the empty icon first...
Comment 14 Martin Entlicher 2015-05-22 17:28:15 UTC
The empty node shown is Node.EMPTY. It gets into the VisualizerNode via call VisualizerNode.nodeDestroyed() - this replaces the original "Please Wait..." node with Node.EMPTY. As this is done asynchronously in RequestProcessor, the UI layer might repaint before all new nodes are set up and therefore it will paint the Node.EMPTY, which results in the empty icon.
This is a consequence of a fix of issue #180940.
Comment 15 jmborer 2015-05-22 18:54:17 UTC
Very interesting. I had also spotted this empty glitch when destroying a node but I thought it was due to my code and left the investigation task for later. Now a fix might correct also the destroy glitch.
Comment 16 Martin Entlicher 2015-05-25 13:06:13 UTC
Fixed by changeset:   288046:c3a0f23793fc
http://hg.netbeans.org/core-main/rev/c3a0f23793fc
Comment 17 Martin Entlicher 2015-05-25 13:07:08 UTC
I hope that this fix solves the destroy glitch as well.
Comment 18 jmborer 2015-05-26 07:45:42 UTC
Well done. I was looking at your patch. I weren't able to fix this. All this visualization stuff is still a bit unkown to me and is quite complex to understand.

There is a more annoying bug: https://netbeans.org/bugzilla/show_bug.cgi?id=252484

I would like to help and started debugging the platform. The problem seems to lie in the ComboxBox or EnumProperty renderer. Do you have an idea where I should look for the issue? LaF, Renderes code, etc...
Comment 19 Quality Engineering 2015-05-27 05:54:29 UTC
Integrated into 'main-silver', will be available in build *201505270357* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/c3a0f23793fc
User: mentlicher@netbeans.org
Log: #251592: Reset the visualizer's node in event queue only.