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 14756 - NPE on save of Java file resulting in user data loss
Summary: NPE on save of Java file resulting in user data loss
Status: CLOSED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Unsupported (show other bugs)
Version: 3.x
Hardware: PC Windows ME/2000
: P1 blocker (vote)
Assignee: issues@www
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2001-08-24 01:15 UTC by Michael Ottati
Modified: 2007-09-26 09:14 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Java file which caused the problem (4.74 KB, text/plain)
2001-08-24 01:26 UTC, Michael Ottati
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Ottati 2001-08-24 01:15:59 UTC
When saving a java file the IDE reports the attached exception. In addition, a 
dialog window come up informing user that the file has changed on disc, would 
you like to reload?

At this point, the file can not be saved. Causing the reloaded copy to be 
brought in from disc makes the NB copy empty, and the on disc copy empty 
resulting in user data loss.



Thu Aug 23 17:06:24 PDT 2001: java.lang.NullPointerException: Posted StackTrace
Annotation: Exception occurred in Request Processor
org.openide.util.RequestProcessor$Holder: Posted StackTrace(task 
org.netbeans.core.ModuleActions$1@258562 [-281, 1, -1])
        at org.openide.util.RequestProcessor$Task.createHolder
(RequestProcessor.java:322)
        at org.openide.util.RequestProcessor.post(RequestProcessor.java:100)
        at org.openide.util.RequestProcessor.post(RequestProcessor.java:73)
        at org.netbeans.core.ModuleActions.invokeAction(ModuleActions.java:98)
        at java.lang.reflect.Method.invoke(Native Method)
        at org.openide.awt.Actions.invokeAction(Actions.java:381)
        at org.openide.awt.Actions$ButtonBridge.actionPerformed
(Actions.java:360)
        at javax.swing.AbstractButton.fireActionPerformed
(AbstractButton.java:1450)
        at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed
(AbstractButton.java:1504)
        at javax.swing.DefaultButtonModel.fireActionPerformed
(DefaultButtonModel.java:378)
        at javax.swing.DefaultButtonModel.setPressed
(DefaultButtonModel.java:250)
        at javax.swing.AbstractButton.doClick(AbstractButton.java:279)
        at javax.swing.AbstractButton.doClick(AbstractButton.java:259)
        at javax.swing.plaf.basic.BasicMenuItemUI$ClickAction.actionPerformed
(BasicMenuItemUI.java:1007)
        at javax.swing.SwingUtilities.notifyAction(SwingUtilities.java:1384)
        at javax.swing.JComponent.processKeyBinding(JComponent.java:2078)
        at javax.swing.JMenuBar.processBindingForKeyStrokeRecursive
(JMenuBar.java:666)
        at javax.swing.JMenuBar.processBindingForKeyStrokeRecursive
(JMenuBar.java:678)
        at javax.swing.JMenuBar.processKeyBinding(JMenuBar.java:648)
        at javax.swing.KeyboardManager.fireBinding(KeyboardManager.java:252)
        at javax.swing.KeyboardManager.fireKeyboardAction
(KeyboardManager.java:239)
        at javax.swing.JComponent.processKeyBindingsForAllComponents
(JComponent.java:2145)
        at javax.swing.JComponent.processKeyBindings(JComponent.java:2138)
        at javax.swing.JComponent.processKeyEvent(JComponent.java:2041)
        at javax.swing.JEditorPane.processKeyEvent(JEditorPane.java:1159)
        at java.awt.Component.processEvent(Component.java:3553)
        at java.awt.Container.processEvent(Container.java:1164)
        at java.awt.Component.dispatchEventImpl(Component.java:2593)
        at java.awt.Container.dispatchEventImpl(Container.java:1213)
        at java.awt.Component.dispatchEvent(Component.java:2497)
        at java.awt.LightweightDispatcher.processKeyEvent(Container.java:2155)
        at java.awt.LightweightDispatcher.dispatchEvent(Container.java:2135)
        at java.awt.Container.dispatchEventImpl(Container.java:1200)
        at java.awt.Window.dispatchEventImpl(Window.java:914)
        at java.awt.Component.dispatchEvent(Component.java:2497)
[catch] at java.awt.EventQueue.dispatchEvent(EventQueue.java:339)
        at java.awt.EventDispatchThread.pumpOneEventForHierarchy
(EventDispatchThread.java:131)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy
(EventDispatchThread.java:98)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
        at java.awt.EventDispatchThread.run(EventDispatchThread.java:85)
 
Thu Aug 23 17:06:24 PDT 2001: java.lang.NullPointerException: null
java.lang.NullPointerException
        at sun.io.Converters.getConverterClass(Converters.java:78)
        at sun.io.Converters.newConverter(Converters.java:138)
        at sun.io.CharToByteConverter.getConverter(CharToByteConverter.java:67)
        at java.io.OutputStreamWriter.<init>(OutputStreamWriter.java:75)
        at org.netbeans.modules.java.JavaEditor.saveFromKitToStream
(JavaEditor.java:332)
        at org.openide.text.EditorSupport$Del.saveFromKitToStream
(EditorSupport.java:723)
        at org.openide.text.CloneableEditorSupport.saveDocument
(CloneableEditorSupport.java:391)
        at org.openide.text.EditorSupport$Del.superSaveDocument
(EditorSupport.java:739)
        at org.openide.text.EditorSupport.saveDocument(EditorSupport.java:263)
        at org.netbeans.modules.java.JavaEditor.saveDocument
(JavaEditor.java:382)
        at org.netbeans.modules.java.JavaEditor.saveDocument
(JavaEditor.java:364)
        at org.openide.text.EditorSupport$EntryEnv.save(EditorSupport.java:838)
        at org.openide.actions.SaveAction.performAction(SaveAction.java:46)
        at org.openide.util.actions.NodeAction.performAction(NodeAction.java:96)
        at org.openide.util.actions.NodeAction.actionPerformed
(NodeAction.java:87)
        at org.netbeans.core.ModuleActions$1.run(ModuleActions.java:85)
        at org.openide.util.Task.run(Task.java:152)
[catch] at org.openide.util.RequestProcessor$ProcessorThread.run
(RequestProcessor.java:611)
Comment 1 Michael Ottati 2001-08-24 01:26:50 UTC
Created attachment 2293 [details]
Java file which caused the problem
Comment 2 Michael Ottati 2001-08-24 01:28:52 UTC
This bug was seen in sources updated at Thu Aug 23 22:20:15  2001 UTC.
Comment 3 Svata Dedic 2001-08-24 06:13:36 UTC
Fixed in dev build.
Comment 4 Jan Becicka 2001-08-24 14:02:25 UTC
[200108240715] Verified
Comment 5 Quality Engineering 2003-07-01 13:18:41 UTC
Resolved for 3.4.x or earlier, no new info since then -> closing.