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 220514

Summary: [73cat] "Throwable: Locked by:" during reformatting code for all project (C++ CMake based project)
Product: platform Reporter: kosmonaffft
Component: TextAssignee: Miloslav Metelka <mmetelka>
Status: CLOSED DUPLICATE    
Severity: normal CC: issues, rmartins
Priority: P3 Keywords: REGRESSION
Version: 7.3   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter: 176439
Attachments: stacktrace

Description kosmonaffft 2012-10-21 17:05:52 UTC
Build: NetBeans IDE Dev (Build 201210200002)
VM: Java HotSpot(TM) 64-Bit Server VM, 23.3-b01, Java(TM) SE Runtime Environment, 1.7.0_07-b10
OS: Windows 8

User Comments:
kosmonaFFFt: Reformat all project...




Stacktrace: 
java.lang.Throwable: Locked by:
   at org.openide.filesystems.FileLock.<init>(FileLock.java:85)
   at org.netbeans.modules.masterfs.filebasedfs.fileobjects.LockForFile.<init>(LockForFile.java:91)
   at org.netbeans.modules.masterfs.filebasedfs.fileobjects.LockForFile.tryLock(LockForFile.java:102)
   at org.netbeans.modules.masterfs.filebasedfs.fileobjects.FileObj.lock(FileObj.java:359)
   at org.openide.loaders.MultiDataObject$Entry.takeLock(MultiDataObject.java:1356)
   at org.netbeans.modules.cnd.source.CppEditorSupport$Environment.takeLock(CppEditorSupport.java:394)
Comment 1 kosmonaffft 2012-10-21 17:05:53 UTC
Created attachment 126268 [details]
stacktrace
Comment 2 Alexander Simon 2012-10-22 13:12:17 UTC
It seems this bug is result of fixing bug #220381

CloneableEditorSupport.saveDocument()
in lines:
            setLastSaveTime(-1);
            os = cesEnv().outputStream();
            memoryOutputStream[0].writeTo(os);
            os.close(); // performs firing
does not release file lock.
Comment 3 Alexander Simon 2012-10-22 13:17:31 UTC
Probably bug #220474 is a duplicate of this bug.
Comment 4 Miloslav Metelka 2013-08-28 12:59:14 UTC
So marked as dup of issue 220474

*** This bug has been marked as a duplicate of bug 220474 ***