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 Dev (Build 081208) VM: Java HotSpot(TM) Client VM, 11.0-b16, Java(TM) SE Runtime Environment, 1.6.0_11-b03 OS: Linux, 2.6.27-9-generic, i386 User Comments: jglick: Adding a module to a suite when $suite/nbproject/project.properties was already open (perhaps modified?) in the editor. Stacktrace: org.openide.filesystems.FileAlreadyLockedException: /tmp/autoproject-dummy-suite/nbproject/project.properties at org.netbeans.modules.masterfs.filebasedfs.fileobjects.LockForFile.registerLock(LockForFile.java:111) at org.netbeans.modules.masterfs.filebasedfs.fileobjects.LockForFile.tryLock(LockForFile.java:100) at org.netbeans.modules.masterfs.filebasedfs.fileobjects.FileObj.lock(FileObj.java:277) at org.netbeans.spi.project.support.ant.ProjectProperties$PP$1.run(ProjectProperties.java:240) at org.openide.filesystems.EventControl.runAtomicAction(EventControl.java:120) at org.openide.filesystems.FileSystem.runAtomicAction(FileSystem.java:502)
Yes, it is locked by editor (see "Locked by" stack trace).
Jesse, isn't this related to issue #137947?
Might be. In the last stack trace (anonymous), it looks like j2ee.sun.ide.j2ee.ModuleConfigurationImpl$StaticBuildExtensionListener.rewriteBuildImpl is triggering a reentrant project save request. Perhaps FileEvent.firedFrom is not correctly reporting true when called from inside that same AA? Should be testable at least. tboudreau's case "Removed a library from a J2SE project which was referenced from nbproject/private/private.properties while that file was open and modified in the editor" is simply unsupportable; you have to save the file before you can make changes from other parts of the GUI. My case might have been similar according to the stack trace, and andrewmigliore's too (though using third-party JVI which might have its own bugs). For that, may be necessary for ProjectProperties$PP$1.run to just catch FileAlreadyLockedException and either log at INFO, or attach a localized annotation so it appears as a polite error message.
I filed issue #169078 for the reentrant save. For the rest, I am just downgrading to INFO; the file will simply not get saved and any in-memory data will be discarded. core-main #a67e1b1b08dd
Integrated into 'main-golden', will be available in build *200907241401* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/a67e1b1b08dd User: Jesse Glick <jglick@netbeans.org> Log: #155037: FALE under some conditions.