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.
This was pulled from the log of a deployed NB RCP application, where the user was getting sporadic error dialogs at startup (and being rightly concerned that things were badly broken): java.util.ConcurrentModificationException at java.util.Hashtable$Enumerator.next(Hashtable.java:1031) at com.sun.java.swing.plaf.nimbus.NimbusStyle.compileDefaults(NimbusStyle.java:378) at com.sun.java.swing.plaf.nimbus.NimbusStyle.validate(NimbusStyle.java:297) at com.sun.java.swing.plaf.nimbus.NimbusStyle.getValues(NimbusStyle.java:927) at com.sun.java.swing.plaf.nimbus.NimbusStyle.getInsets(NimbusStyle.java:605) at javax.swing.plaf.synth.SynthStyle.installDefaults(SynthStyle.java:896) at javax.swing.plaf.synth.SynthLookAndFeel.updateStyle(SynthLookAndFeel.java:276) at javax.swing.plaf.synth.SynthMenuBarUI.updateStyle(SynthMenuBarUI.java:58) at javax.swing.plaf.synth.SynthMenuBarUI.installDefaults(SynthMenuBarUI.java:47) at javax.swing.plaf.basic.BasicMenuBarUI.installUI(BasicMenuBarUI.java:56) at javax.swing.JComponent.setUI(JComponent.java:673) at javax.swing.JMenuBar.setUI(JMenuBar.java:118) at javax.swing.JMenuBar.updateUI(JMenuBar.java:127) at javax.swing.JMenuBar.<init>(JMenuBar.java:95) at org.openide.awt.MenuBar.<init>(MenuBar.java:128) at org.openide.awt.MenuBar.<init>(MenuBar.java:136) at org.netbeans.core.windows.view.ui.MainWindow.createMenuBar(MainWindow.java:370) at org.netbeans.core.windows.view.ui.MainWindow.init(MainWindow.java:143) at org.netbeans.core.windows.WindowSystemImpl.init(WindowSystemImpl.java:68) at org.netbeans.core.NonGui.initializeMainWindow(NonGui.java:169) at org.netbeans.core.NonGui.run(NonGui.java:104) at org.netbeans.core.startup.Main.start(Main.java:319) at org.netbeans.core.startup.TopThreadGroup.run(TopThreadGroup.java:111) at java.lang.Thread.run(Thread.java:619) It looks like Nimbus is being initialized outside of the EDT (or, at least that's the only reason I can think of why Nimbus would toss a CME at startup). FYI, we're using a "--laf Nimbus" jvm argument to set the L&F, using 64-bit JRE 1.6.x.
side-effect of issue #30121, reassigning
I guess we can move the creation of MenuBar into AWT. Just its population with entities could be done later and the waitFinished() call would be in background thread.
This is the simplest solution: core-main#1fd8b41b72c2 If it results in a bunch of NPEs or similar errors, we can design some API that will start the MenuBar$Folder processing outside of EQ without the need to create the MenuBar. Let see how robust the will 1fd8b41b72c2 show.
Integrated into 'main-golden', will be available in build *200909190201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/1fd8b41b72c2 User: Jaroslav Tulach <jtulach@netbeans.org> Log: #172277: Don't initialize LaF outside of EQ (and allow new MenuBar outside of EQ)