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.

Bug 202673 - Downloading files for existing project randomly deletes files if upload-on-save is active
Summary: Downloading files for existing project randomly deletes files if upload-on-sa...
Status: VERIFIED FIXED
Alias: None
Product: php
Classification: Unclassified
Component: FTP Support (show other bugs)
Version: 7.1.1
Hardware: PC Windows 7 x64
: P1 normal with 10 votes (vote)
Assignee: Tomas Mysik
URL:
Keywords: RANDOM, RELNOTE
: 209125 214341 (view as bug list)
Depends on: 202728
Blocks:
  Show dependency tree
 
Reported: 2011-09-26 13:07 UTC by gunja99
Modified: 2012-08-01 21:46 UTC (History)
16 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
IDELog of problem (13.76 KB, application/zip)
2012-01-03 11:36 UTC, gmadd
Details
IDE Log and Remote Sync Log (76.36 KB, application/zip)
2012-01-03 13:56 UTC, gmadd
Details
Remote Log (2.14 KB, application/x-zip-compressed)
2012-01-11 09:48 UTC, gmadd
Details
Log files (3.92 MB, application/octet-stream)
2012-03-06 15:50 UTC, rootie
Details
grep zh_Hant.res from all log files (372.22 KB, text/x-log)
2012-03-19 08:44 UTC, Jaroslav Tulach
Details

Note You need to log in before you can comment on or make changes to this bug.
Description gunja99 2011-09-26 13:07:42 UTC
I raised a forum post here: http://forums.netbeans.org/viewtopic.php?p=115644 and was asked to log it.

I have managed to create this problem on Both Netbeans for Windows on Vista 32bit, and Windows 7 64bit.

If you create a new project for "PHP Application from Remote Source", and download all the code locally (I do have the nbproject folder in the same location). I use SFTP for the files, and have a known_hosts text document linked. I then selectively download the files (for example I don't get all the image, flash files, etc), when Downloading files few files are deleted from the server.

My remote server is a Debian Squeeze box (but have also experienced the problem in Ubuntu too), I use SVN on that box (the svn files are not downloaded, this is fine IMO, as I like to control it from the linux command line). 

The reason I know the files are gone, is if I do a svn status on the linux server I can see they're missing (with ! next to the file name), an svn update restores these.

I have searched the log output of "Remote Log: Local Ubuntu", and the files that are deleted are listed as having been downloaded, but no mention of delete, etc. I do not understand why files would be dissapearing from the server, especially as they're downloaded, and they're not files I have worked on for a while. Everytime I download files it seems a few different files have been deleted, there seems to be no pattern.

Whilst writing this, I re-downloaded my files from the 'remote' server, and the following files have been deleted from the server:

$ svn status
!       inc/ExtranetTemplateArrays.php
!       wtp/3/img/icons/18x18/reorder.gif
!       web/ckeditor/_source/lang/hu.js
!       web/images/draft_tile_red.png
!       web/help/Colour-Values-Example.pdf
!       web/fckeditor/editor/filemanager/browser/default/images/icons/htm.gif

Searching for them in the output log (I have just included the relevant parts, for 3 of the files): 

CWD /home/sites/opp2/inc
Directory successfully changed.
RETR ExtranetTemplate.php
File send OK.
...
file      wtp/3/img/icons/18x18/reorder.gif               
...
file      web/ckeditor/_source/lang/hu.js

For information purposes, the end of the log is:
Runtime: 212 s, transfered: 2,463 file(s), 31.264 MB

I stored the list of files removed on the same project last week, and they were as follows:

!       wtp/33/img/talacre-beach-logo.jpg
!       wtp/22/tmpl/welcome.tmpl
!       wtp/3/img/icons/18x18/email_template_copy.gif
!       web/ckeditor/filebrowser/browser/default/images/icons/32/swf.gif
!       web/ckeditor/_source/core/dom/element.js

It always seems to be different, and no pattern.

Someone else has reported this issue on StackOverflow: http://stackoverflow.com/questions/5963837/netbeans-7-0-randomly-delete-files-from-server-on-download-command but I cannot find it logged here at all.

If there is any further information I can provide, please let me know, as I don't think I can continue to use NetBeans (which I really want to do, because it seems like a great PHP IDE), if I cannot at least work around this issue.
Comment 1 Tomas Mysik 2011-09-26 13:27:51 UTC
First of all - thanks for reporting.

Now, I need to ask - why do you use SVN together with upload-on-save feature? Mixing these together does not make much sense to me. Any SCM is preferred, of course, so why don't you simply use SVN on both, on server and also on client? The upload-on-save feature could/should be used only if one cannot use any SCM.

Possible causes - well, if NetBeans deleted those files, then it _must_ be in the log - one log is for download action but there is one more log, for remote synchronization (upload-on-save feature). So my guess is that once you download a file, some "strange" (incorrect) event comes from FS (and the file is deleted), please review the other log (for remote synchronization) and verify that the delete operations are there.

Last and the most reliable thing that can be done is to start NetBeans with more detailed logging for (S)FTP [1] as well as for upload-on-save [2], the delete operations simply must be there. Please, do so, reopen this issue and attach (do _not_ copy & paste) the IDE log [2], it will be likely quite big so please compress it somehow (first verify that there are no sensitive information there). The log can also be sent to my private email, if you prefer.

Meantime, I will try to reproduce but as I said above, I don't see any valid reason for such setup.

Thanks a lot for your cooperation.
[1] -J-Dorg.netbeans.modules.php.project.connections.level=FINE
[2] -J-Dorg.netbeans.modules.php.project.copysupport.level=FINE
[3] View > IDE Log
Comment 2 Tomas Mysik 2011-09-26 13:37:22 UTC
Reproduced, I will investigate more.
Comment 3 gunja99 2011-09-26 14:00:48 UTC
Really pleased you have managed to replicate the problem! I would help, but haven't coded in Java for years, and frankly haven't got the time!

I didn't really want to get into the reason I use this setup, as people do do things in different ways. But when I code I test and save it ALL the time, i.e. press F5 constantly in my browser. I do NOT want to have a load of commits for tiny little comments, into my version control, I want to develop for hours if not days, and THEN commit (obviously sometimes I commit quicker if they're small issue fixes), but this is the way I work.

