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.
Build: NetBeans IDE 7.2 (Build nbms-and-javadoc-9498-on-20121022) VM: Java HotSpot(TM) Client VM, 23.0-b21, Java(TM) SE Runtime Environment, 1.7.0_04-b20 OS: Linux User Comments: GUEST: creating a test class GUEST: saving a file Stacktrace: java.lang.NullPointerException at org.openide.text.CloneableEditorSupport.saveDocument(CloneableEditorSupport.java:1138) at org.openide.text.DataEditorSupport.superSaveDoc(DataEditorSupport.java:606) at org.openide.text.DataEditorSupport$SaveImpl.run(DataEditorSupport.java:1309) at org.openide.filesystems.EventControl.runAtomicAction(EventControl.java:127) at org.openide.filesystems.FileSystem.runAtomicAction(FileSystem.java:607) at org.openide.filesystems.FileUtil.runAtomicAction(FileUtil.java:603)
Created attachment 126398 [details] stacktrace
This bug already has 5 duplicates see http://statistics.netbeans.org/exceptions/detail.do?id=193861
Created attachment 126553 [details] stacktrace Reverting a change in the local history, i tried to save, then the NPE occurs. Result: File is empty. Data is lost.
Created attachment 126661 [details] stacktrace Run C++ project
This should already be fixed by http://hg.netbeans.org/main-golden/rev/3c90ead1557d If the problem persists in current dev builds please reopen the issue.
*** Bug 221500 has been marked as a duplicate of this bug. ***
*** Bug 221906 has been marked as a duplicate of this bug. ***
Unfortunately the latest duplicte came from a build 20121111
*** Bug 221905 has been marked as a duplicate of this bug. ***
I still think that this must be caused by an obsolete BeforeSaveTasks class (though I think I've increased spec/impl versions properly). Anyway I have added a safe fallback into CloneableEditorSupport to act like if save actions were not present. http://hg.netbeans.org/jet-main/rev/3b44327e97ef
Integrated into 'main-golden', will be available in build *201211150001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/3b44327e97ef User: Miloslav Metelka <mmetelka@netbeans.org> Log: #220672 - NullPointerException at org.openide.text.CloneableEditorSupport.saveDocument, file looses content - fallback when saveToMemory runnable not run.