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.1 RC1 (Build 201111242103) VM: Java HotSpot(TM) 64-Bit Server VM, 20.4-b02, Java(TM) SE Runtime Environment, 1.6.0_29-b11 OS: Linux User Comments: marfous: invoked hints in layer.xml to re-registration action via annotations Stacktrace: java.lang.Throwable: Locked by: at org.openide.filesystems.FileLock.<init>(FileLock.java:83) 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:353) at org.openide.loaders.MultiDataObject$Entry.takeLock(MultiDataObject.java:1352) at org.netbeans.modules.openide.loaders.SimpleES$Environment.takeLock(SimpleES.java:188)
Created attachment 114738 [details] stacktrace
jtulach's analysis does not seem right; LayerUtils.CookieImpl.run closes the stream in a finally block, which should suffice to unlock the file. Rather the issue is that the file is locked by the editor because it is modified, yet Hinter.Context.saveLayer is being called which is trying to save structural modifications. LayerHints cancels all hints as soon as the layer is modified, but perhaps there is a race condition if you accept a hint and then start typing text in layer.xml before it gets a chance to run, perhaps because Java scanning is running.
core-main #320aba7a7628
Integrated into 'main-golden' Changeset: http://hg.netbeans.org/main-golden/rev/320aba7a7628 User: Jesse Glick <jglick@netbeans.org> Log: #207077: Hints run on modified layer.xml