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 44501 - NullPointerException while saving java file
Summary: NullPointerException while saving java file
Status: RESOLVED WORKSFORME
Alias: None
Product: platform
Classification: Unclassified
Component: Actions (show other bugs)
Version: 4.x
Hardware: PC Linux
: P3 blocker (vote)
Assignee: Jiri Rechtacek
URL:
Keywords:
Depends on: 68285
Blocks: 49863
  Show dependency tree
 
Reported: 2004-06-08 08:49 UTC by _ leonchiver
Modified: 2008-12-22 17:31 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
a possible workaround (788 bytes, patch)
2004-06-23 15:50 UTC, Jiri Rechtacek
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description _ leonchiver 2004-06-08 08:49:09 UTC
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)
Comment 1 Martin Roskanin 2004-06-08 08:59:51 UTC
reassigning to openide
Comment 2 _ rkubacki 2004-06-21 12:55:00 UTC
This is really simple to reproduce (dev build from Jun20).
Comment 3 Jiri Rechtacek 2004-06-23 15:50:34 UTC
Created attachment 15960 [details]
a possible workaround
Comment 4 Jiri Rechtacek 2004-06-23 15:51:31 UTC
The attached patch should be consider and optionally apply in promoD.
Comment 5 Jiri Rechtacek 2004-07-12 13:09:05 UTC
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
Comment 6 Jesse Glick 2004-07-12 23:44:11 UTC
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.
Comment 7 Jan Becicka 2004-10-15 12:50:53 UTC
I'm not sure, but this issue can be somehow connected to issue 49863.
See my comments there.
Comment 8 Jiri Rechtacek 2004-11-15 15:04:54 UTC
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