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 25622 - NullPointerException from "Frame Resides" action
Summary: NullPointerException from "Frame Resides" action
Status: CLOSED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Window System (show other bugs)
Version: 3.x
Hardware: PC Linux
: P3 blocker (vote)
Assignee: Peter Zavadsky
URL:
Keywords:
: 27531 28825 (view as bug list)
Depends on:
Blocks:
 
Reported: 2002-07-15 14:44 UTC by Peter Zavadsky
Modified: 2008-12-23 09:02 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Zavadsky 2002-07-15 14:44:35 UTC
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)
Comment 1 NiclasH 2002-07-16 03:38:23 UTC
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. 
 
 
Comment 2 Peter Zavadsky 2002-07-16 09:33:20 UTC
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.
Comment 3 Marian Mirilovic 2002-09-18 13:25:22 UTC
I didn't see exception never, verified.
Comment 4 Marian Mirilovic 2002-10-11 16:00:46 UTC
*** Issue 27531 has been marked as a duplicate of this issue. ***
Comment 5 Jaroslav Tulach 2002-12-03 09:54:08 UTC
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.
Comment 6 Peter Zavadsky 2002-12-03 15:57:37 UTC
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
Comment 7 mslama 2003-01-09 10:21:23 UTC
*** Issue 28825 has been marked as a duplicate of this issue. ***
Comment 8 Quality Engineering 2003-07-01 16:43:54 UTC
Resolved for 3.4.x or earlier, no new info since then -> closing.