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 # : 20050329 ] [ JDK VERSION : 1.5.0_02 ] java.lang.AssertionError: D:\probes\Hibernate_CH2\src\hello\.LCKCh2.java~ at org.netbeans.modules.masterfs.filebasedfs.fileobjects.WriteLock.releaseLock(WriteLock.java:149) at org.netbeans.modules.masterfs.Delegate$FileLockImpl.releaseLock(Delegate.java:271) at org.openide.text.DataEditorSupport$Env.unmarkModified(DataEditorSupport.java:491) at org.openide.text.CloneableEditorSupport.notifyUnmodified(CloneableEditorSupport.java:1340) at org.netbeans.modules.java.JavaEditor.notifyUnmodified(JavaEditor.java:219) at org.openide.text.CloneableEditorSupport$1SaveAsReader.after(CloneableEditorSupport.java:772) at org.openide.text.CloneableEditorSupport.saveDocument(CloneableEditorSupport.java:783)
Created attachment 21323 [details] NB log file
Seems like Windows specific. The failed code is crystal clear: if (f.exists && !f.delete) then this reported assertion is true. I can just speculate what could be the cause (opened inputstream. outputstream, lock) but I really don't know how to fix it until there is some way how to reproduce. WORKSFORME - if you can't reproduce. If so, then please reopen.
Here's another instance during editing. Don't toss it just because you can't easily reproduce it. java.lang.AssertionError: d:\probes\RegEx\src\com\schwarcz\util\.LCKRegexTestHarness.java~ at org.netbeans.modules.masterfs.filebasedfs.fileobjects.WriteLock.releaseLock(WriteLock.java:149) at org.netbeans.modules.masterfs.Delegate$FileLockImpl.releaseLock(Delegate.java:271) at org.openide.text.DataEditorSupport$Env.unmarkModified(DataEditorSupport.java:491) at org.openide.text.CloneableEditorSupport.notifyUnmodified(CloneableEditorSupport.java:1340) at org.netbeans.modules.java.JavaEditor.notifyUnmodified(JavaEditor.java:219) at org.openide.text.CloneableEditorSupport$1SaveAsReader.after(CloneableEditorSupport.java:772) at org.openide.text.CloneableEditorSupport.saveDocument(CloneableEditorSupport.java:783) at org.openide.text.DataEditorSupport.saveDocument(DataEditorSupport.java:273) at org.netbeans.modules.java.JavaEditor.saveDocument(JavaEditor.java:515) at org.netbeans.modules.java.JavaEditor.saveDocument(JavaEditor.java:502) at org.netbeans.modules.java.JavaEditor$Save.save(JavaEditor.java:230) at org.netbeans.core.NbTopManager.saveAll(NbTopManager.java:392
Note that after this error, the source changes can not be saved. Thus data is lost. The only recourse is to shut down the IDE, loose the current changes to the file and restart the IDE. Not a good deal.
/cvs/openide/masterfs/src/org/netbeans/modules/masterfs/filebasedfs/fileobjects/WriteLock.java,v new revision: 1.4; previous revision: 1.3 I don't know the real cause of this issue. But I may speculate that #57405 could cause it, I can also imagine some race condition - that's why I added some synchronization. Definitely NB4.1 will have disabled assertions -da. I didn't want to toss this report - btw. its even impossible. I've just closed it, because there was no hint how to fix it. Please, test on tomorrow's build and either verify or reopen.