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.
There is a bug 184854 which keeps happening again and again. However most of the errors that happen there are related to PHP and its FTP support. That gave me an idea that the PHP must be doing something wrong. Indeed it does. org.netbeans.modules.php.project.connections.RemoteClient does not access the disk via FileObject APIs, but bypasses it and uses java.io.File access directly. This puts the system under enormous stress. Consider rewrite to FileObject API.
Is the problem with system stress related only to the style how the OutputStream is obtained or any direct usage of java.io.File object is forbidden?
Usage of java.io.File in NetBeans is not recommended in general.
Yes, the reason was that opened files were closed after their remote version was downloaded from server. This was the only solution we were able to think of at that time (and implement, it was just before NB 6.5 FCS). Likely there's a better way to do it, sorry.
To Jarda: Currently the method FileUtil.refreshFor(baseLocalDir) is used for the FileSystem synchronization. Could a calling of the method FileObject.refresh() after every change of java.io.File improve the current behavior?
*** Bug 193954 has been marked as a duplicate of this bug. ***
http://hg.netbeans.org/web-main/rev/1041531a0ebb http://hg.netbeans.org/web-main/rev/290c41d94bbb The behavior should be better now. Jardo, could you please review changes?
I don't see use of fileObject.getOutputStream() in the linked changesets at all! I can't confirm or decline whether the behavior is now better, but unless you are File system provider (which you are not right now), I consider it dangerous to heavily mangle with disk file structure via java.io.File.
Integrated into 'main-golden', will be available in build *201101090000* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/1041531a0ebb User: PGebauer <pgebauer@netbeans.org> Log: #192440 - Don't use FileOutputStream, use fileObject.getOutputStream()
*** Bug 195104 has been marked as a duplicate of this bug. ***
*** Bug 194975 has been marked as a duplicate of this bug. ***
I have rewritten the implementation while fixing issue #195141. The change set is here: http://hg.netbeans.org/main/rev/a7d34e4aaba8 Using java.io.File was replaced with using FileObjects.