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 201204170400) VM: Java HotSpot(TM) Client VM, 20.6-b01, Java(TM) SE Runtime Environment, 1.6.0_31-b05 OS: Windows 7 User Comments: GUEST: Downloading and syncronising from ftp. budgie67: file save inkubus08: download remote file bartdeslagmulder: Download from remote srouce (FTP). 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:1352) at org.netbeans.modules.csl.core.GsfDataObject$GenericEditorSupport$Environment.takeLock(GsfDataObject.java:229)
Created attachment 118428 [details] stacktrace
I have (at least I think) found a race condition in concurrent access to 'locked' property in FileLock, which might cause a bogus warning to be printed from its finalizer. Except the above... the last report, which contains a really erroneous situation uses IDE from 2011-02-14. All relevant reports show a conflict between org.netbeans.modules.php.project.connections.RemoteClient.renameLocalFileTo and a modified document opened in the editor. The relevant code has been changed in commit 4e89e166eff1 in Jan 2012; Tomas please verify whether this defect still applies, I don't think so.
Well, locking of the target file is still there so I am not sure that this should not happen anymore; is there anything I can do (improve) on the PHP side? (I use the file lock since I am going to replace the content of the file.) Thanks.
Not sure; in the original stacktraces (see c.f. http://statistics.netbeans.org/exceptions/messageslog?id=419751), RemoteClient.renameLocalFileTo attempted to lock the file, but the file was already locked by EditorSupport because the user had been typing in the file's editor. Maybe some better recovery from FileAlreadyLockedException would be useful: e.g. ask the user whether the unsaved changes should be thrown away or something like that.
OK, taking over, will ty to fix it. Thanks.
Correct fix depends on issue #213141.
Should be fixed (work around for #213141 will be removed once it is fixed). Thanks for reporting. http://hg.netbeans.org/web-main/rev/3f8f13449044
Integrated into 'main-golden', will be available in build *201205300001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/3f8f13449044 User: Tomas Mysik <tmysik@netbeans.org> Log: #211358 - Locked by:csl.core.GsfDataObject$GenericEditorSupport$Environment.takeLock