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.
Using a current dev version (06.06.2004). When hitting multiple times CTRL-S (in a very fast succession) I'm getting following exception: java.lang.NullPointerException at org.openide.actions.SaveAction.performAction(SaveAction.java:41) at org.openide.util.actions.NodeAction$3.run(NodeAction.java:440) at org.openide.util.actions.CallableSystemAction.doPerformAction(CallableSystemAction.java:116) at org.openide.util.actions.NodeAction$DelegateAction.actionPerformed(NodeAction.java:438) at org.openide.windows.TopComponent.processKeyBinding(TopComponent.java:674) at javax.swing.JComponent.processKeyBindings(JComponent.java:2484) at javax.swing.JComponent.processKeyEvent(JComponent.java:2401) at java.awt.Component.processEvent(Component.java:4909) at java.awt.Container.processEvent(Container.java:1569) at java.awt.Component.dispatchEventImpl(Component.java:3615) at java.awt.Container.dispatchEventImpl(Container.java:1627) at java.awt.Component.dispatchEvent(Component.java:3477) at java.awt.KeyboardFocusManager.redispatchEvent(KeyboardFocusManager.java:1713) at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(DefaultKeyboardFocusManager.java:627) at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(DefaultKeyboardFocusManager.java:831) at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(DefaultKeyboardFocusManager.java:741) at java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFocusManager.java:592) at java.awt.Component.dispatchEventImpl(Component.java:3506) at java.awt.Container.dispatchEventImpl(Container.java:1627) at java.awt.Window.dispatchEventImpl(Window.java:1606) at java.awt.Component.dispatchEvent(Component.java:3477) [catch] at java.awt.EventQueue.dispatchEvent(EventQueue.java:456) at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:201) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:151) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:145) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:137) at java.awt.EventDispatchThread.run(EventDispatchThread.java:100)
reassigning to openide
This is really simple to reproduce (dev build from Jun20).
Created attachment 15960 [details] a possible workaround
The attached patch should be consider and optionally apply in promoD.
fixed, the proposed patch has been applied in src/org/openide/actions/SaveAction.java; /cvs/openide/src/org/openide/actions/SaveAction.java,v <-- SaveAction.java new revision: 1.32; previous revision: 1.31
I'm not comfortable with this fix; it is only a workaround. If there is no SaveCookie, the action should be disabled, and if the action is disabled, it should not have been invoked. If the window system & actions infrastructure cannot guarantee to an action that it is invoked with a valid context, then that infrastructure is buggy and needs to be fixed generally, not just for this action.
I'm not sure, but this issue can be somehow connected to issue 49863. See my comments there.
The moot workaround has been removed, it's replace with assertion which should notify no SavieCookie on activatedNode if action is enabled. It's not reproducible for now, probable fixed together with issue 49863. Closed as WORKSFORME. Checking in src/org/openide/actions/SaveAction.java; /cvs/openide/src/org/openide/actions/SaveAction.java,v <-- SaveAction.java new revision: 1.37; previous revision: 1.36 done