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 57396 - [41cat] AssertError while editing
Summary: [41cat] AssertError while editing
Status: RESOLVED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Filesystems (show other bugs)
Version: 4.x
Hardware: PC Windows XP
: P3 blocker (vote)
Assignee: rmatous
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-04-04 00:53 UTC by schwarcz
Modified: 2008-12-22 19:52 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
NB log file (12.08 KB, text/plain)
2005-04-04 00:54 UTC, schwarcz
Details

Note You need to log in before you can comment on or make changes to this bug.
Description schwarcz 2005-04-04 00:53:45 UTC
[ 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)
Comment 1 schwarcz 2005-04-04 00:54:34 UTC
Created attachment 21323 [details]
NB log file
Comment 2 rmatous 2005-04-04 09:12:02 UTC
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.
Comment 3 schwarcz 2005-04-07 04:42:25 UTC
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
Comment 4 schwarcz 2005-04-07 04:45:23 UTC
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.
Comment 5 rmatous 2005-04-07 14:04:21 UTC
/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.