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.
Niclas Hedhman wrote: I am hoping someone have a clue why this NPE comes around. I can't figure it out. I feel we are doing something wrong, but.... Niclas java.lang.NullPointerException at org.netbeans.core.actions.FrameResidenceAction$ResidenceTypeListener.menuSelected(FrameResidenceAction.java:120) at javax.swing.JMenu.fireMenuSelected(JMenu.java:1076) at javax.swing.JMenu$MenuChangeListener.stateChanged(JMenu.java:1169) at javax.swing.DefaultButtonModel.fireStateChanged(DefaultButtonModel.java:361) at javax.swing.DefaultButtonModel.setEnabled(DefaultButtonModel.java:201) at javax.swing.AbstractButton.setEnabled(AbstractButton.java:1849) at javax.swing.JMenuItem.setEnabled(JMenuItem.java:283) at org.openide.awt.Actions$MenuBridge.updateState(Actions.java:508) at org.openide.awt.Actions$Bridge.addNotify(Actions.java:306) at org.openide.awt.Actions$Bridge$VisL.propertyChange(Actions.java:340) at javax.swing.event.SwingPropertyChangeSupport.firePropertyChange(SwingPropertyChangeSupport.java:264) at javax.swing.event.SwingPropertyChangeSupport.firePropertyChange(SwingPropertyChangeSupport.java:232) at javax.swing.JComponent.firePropertyChange(JComponent.java:3801) at javax.swing.JComponent.addNotify(JComponent.java:4271) at java.awt.Container.addNotify(Container.java:2004) at javax.swing.JComponent.addNotify(JComponent.java:4270) at java.awt.Container.addNotify(Container.java:2004) at javax.swing.JComponent.addNotify(JComponent.java:4270) at java.awt.Container.addImpl(Container.java:621) at javax.swing.JLayeredPane.addImpl(JLayeredPane.java:202) at java.awt.Container.add(Container.java:510) at javax.swing.PopupFactory$LightWeightPopup.show(PopupFactory.java:635) at javax.swing.JPopupMenu.getPopup(JPopupMenu.java:761) at javax.swing.JPopupMenu.setVisible(JPopupMenu.java:703) at javax.swing.JPopupMenu.show(JPopupMenu.java:870) at org.openide.awt.JMenuPlus.setPopupMenuVisible(JMenuPlus.java:58) at javax.swing.JPopupMenu.menuSelectionChanged(JPopupMenu.java:1218) at javax.swing.MenuSelectionManager.setSelectedPath(MenuSelectionManager.java:81) at javax.swing.plaf.basic.BasicMenuUI$MouseInputHandler.mouseEntered(BasicMenuUI.java:375) at java.awt.AWTEventMulticaster.mouseEntered(AWTEventMulticaster.java:237) at java.awt.Component.processMouseEvent(Component.java:5030) at java.awt.Component.processEvent(Component.java:4818) at java.awt.Container.processEvent(Container.java:1525) at java.awt.Component.dispatchEventImpl(Component.java:3526) at java.awt.Container.dispatchEventImpl(Container.java:1582) at java.awt.Component.dispatchEvent(Component.java:3367) at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3359) at java.awt.LightweightDispatcher.trackMouseEnterExit(Container.java:3199) [catch] at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3056) at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3004) at java.awt.Container.dispatchEventImpl(Container.java:1568) at java.awt.Window.dispatchEventImpl(Window.java:1581) at java.awt.Component.dispatchEvent(Component.java:3367) at java.awt.EventQueue.dispatchEvent(EventQueue.java:445) at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:191) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:144) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:130) at java.awt.EventDispatchThread.run(EventDispatchThread.java:98)
It is triggered when I have a custom CloneableTopComponent sitting in its own, newly created Mode, not residing in the IDE, running MDI. If I go to Windows menu, but don't click anywhere, and then click on the CTC, and back a few times, it will be triggered. I have only confirmed this on Linux RH7.2, JDK 1.4.0, NB 3.4 Beta 2. I will try the latest one shortly.
Fixed in [trunk] Fix: core/../actions/FrameResidenceAction.java [1.7] /windows/WorkspaceImpl.java [1.102] Note: I couldn't reproduce the problem (of course didn't have the specific TopComponent). So the fix workarounds the immediate problem (in case there is no active mode available(??) the cause the sub menu is not constructed). I just could suppose where could be a problem. Found one possible source when looking up for TopComponent id the thrown exception was eaten up, without any notification. Added the notification. Next time if it happens please have a look into log file. Be aware this fix is applied into [trunk] only.
I didn't see exception never, verified.
*** Issue 27531 has been marked as a duplicate of this issue. ***
Hi. This issue is marked as 3.4.1_CANDIDATE. It means that it should be integrated into release341 one branch. The plan at http://www.netbeans.org/devhome/docs/releases/34/index.html expected beta1 to be produced on Dec01. That did not happen due to a lot of outstanding not integrated candidates like this one. Would it be possible to spend few minutes by backporting this fix? Thank you in advance.
Integrated into [release341] branch. core/../actions/FrameResidenceAction.java 1.6.60.1 /windows/WorkspaceImpl.java 1.101.6.1.4.1 part of the patch
*** Issue 28825 has been marked as a duplicate of this issue. ***
Resolved for 3.4.x or earlier, no new info since then -> closing.