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
GUEST: Downloading and syncronising from ftp.
budgie67: file save
inkubus08: download remote file
bartdeslagmulder: Download from remote srouce (FTP).
java.lang.Throwable: Locked by:
Created attachment 118428 [details]
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.)
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.
Correct fix depends on issue #213141.
Should be fixed (work around for #213141 will be removed once it is fixed).
Thanks for reporting.
Integrated into 'main-golden', will be available in build *201205300001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
User: Tomas Mysik <firstname.lastname@example.org>
Log: #211358 - Locked by:csl.core.GsfDataObject$GenericEditorSupport$Environment.takeLock