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 245417 - Last edited data loss after saving the remote source file
Summary: Last edited data loss after saving the remote source file
Status: RESOLVED DUPLICATE of bug 246127
Alias: None
Product: cnd
Classification: Unclassified
Component: Remote (show other bugs)
Version: 8.0
Hardware: PC All
: P2 normal (vote)
Assignee: Vladimir Kvashin
URL:
Keywords:
: 246116 (view as bug list)
Depends on: 246127
Blocks:
  Show dependency tree
 
Reported: 2014-07-04 16:17 UTC by Alexander Pepin
Modified: 2014-08-07 11:25 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Error dialogthat appears (10.46 KB, image/png)
2014-07-30 08:46 UTC, Vladimir Kvashin
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Pepin 2014-07-04 16:17:35 UTC
The typical scenario provided by one of our customers:
- open remote file for editing (use a remote host with slow connection)
- start editing
- press Ctrl+S to save the data and continue editing (do not wait until saving is completed)
Result: When saving is completed some of the latest changes got lost and some (mostly the last entered line) moved to the bottom of the source file.
Comment 1 Vladimir Kvashin 2014-07-04 17:57:14 UTC
I confirm not exactly the same, but wrong behavior in 7.4, 8.0 and dev version.
Lines aren't mixed, but 
1) file content on remote host and in editor differs
2) NB displays warning, something like "Can not lock file"
3) file is "bold", i.e. not saved in editor any more, pressing ctrl-S does not help
Comment 2 Vladimir Kvashin 2014-07-24 20:03:34 UTC
fixed in 
http://hg.netbeans.org/cnd-main/rev/c5c496742a34
Comment 3 Quality Engineering 2014-07-26 01:23:55 UTC
Integrated into 'main-silver', will be available in build *201407260001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/c5c496742a34
User: Vladimir Kvashin <vkvashin@netbeans.org>
Log: fixed #245417 - Last edited data loss after saving the remote source file
Comment 4 soldatov 2014-07-28 12:48:34 UTC
Tatiana has this bug in new build too.
Comment 5 soldatov 2014-07-29 13:50:46 UTC
I use such scenario:
1) Open C++ file in Favorites tab
2) Add new line
3) Press Ctrl-S
4) Repeat 2)-3) steps (I need <5 cycles in order to break editor)
Comment 6 Vladimir Kvashin 2014-07-30 08:43:03 UTC
*** Bug 246116 has been marked as a duplicate of this bug. ***
Comment 7 Vladimir Kvashin 2014-07-30 08:46:07 UTC
Created attachment 148402 [details]
Error dialogthat appears

I can reproduce this. In my case, after several edit-save-edit-save actions, an error message "There were some problems when saving <filename>: Cause: cannot write to locked file" appears, see attachment
Comment 8 Vladimir Kvashin 2014-07-30 20:22:21 UTC
I investigated the difference between remote fs and masterds; 
after the partial fix below they seem to behave the same way
http://hg.netbeans.org/cnd-main/rev/2d2b4d078498

But unfortunately I see the same behavior with masterfs if file system is slow (like /net/some_host_in_usa/export/home/...).
I filed an issue 246127 against editor
Comment 9 Quality Engineering 2014-07-31 08:58:10 UTC
Integrated into 'main-silver', will be available in build *201407310738* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/2d2b4d078498
User: Vladimir Kvashin <vkvashin@netbeans.org>
Log: fixing #245417 - Last edited data loss after saving the remote source file
Comment 10 Vladimir Kvashin 2014-08-07 11:25:48 UTC
It is in fact a duplicate of 246127

*** This bug has been marked as a duplicate of bug 246127 ***