So as my development code is live on a Linux system, and I code in Windows, I want to upload files on save (which Netbeans does nicely), and then test on the browser, carry on coding, etc, just by pressing CTL-S. Excellent, when I'm happy with a lot of my code I commit it. I don't want to check out in windows, code away commit, and then SVN update on the dev box all the time whilst coding, it slows me down!

Zend used to allow you to code directly on the server over SFTP without downloading the files locally to windows. It was actually quite fast. It seems Netbeans doesn't allow this, but this download, and upload on save seems a good compromise, and am happy with it. As you can understand, it randomly deleting files (this issue), is not really acceptable, and because I use SVN I haven't lost anything (yet).

As I said in my forum post, I switch computers to develop on (Laptop, and Desktop machine), quite a lot, and have to 'resync' my sources by downloading the code (which I'm fine with TBH!)

Anyways, hope you find a solution, and really happy you've managed to replicate it!
Comment 4 gunja99 2011-09-26 18:54:32 UTC
Tomas did you still want me to put in more debug information as you have managed to replicate the issue? I would have done it by now, but I am not sure on how you set the extra debug settings that you mentioned. Where are these values controlled?

with regards to how I want to use NetBeans I will open a forum discussion as maybe there is a better way and other ideas on how to use it, although I hope that this issue is simple to resolve!

thanks again.

martin
Comment 5 Tomas Mysik 2011-09-26 19:19:23 UTC
(In reply to comment #4)
> Tomas did you still want me to put in more debug information as you have
> managed to replicate the issue?

Not needed since I'm able to (randomly) reproduce this issue.

> although I hope that this issue is simple to resolve!

Unfortunately, this is unlikely but definitely needs to be fixed for NB 7.1.

Thanks for reporting.
Comment 6 Tomas Mysik 2011-09-26 19:26:06 UTC
BTW I was able to reproduce it just once from 5 tries for exactly 1 file (downloading Mediawiki, about 1900 files).

Caused by upload-on-save since the download file events should be ignored but it seems that sometimes the event is not correctly recognized.

Will continue working on it.
Comment 7 gunja99 2011-09-26 19:29:41 UTC
It seems to happen every single time for, on about 3 - 7 different files. My SVN repo went down for the first time in years earlier, so I wasn't able to restore my files, so didn't want to do it again! How do I change those settings, so I can see if the deletes appear in my logs?

On a side note I actually didn't really realise how serious this could be to other developers (and myself actually), as this is destructive to code. I just read the guidelines on posting issues, and priority, and this might even fall into P1 (as it destroys code/files!). Only because I'm using svn can I work this way still!
Comment 8 Tomas Mysik 2011-09-27 11:27:12 UTC
The cause discovered, see issue #202728.

Now, I will try to work around it somehow.

Lado, it would be perfect if you could test it once it is work arounded.

Thanks.
Comment 9 Vladimir Riha 2011-09-27 11:32:51 UTC
Ok Tomas, just let me know when you found some workaround
Comment 10 Tomas Mysik 2011-09-27 12:26:03 UTC
Work arounded, please verify [1]. Thanks.

http://hg.netbeans.org/web-main/rev/ac8e36ffd4a9

[1] using http://bertram2.netbeans.org:8080/job/PHP-build/3778/ or newer
Comment 11 Quality Engineering 2011-09-28 14:01:50 UTC
Integrated into 'main-golden'
Changeset: http://hg.netbeans.org/main-golden/rev/ac8e36ffd4a9
User: Tomas Mysik <tmysik@netbeans.org>
Log: #202673 - Downloading files for existing project randomly deletes files if upload-on-save is active

Work around, can be removed once issue #202728 is fixed.
Comment 12 Vladimir Riha 2011-10-04 08:53:46 UTC
I'm sorry but I'm having some troubles with trying to reproduce it. Gunja99, would you please try it with your project?
Comment 13 gunja99 2011-10-04 09:57:02 UTC
(In reply to comment #12)
> I'm sorry but I'm having some troubles with trying to reproduce it. Gunja99,
> would you please try it with your project?

Hi there. Do you want me to use the latest version or the same version. I am no expert in Netbeans when it comes to updating or running beta/pre-release versions, etc, and all my updates have been applied, I am running version 7.0.1 build 201107282000. 

Tomas managed to replicate the issue on the build originally, with another project. I know my version is still showing the errors, but obviously I haven't upgraded with the patch in it.

Thanks, Martin
Comment 14 Vladimir Riha 2011-10-04 10:16:56 UTC
Yes please, try it with newer build, you can download it here:
http://bits.netbeans.org/dev/nightly/latest/

Thanks for help :)
Comment 15 Tomas Mysik 2011-10-04 10:21:23 UTC
(In reply to comment #13)
> Tomas managed to replicate the issue on the build originally, with another
> project.

Right, MediaWiki seems to be big enough to reproduce the problem.

> I know my version is still showing the errors, but obviously I haven't
> upgraded with the patch in it.

Work around of this issue will be part of NB 7.1 (as you can see in the Target Milestone of this issue). The proper fix needs to done somewhere else (issue #202728).
Comment 16 Tomas Mysik 2011-10-04 10:23:13 UTC
(In reply to comment #14)
> Yes please, try it with newer build, you can download it here:
> http://bits.netbeans.org/dev/nightly/latest/

Please, rather use the latest development version of NetBeans [1] since I'm not sure whether the change is propagated to the daily build already.

Thanks.
[1] http://bertram2.netbeans.org:8080/job/PHP-build/, use the zip file
Comment 17 TomAuger 2011-11-14 21:13:29 UTC
I can confirm that in 7.1 beta this issue has not been resolved. Attached is a most recent Remote Log dump. Search for DELE and you will see that 4 files were deleted at random from the remote server.


220 (vsFTPd 2.0.5)
USER iponly168797
331 Please specify the password.
PASS ******
230 Login successful.
TYPE I
200 Switching to Binary mode.
CWD /htdocs/TEST/healthydebate
250 Directory successfully changed.
CWD /htdocs/TEST/healthydebate
250 Directory successfully changed.
CWD wp-content/themes/twentyeleven/images
250 Directory successfully changed.
PWD
257 "/htdocs/TEST/healthydebate/wp-content/themes/twentyeleven/images"
SYST
215 UNIX Type: L8
PORT 192,168,2,37,6,25
200 PORT command successful. Consider using PASV.
LIST /htdocs/TEST/healthydebate/wp-content/themes/twentyeleven/images
150 Here comes the directory listing.
226 Directory send OK.
CWD /htdocs/TEST/healthydebate
250 Directory successfully changed.
DELE wp-content/themes/twentyeleven/images/comment-arrow-bypostauthor.png
250 Delete operation successful.
CWD /htdocs/TEST/healthydebate/wp-content/themes/twentyten
250 Directory successfully changed.
PORT 192,168,2,37,6,139
200 PORT command successful. Consider using PASV.
STOR author.php.new
150 Ok to send data.
226 File receive OK.
RNFR author.php.new
350 Ready for RNTO.
RNTO author.php
250 Rename successful.
CWD /htdocs/TEST/healthydebate
250 Directory successfully changed.
CWD wp-content/plugins/add-to-any/icons
250 Directory successfully changed.
PWD
257 "/htdocs/TEST/healthydebate/wp-content/plugins/add-to-any/icons"
PORT 192,168,2,37,8,115
200 PORT command successful. Consider using PASV.
LIST /htdocs/TEST/healthydebate/wp-content/plugins/add-to-any/icons
150 Here comes the directory listing.
226 Directory send OK.
CWD /htdocs/TEST/healthydebate
250 Directory successfully changed.
DELE wp-content/plugins/add-to-any/icons/tuenti.png
250 Delete operation successful.
CWD /htdocs/TEST/healthydebate
250 Directory successfully changed.
CWD wp-content/plugins/ckeditor-for-wordpress/filemanager/browser/default/images/icons/32
250 Directory successfully changed.
PWD
257 "/htdocs/TEST/healthydebate/wp-content/plugins/ckeditor-for-wordpress/filemanager/browser/default/images/icons/32"
PORT 192,168,2,37,13,16
200 PORT command successful. Consider using PASV.
LIST /htdocs/TEST/healthydebate/wp-content/plugins/ckeditor-for-wordpress/filemanager/browser/default/images/icons/32
150 Here comes the directory listing.
226 Directory send OK.
CWD /htdocs/TEST/healthydebate
250 Directory successfully changed.
DELE wp-content/plugins/ckeditor-for-wordpress/filemanager/browser/default/images/icons/32/dll.gif
250 Delete operation successful.
CWD /htdocs/TEST/healthydebate
250 Directory successfully changed.
CWD wp-content/plugins/ckeditor-for-wordpress/images
250 Directory successfully changed.
PWD
257 "/htdocs/TEST/healthydebate/wp-content/plugins/ckeditor-for-wordpress/images"
PORT 192,168,2,37,13,168
200 PORT command successful. Consider using PASV.
LIST /htdocs/TEST/healthydebate/wp-content/plugins/ckeditor-for-wordpress/images
150 Here comes the directory listing.
226 Directory send OK.
CWD /htdocs/TEST/healthydebate
250 Directory successfully changed.
DELE wp-content/plugins/ckeditor-for-wordpress/images/ckeditor_ico32.png
250 Delete operation successful.
CWD /htdocs/TEST/healthydebate/wp-content/plugins/ckeditor-for-wordpress/images
250 Directory successfully changed.
PORT 192,168,2,37,13,170
200 PORT command successful. Consider using PASV.
STOR ckeditor_ico32.png.new
150 Ok to send data.
226 File receive OK.
RNFR ckeditor_ico32.png.new
350 Ready for RNTO.
RNTO ckeditor_ico32.png
250 Rename successful.
CWD /htdocs/TEST/healthydebate/wp-content/plugins/ckeditor-for-wordpress/plugins/nggallery/langs
250 Directory successfully changed.
PORT 192,168,2,37,14,37
200 PORT command successful. Consider using PASV.
STOR en.js.new
150 Ok to send data.
226 File receive OK.
RNFR en.js.new
350 Ready for RNTO.
RNTO en.js
250 Rename successful.
CWD /htdocs/TEST/healthydebate
250 Directory successfully changed.
PORT 192,168,2,37,16,249
200 PORT command successful. Consider using PASV.
STOR wp-content.7z.new
150 Ok to send data.
226 File receive OK.
RNFR wp-content.7z.new
350 Ready for RNTO.
RNTO wp-content.7z
250 Rename successful.
CWD /htdocs/TEST/healthydebate
250 Directory successfully changed.
PORT 192,168,2,37,17,10
200 PORT command successful. Consider using PASV.
STOR wp-content.7z.new
150 Ok to send data.
226 File receive OK.
RNFR wp-content.7z.new
350 Ready for RNTO.
RNTO wp-content.7z
250 Rename successful.
Comment 18 Tomas Mysik 2011-11-15 09:36:38 UTC
(In reply to comment #17)
> I can confirm that in 7.1 beta this issue has not been resolved.

Yes, this issue is present in NB 7.1 Beta but it is solved for NB 7.1 final (one can verify using development version of NetBeans).
Comment 19 gmadd 2011-11-21 16:35:49 UTC
I'm still getting this in the latest Development Build.

Product Version: NetBeans IDE Dev (Build 201111200600)
Java: 1.6.0_23; Java HotSpot(TM) Client VM 19.0-b09
System: Windows Vista version 6.0 running on x86; Cp1252; en_GB (nb)
User directory: C:\Users\Me\.netbeans\dev
Cache directory: C:\Users\Me\.netbeans\dev\var\cache


All I'm doing is downloading the files. When the Remote Synchronization tab opens, this appears:

DELE admin/app/modules/schools/views/transactions.inc.php
250 Deleted admin/app/modules/schools/views/transactions.inc.php



220---------- Welcome to Pure-FTPd [privsep] [TLS] ----------
220-You are user number 3 of 25 allowed.
220-Local time is now 16:27. Server port: 21.
220-This is a private system - No anonymous login
220-IPv6 connections are also welcome on this server.
220 You will be disconnected after 15 minutes of inactivity.
USER username
331 User username OK. Password required
PASS ******
230 OK. Current restricted directory is /
TYPE I
200 TYPE is now 8-bit binary
CWD /www
250 OK. Current directory is /www
PWD
257 "/www" is your current location
CWD /www/pages
250 OK. Current directory is /www/pages
PORT 192,168,1,88,198,213
200 PORT command successful
STOR tradein-standard-form.inc.php.new
150 Connecting to port 50901
226-File successfully transferred
226 0.101 seconds (measured here), 489.93 Kbytes per second
RNFR tradein-standard-form.inc.php.new
350 RNFR accepted - file exists, ready for destination
RNTO tradein-standard-form.inc.php
250 File successfully renamed or moved
NOOP
200 Zzz...
CWD /www
250 OK. Current directory is /www
CWD admin/app/modules/schools/views
250 OK. Current directory is /www/admin/app/modules/schools/views
PWD
257 "/www/admin/app/modules/schools/views" is your current location
SYST
215 UNIX Type: L8
PORT 192,168,1,88,200,33
200 PORT command successful
LIST /www/admin/app/modules/schools/views
150 Connecting to port 51233
226-Options: -a -l 
226 9 matches total
CWD /www
250 OK. Current directory is /www
DELE admin/app/modules/schools/views/transactions.inc.php
250 Deleted admin/app/modules/schools/views/transactions.inc.php
CWD /www/admin
250 OK. Current directory is /www/admin
PORT 192,168,1,88,200,164
200 PORT command successful
STOR reports.php.new
150 Connecting to port 51364
226-File successfully transferred
226 0.026 seconds (measured here), 88.11 Kbytes per second
RNFR reports.php.new
350 RNFR accepted - file exists, ready for destination
RNTO reports.php
250 File successfully renamed or moved
NOOP
200 Zzz...
NOOP
200 Zzz...
NOOP
200 Zzz...
Comment 20 Vladimir Riha 2011-11-21 18:05:33 UTC
I tried it on downloading mediawiki sources several times with FTP and SFTP and I can't reproduce it.


Product Version: NetBeans IDE Dev (Build 201111020600)
Ubuntu 11.04 32b
Comment 21 Vladimir Riha 2011-12-01 17:10:29 UTC
As I wrote in previous comment, I can't reproduce it. So for me it's verified.
Comment 22 livbest 2011-12-06 13:27:43 UTC
I was also getting this rather peculiar error with Netbeans 7.0, so I downloaded the nightly build (since 201111140600), as suggested, and could not reproduce it anymore. However, once I downloaded and installed the 7.1 RC1 version, the error fired up again. PLEASE see that the change is merged into the final release 7.1!
Thank you.

Environment:
Netbeans 7.0, JDK 1.6.0.27, Windows 7 x64 - workstation
SLES 10 SP2, pure-ftp FTP server, LVM partition/ReiserFS volume for PHP - production server
Comment 23 Tomas Mysik 2011-12-06 15:56:30 UTC
Adding Jarda to CC since he has fixed issue #202728 which causes this problem.
Jardo, do you think that there could be any other use case when the issue can occur again?

Anyway, I will try to reproduce and find out where the problem could be. Any information how this problem can be reproduced is more than welcomed, of course.

Thanks.
Comment 24 Jaroslav Tulach 2011-12-07 07:24:24 UTC
Only logs can help I guess. Try -J-Dorg.netbeans.modules.masterfs.level=FINE
Comment 25 Tomas Mysik 2012-01-02 10:58:52 UTC
I also added a bit more logging [1].

So, please, anyone of you who can reliably reproduce, please help us.

1) start NB from command line with:
-J-Dorg.netbeans.modules.masterfs.level=FINE -J-Dorg.netbeans.modules.php.project.copysupport.level=FINE
2) reproduce this issue
3) attach IDE log [2] (perhaps as a ZIP since it will be huge) to this issue

Thanks a lot.
[1] http://hg.netbeans.org/web-main/rev/0e5792fcd991
[2] View > IDE Log
Comment 26 Tomas Mysik 2012-01-02 11:08:54 UTC
BTW closing back as WORKSFORME since we cannot reproduce - if anyone of you can, please, do what I wrote in comment #25 and reopen this issue.

Thanks.
Comment 27 gmadd 2012-01-03 11:36:19 UTC
Created attachment 114577 [details]
IDELog of problem
Comment 28 gmadd 2012-01-03 11:38:01 UTC
Attached (above) is my IDE Log, the files that were deleted were:

DELE scripts/export_labels.php
DELE app/assets/emails/en/InvalidAddress.html
DELE app/assets/emails/en/Receipt.html
DELE app/assets/img/qualifying-products-bar.png
DELE app/classes/Handlers/File/Batch.php
DELE app/classes/Sprockets/Sprocket.php
DELE admin/app/assets/img/icons/validation.png
DELE admin/app/classes/Handlers/Content/ImageHandler.php
DELE admin/app/classes/Sprockets/commands/provide.php
DELE admin/app/lib/class/ListModule.php
DELE admin/app/modules/tradeins/views/edit.inc.php
DELE admin/app/modules/transactions/classes/transaction-list.class.php
DELE admin/app/modules/transactions/views/edit.inc.php
DELE admin/app/modules/valuations/classes/valuation-list.class.php
DELE admin/app/views/admin-header.inc.php

I've tried to follow the instructions above, but if I've missed anything, I can try again.
Thanks
Comment 29 Tomas Mysik 2012-01-03 12:55:44 UTC
@gmadd: The IDE log is incomplete - can you please do it once again and attach messages.log file from your <nb-userdir>/var/log folder? Your userdir can be found in the Help > About dialog. Also, the complete log you already have attached here will be likely there as well (its name could be messages.log.1 or similar).

Thanks.
Comment 30 gmadd 2012-01-03 13:56:38 UTC
Created attachment 114581 [details]
IDE Log and Remote Sync Log

Attached is the full log, run again. Different files were deleted this time, I've attached that log too.
Thanks
Comment 31 Tomas Mysik 2012-01-03 14:52:39 UTC
Thanks a lot.

Jardo, could you please have a look at the FS log?

Thanks.
Comment 32 Tomas Mysik 2012-01-09 15:02:40 UTC
BTW today I made some changes in a way how the remote files are downloaded [1] - please, could anyone who can reproduce this issue try the PHP build #4250 [2] or newer (simply download the NetBeans-dev-*-php.zip, unzip and run it)?

Thanks a lot.
[1] http://hg.netbeans.org/web-main/rev/4e89e166eff1
[2] http://bertram-tst.netbeans.org:8080/job/PHP-build/
Comment 33 gmadd 2012-01-11 09:48:15 UTC
Created attachment 114785 [details]
Remote Log

Unfortunately, I'm still getting the same issue. I've tested using NetBeans-dev-2012-01-10_15-05-14-php.zip
Thanks
Comment 34 Queops 2012-01-15 16:16:30 UTC
I get this error as well and it caused me a lot of trouble so I've stopped using NetBeans for that project now. I didn't use any type of versioning control system. Currently getting this on version 7.1
Comment 35 Queops 2012-01-18 19:31:05 UTC
Please vote for this bug, it's making Netbeans dangerous to work with!
Comment 36 cahva 2012-01-19 13:10:35 UTC
Aargh!! The bug is still there in v7.1, I can confirm it. I have to change IDE also because of this as I've been struggling with the same problem lots of times.
Comment 37 Siesena 2012-01-23 10:57:58 UTC
Also getting this issue.

As I work on my projects from two locations (from home and from work), if files are deleted then development cannot continue for the rest of the 12 hour day.

I'm going to have to stop using NetBeans and find something else, as this is indeed, a very serious and dangerous issue!
Comment 38 acedude 2012-01-23 21:41:26 UTC
Most dangerous bug ATM, got same issues as guys described earlier. It has already caused lots of trouble to me ;(
Comment 39 jacky75cn 2012-01-28 17:18:37 UTC
Hi,
I can confirm the same issue using Netbeans on Mac OS X Lion.
My configuration is quite traditional. SFTP with upload on save, to upload file on the remote web server and SVN client active.

Currently I had to move back to 7.0.1: with 7.1 I broke different project under development before understanding the reason. No loss of data (SVN and backups full available) but a lot of time spent to understand what was going on.
Comment 40 Jaroslav Tulach 2012-02-01 09:38:10 UTC
I've added more logging in ergonomics#a795d6686480. As soon as that change gets to your build, please regenerate the IDE log with:

-J-Dorg.netbeans.modules.masterfs.level=FINER
-J-Dorg.netbeans.modules.php.project.copysupport.level=FINER

Thanks.
Comment 41 Tomas Mysik 2012-02-03 05:10:11 UTC
Based on Jarda's last comment, we need new log files with improved logging. The changes should be available in the development version of NetBeans sometimes next week.

Please, reopen this issue and attach the log files.

Thanks.
Comment 42 wilgert 2012-03-05 14:30:45 UTC
I am realy affected by this issue as well both on Ubuntu 11.10 64bit as Windows 7 HP 64bit. I hope it get's fixed soon!
Comment 43 Tomas Mysik 2012-03-05 15:42:36 UTC
We can't fix it now since we are still waiting for new logs (see comment #40 and comment #41). So please reproduce this issue with FINE logging in the development version of NetBeans (detailed steps can be found in comment #25) and attach your log files here.

Thanks.
Comment 44 rootie 2012-03-06 15:50:00 UTC
Created attachment 116407 [details]
Log files

i am also affected by this bug.

i have regenerated the log files using the arguments
-J-Dorg.netbeans.modules.masterfs.level=FINER
-J-Dorg.netbeans.modules.php.project.copysupport.level=FINER

the attachment also includes the output from the "Remote Log" window and "Remote Synchronization" window

some of the deleted files:
DELE vendor/symfony/src/Symfony/Component/Locale/Resources/data/region/zh_Hant.res
DELE vendor/symfony/src/Symfony/Component/DependencyInjection/Compiler/RepeatedPass.php
DELE vendor/symfony/src/Symfony/Component/Console/Formatter/OutputFormatter.php

they can be spotted relatively easy by searching in the remote synch log for lines starting with DELE (and not ending in .old)
Comment 45 Tomas Mysik 2012-03-07 08:36:29 UTC
Jardo, it seems that we have new logs as you have requested.

Thanks.
Comment 46 david541 2012-03-07 10:19:25 UTC
I have a newest version of Netbeans DEV (Build nbms-and-javadoc-8734-on-20120302). I selected Download source files from FTP and while files downloaded, again was deleted random file.

Here is LOG:
220---------- Welcome to Pure-FTPd [privsep] [TLS] ----------
220-You are user number 2 of 50 allowed.
220-Local time is now 11:06. Server port: 21.
220-This is a private system - No anonymous login
220-IPv6 connections are also welcome on this server.
220 You will be disconnected after 15 minutes of inactivity.
USER user1
331 User user1 OK. Password required
PASS ******
230-User user1 has group access to:  client7    sshusers  
230 OK. Current restricted directory is /
TYPE I
200 TYPE is now 8-bit binary
CWD /web
250 OK. Current directory is /web
PWD
257 "/web" is your current location
CWD /web
250 OK. Current directory is /web
CWD admin/nette/app/AdminUsersModule/presenters
250 OK. Current directory is /web/admin/nette/app/AdminUsersModule/presenters
PWD
257 "/web/admin/nette/app/AdminUsersModule/presenters" is your current location
SYST
215 UNIX Type: L8
PORT 10,10,10,23,197,235
200 PORT command successful
LIST -a /web/admin/nette/app/AdminUsersModule/presenters
150 Connecting to port 50667
226-Options: -a -l 
226 3 matches total
CWD /web
250 OK. Current directory is /web
DELE admin/nette/app/AdminUsersModule/presenters/AdminUsersPresenter.php
250 Deleted admin/nette/app/AdminUsersModule/presenters/AdminUsersPresenter.php
NOOP
200 Zzz...
NOOP
200 Zzz...


This LOG was opened as new second panel. In this second panel have only this log about delete (random) file. In first panel of LOG are normal LOGS about downloading files from FTP.

Please repair this bug =)

Thanks.
Comment 47 Tomas Mysik 2012-03-07 10:27:43 UTC
(In reply to comment #46)
> Please repair this bug =)

If you have discovered any other bug, please report it as a new, separate issue (with exact steps to reproduce).

Thanks.
Comment 48 gnatovsky 2012-03-08 14:52:09 UTC
I also have problems assotiated with this bug.
Windows 7 x64, NB 7.1
I temporary moved to NB 6.9, because it is impossible to work
Comment 49 igiman 2012-03-11 19:07:13 UTC
I have same problem in 7.1. Now i updated to 7.1.1 and it's still not fixed. Deleted 2 files on download (after first IDE start).
Comment 50 Tomas Mysik 2012-03-13 12:55:25 UTC
*** Bug 209125 has been marked as a duplicate of this bug. ***
Comment 51 Jaroslav Tulach 2012-03-19 08:44:59 UTC
Created attachment 116850 [details]
grep zh_Hant.res from all log files
Comment 52 Jaroslav Tulach 2012-03-19 12:39:16 UTC
A file "zh_Hant.res.0.nblh~" seems to be appearing and disappearing. Who can create/remote file with this extension.
Comment 53 Jaroslav Tulach 2012-03-19 13:11:20 UTC
I think I got it. The ".nblh" files are created by NetBeans local history module. The module does file.renameTo before save to a file and thus it may happen that file.lastModified will return 0 at the moment. This explains the "fileDeletedEvent" and also why it happens only on Windows (on Unixes the behavior is different).
Comment 54 Tomas Stupka 2012-03-19 13:35:44 UTC
(In reply to comment #53)
> I think I got it. The ".nblh" files are created by NetBeans local history
> module. The module does file.renameTo before save to a file and thus it may
> happen that file.lastModified will return 0 at the moment. This explains the
> "fileDeletedEvent" and also why it happens only on Windows (on Unixes the
> behavior is different).
described behavior was fixed in scope of issue #207273, core-main #f5fc25a58ca9
Comment 55 jacky75cn 2012-03-19 13:39:00 UTC
Hi,
as already reported the issue is also present on Mac OS X Lion and not only on Windows.

Regards,
Comment 56 Tomas Mysik 2012-03-19 13:44:33 UTC
(In reply to comment #55)
> as already reported the issue is also present on Mac OS X Lion and not only on
> Windows.

There were 2 separate issues here, both should be fixed now. Please,if possible, download the development version [1] of NetBeans and verify.

Thanks.
[1] http://bits.netbeans.org/download/trunk/nightly/latest/
Comment 57 Marian Mirilovic 2012-03-21 17:10:34 UTC
Tomas, Lada 
.... is it risky to fix it in NB 7.1 Patch 2 ? If not, I am for - so please change SW accordingly. Thanks in advance.
Comment 58 Tomas Mysik 2012-03-22 05:12:38 UTC
(In reply to comment #57)
> Tomas, Lada 
> .... is it risky to fix it in NB 7.1 Patch 2 ? If not, I am for - so please
> change SW accordingly. Thanks in advance.

This is question for Jarda and Tomas S since they have fixed this issue.
Thanks.
Comment 59 Vladimir Riha 2012-03-22 10:42:36 UTC
I tried couple of times to edit local files, save them (with upload-on-save) and download them again. No files were deleted so VERIFYING, please reopen if you encounter it again.


Product Version: NetBeans IDE Dev (Build 201203220400)
Java: 1.7.0_03; Java HotSpot(TM) Client VM 22.1-b02
System: Windows 7 version 6.1 running on x86; Cp1252; en_US (nb)
Comment 60 Tomas Stupka 2012-03-22 11:15:00 UTC
(In reply to comment #57)
> Tomas, Lada 
> .... is it risky to fix it in NB 7.1 Patch 2 ? If not, I am for - so please
> change SW accordingly. Thanks in advance.
risky.

btw - a workaround would be to set a switch 
-J-Dnetbeans.localhistory.storeChangesSynchronously=true
Comment 61 Marian Mirilovic 2012-03-22 11:24:37 UTC
(In reply to comment #60)
> > .... is it risky to fix it in NB 7.1 Patch 2 ? If not, I am for - so please
> > change SW accordingly. Thanks in advance.
> risky.

Ok, fair enough ... users facing this problem should use the switch above, but we will not port this back to patch2. Thanks Tomas.
Comment 62 wilgert 2012-03-22 11:44:01 UTC
Noob question: how do i set this switch?
Comment 63 Tomas Mysik 2012-03-22 11:48:16 UTC
(In reply to comment #62)
> Noob question: how do i set this switch?

Simply start NB from command line and provide this parameter or add it to your <nbdir>/etc/netbeans.conf (add it to the "netbeans_default_options" property).
Comment 64 Jaroslav Tulach 2012-04-17 15:32:41 UTC
*** Bug 211317 has been marked as a duplicate of this bug. ***
Comment 65 Tomas Mysik 2012-06-18 08:00:25 UTC
*** Bug 214341 has been marked as a duplicate of this bug. ***
Comment 66 mangia 2012-08-01 21:43:07 UTC
NetBeans IDE 7.1.2 (Build 201204101705)

The problem is still here... Random files were deleted when Download option is used.
Comment 67 Tomas Stupka 2012-08-01 21:46:49 UTC
(In reply to comment #66)
> NetBeans IDE 7.1.2 (Build 201204101705)
> The problem is still here... Random files were deleted when Download option is
> used.
was fixed in 7.2