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 258620 - Repetitive menu refresh on open
Summary: Repetitive menu refresh on open
Status: RESOLVED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Window System (show other bugs)
Version: 8.1
Hardware: Macintosh Mac OS X
: P2 normal (vote)
Assignee: Martin Entlicher
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-04-01 18:14 UTC by SirIntellegence
Modified: 2016-07-24 01:52 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Example suite (15.20 KB, application/zip)
2016-04-01 18:14 UTC, SirIntellegence
Details
Example suite (14.15 KB, application/zip)
2016-04-01 18:17 UTC, SirIntellegence
Details
Example Suite (13.12 KB, application/zip)
2016-06-01 21:24 UTC, SirIntellegence
Details

Note You need to log in before you can comment on or make changes to this bug.
Description SirIntellegence 2016-04-01 18:14:02 UTC
Created attachment 159096 [details]
Example suite

Using the attached openide suite. When one starts it in a mac, the main window shows, and then the menu bar puts on a light show as the menu is repeatedly filled and cleared. This also make the UI unresponsive. Let me know if you need any more info.
Comment 1 SirIntellegence 2016-04-01 18:17:23 UTC
Created attachment 159097 [details]
Example suite

Removed some stuff from the zip
Comment 2 SirIntellegence 2016-04-01 18:26:17 UTC
And, yes, I am aware that the layer.xml points to non-existant objects, but I am sure it would behave the same if the objects were there.
Comment 3 SirIntellegence 2016-04-11 16:09:11 UTC
Right, I forgot to report it for the current version... That is the version the example suite is built with.
Comment 4 SirIntellegence 2016-04-15 16:07:39 UTC
When it happens, it causes the UI to not respond for a while. The more menu items you have, the longer it will take. My current NB platform program will stall for about 15 at start after showing the main window. Please take a look at it.
Comment 5 SirIntellegence 2016-06-01 21:24:23 UTC
Created attachment 159934 [details]
Example Suite

I was able to isolate what is causing this behavior in the example suite. It would be the lines under "<!--So we have copies down here of them-->". Please see what you can do about this.
Comment 6 SirIntellegence 2016-06-01 22:01:32 UTC
It appears that a sanity check is failing at MenuBar$MenuBarFolder.createInstance. The check is "ll.equals(Arrays.asList(mb.getComponents()))", which will always fail if you try to have something that is not a JMenuItem on the main bar.
Comment 7 Martin Entlicher 2016-07-20 15:57:10 UTC
Thanks for your findings! The check in MenuBar$MenuBarFolder.createInstance() needs to be improved.
Comment 8 Martin Entlicher 2016-07-22 12:57:45 UTC
Fixed by changeset:   299545:4e6554f3c9be
http://hg.netbeans.org/core-main/rev/4e6554f3c9be
Comment 9 Quality Engineering 2016-07-24 01:52:22 UTC
Integrated into 'main-silver', will be available in build *201607240002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/4e6554f3c9be
User: mentlicher@netbeans.org
Log: #258620: Do not refresh the menu bar too much. Add/remove only the new/old items. Tests improved.