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 205137 - Two Toolbars menu in main menu View
Summary: Two Toolbars menu in main menu View
Status: VERIFIED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Actions (show other bugs)
Version: 7.1
Hardware: PC Linux
: P3 normal with 1 vote (vote)
Assignee: Jaroslav Tulach
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-11-15 11:01 UTC by ttokoly
Modified: 2012-08-01 14:51 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
log (44.53 KB, application/octet-stream)
2011-11-18 16:52 UTC, Stanislav Aubrecht
Details

Note You need to log in before you can comment on or make changes to this bug.
Description ttokoly 2011-11-15 11:01:51 UTC
Product Version: NetBeans IDE Dev (Build 201111130600)
Java: 1.7.0; Java HotSpot(TM) Client VM 21.0-b17
System: Linux version 3.0.0-12-generic running on i386; UTF-8; en_US (nb)

1. Run IDE with clean userdir.
2. Disable the File item in main menu View | Toolbars (that means disable all items in main menu View | Toolbars).
3. Restart IDE.

And now two Toolbars menu appears in main menu View. The upper one is not synchronised with popup Toolbar menu.
Comment 1 Stanislav Aubrecht 2011-11-15 13:56:33 UTC
can't reproduce in

Product Version: NetBeans IDE Dev (Build 20111114-f322158ab118)
Java: 1.7.0_01; Java HotSpot(TM) Client VM 21.1-b02
System: Linux version 2.6.38-8-generic running on i386; UTF-8; en_US (nb)
Comment 2 ttokoly 2011-11-15 15:42:01 UTC
Product Version: NetBeans IDE Dev (Build 201111140600)
Java: 1.7.0; Java HotSpot(TM) Client VM 21.0-b17
System: Windows 7 version 6.1 running on x86; Cp1252; en_US (nb)

It's reproducible. I've tried this on Linux Ubuntu 11.10 and on Windows 7. And I increase the priority to P2, because it's too visible and maybe too often bug.
Comment 3 Stanislav Aubrecht 2011-11-15 15:50:09 UTC
in some cases there are two 'toolbars' sub-menu instance even after startup with a clean user dir.
Comment 4 Stanislav Aubrecht 2011-11-15 15:52:03 UTC
jardo, could this be related to some of your changes in menu/actions?
Comment 5 Stanislav Aubrecht 2011-11-18 16:51:24 UTC
to reproduce:
- start IDE
- press ALT+V to show 'View' submenu immediately after the main window is shown

this is probably a side-effect of fix #201494. the task which creates menu item is still running while the org.openide.awt.MenuBar$LazyMenu.setPopupMenuVisible(true) is called. that fires another task which creates the second instance of toolbars submenu.
see attached log file.
Comment 6 Stanislav Aubrecht 2011-11-18 16:52:14 UTC
Created attachment 113329 [details]
log
Comment 7 Stanislav Aubrecht 2011-11-18 16:54:43 UTC
(reverting the fix for #201494 fixes this problem)

maybe we can also downgrade this to P3. if the user waits 2 or 3 seconds before showing the view menu everything is fine. so the problem is that much visible...
Comment 8 Marian Mirilovic 2011-11-18 17:15:42 UTC
(In reply to comment #7)
> (reverting the fix for #201494 fixes this problem)

... so this is regression caused by the fix of 201494 ... to me (& based on priority guidelines) P1
Comment 9 Jaroslav Tulach 2011-12-05 12:58:21 UTC
The difference between the two stacktraces is:

--- a   2011-12-05 13:05:54.318084519 +0100
+++ b   2011-12-05 13:09:06.082084553 +0100
@@ -8,20 +8,6 @@
        at org.openide.loaders.FolderInstance$1R.run(FolderInstance.java:734)
        at org.openide.util.Task.run(Task.java:248)
        at org.netbeans.modules.openide.loaders.AWTTask.run(AWTTask.java:75)
-       at org.netbeans.modules.openide.loaders.AWTTask$Processor.run(AWTTask.java:150)
-       at org.netbeans.modules.openide.loaders.AWTTask.waitFor(AWTTask.java:118)
-       at org.openide.loaders.FolderInstance.waitFinished(FolderInstance.java:341)
-       at org.openide.awt.ToolbarPool.waitFinished(ToolbarPool.java:200)
-       at org.openide.awt.ToolbarPool.getToolbars(ToolbarPool.java:360)
-       at org.netbeans.core.windows.view.ui.toolbars.ToolbarConfiguration.fillToolbarsMenu(ToolbarConfiguration.java:176)
-       at org.netbeans.core.windows.view.ui.toolbars.ToolbarConfiguration.getToolbarsMenu(ToolbarConfiguration.java:421)
-       at org.netbeans.core.windows.actions.ToolbarsListAction.getMenuPresenter(ToolbarsListAction.java:88)
-       at org.openide.awt.DynaMenuModel.loadSubmenu(DynaMenuModel.java:99)
-       at org.openide.awt.MenuBar$LazyMenu$MenuFolder.createInstance(MenuBar.java:767)
-       at org.openide.loaders.FolderInstance.defaultProcessObjectsFinal(FolderInstance.java:889)
-       at org.openide.loaders.FolderInstance$1R.run(FolderInstance.java:734)
-       at org.openide.util.Task.run(Task.java:248)
-       at org.netbeans.modules.openide.loaders.AWTTask.run(AWTTask.java:75)
        at org.netbeans.modules.openide.loaders.AWTTask.waitFinished(AWTTask.java:99)
        at org.openide.loaders.FolderInstance$1R.waitFinished(FolderInstance.java:760)
        at org.netbeans.modules.openide.loaders.AWTTask.waitFor(AWTTask.java:124)
Comment 10 Jaroslav Tulach 2012-02-25 08:50:52 UTC
ergonomics#d8831f1fd257
Comment 11 Quality Engineering 2012-02-26 11:16:00 UTC
Integrated into 'main-golden', will be available in build *201202260400* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/d8831f1fd257
User: Jaroslav Tulach <jtulach@netbeans.org>
Log: #205137: Remove the task from list of pending ones once it is executed directly
Comment 12 ttokoly 2012-08-01 14:51:01 UTC
Verified, thanks.