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 5002 - When saving/compiling across a network, user gets "File has been externally modified" message.
Summary: When saving/compiling across a network, user gets "File has been externally m...
Status: REOPENED
Alias: None
Product: platform
Classification: Unclassified
Component: Filesystems (show other bugs)
Version: 3.x
Hardware: All All
: P4 normal (vote)
Assignee: Jaroslav Havlin
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 1999-12-15 20:42 UTC by _ tboudreau
Modified: 2013-05-30 13:58 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Netbeans log with notifyModified (58.74 KB, application/octet-stream)
2013-05-14 14:00 UTC, teynon
Details

Note You need to log in before you can comment on or make changes to this bug.
Description _ tboudreau 1999-12-15 20:42:50 UTC
I`m working on a Win98 box with Sun Jdk1.2.2 but
I`ve all my source/class files on a Linux/Samba server.
every time I save my files or compiles them (with

the external compiler) Forte pop up a very
annoying dialog saying the the file has
been modified externally and ask me if I
want to reload it...

[jglick] I seem to get this too, though not consistently. I also am using an NT box with sources mounted on a Samba drive, and usually use the external compiler. I am not sure if it happens after savi
ng as such, or after compiling--it does not always happen.

[jglick] I am getting this pretty consistently in 481 on my laptop. It is Win2000; I am editing files which normally exist on a network drive, but I have them sychronized to local disk and am working
on them offline. Seems to happen when I modify a file; compile it (using ext comp), which autosaves it; then when switching to another editor tab, the dialog appears.

[jglick] Still here and 100% consistent in 497 on Win2000 with same synchronized-files setup. Very annoying; dialog appears once per file save, under all conditions.
Comment 1 Marek Grummich 2000-07-25 09:08:59 UTC
Priority is changed to P4 (normal).
Comment 2 Pavel Buzek 2001-01-09 14:09:59 UTC
Mila, is this bug still apearing in the current code?
Otherwise, can you close it?
Comment 3 Miloslav Metelka 2001-01-10 16:47:59 UTC
I think it's fixed already. I will close it as fixed. If it appears again we
will reopen it.
Comment 4 Quality Engineering 2003-07-01 16:00:57 UTC
Resolved for 3.4.x or earlier, no new info since then -> verified.

Comment 5 Quality Engineering 2003-07-01 16:24:26 UTC
Resolved for 3.4.x or earlier, no new info since then -> closing.
Comment 6 teynon 2013-05-10 18:54:42 UTC
I am experiencing this exact issue on 7.3 Build 201302132200. 

Windows 7 64 bit accessing files on a Linux/Samba server. Saving the file causes the message and navigating away and then refocusing with unsaved changes occasionally results in "X was modified externally. Reload it?"

I've tried clearing cache and re-installing. There seems to be a short period after start-up that this doesn't happen.

This may or may not be related, but adding a space to a new line anywhere in a file is automatically converted to around 16 to 20 spaces.
Comment 7 _ tboudreau 2013-05-10 19:04:27 UTC
Wow, a bug from the dawn of time reopened!

If the data in your files is not being saved correctly, I'd suspect something is badly broken in the network or Samba setup.  Is that reproducible with Notepad or similar?

Depending on the file type, it's also possible that when you pressed enter, the IDE simply indented the next line and inserted spaces to do that, which would be normal behavior.
Comment 8 teynon 2013-05-13 13:27:19 UTC
(In reply to comment #7)
> Wow, a bug from the dawn of time reopened!
> 
> If the data in your files is not being saved correctly, I'd suspect something
> is badly broken in the network or Samba setup.  Is that reproducible with
> Notepad or similar?
> 
> Depending on the file type, it's also possible that when you pressed enter, the
> IDE simply indented the next line and inserted spaces to do that, which would
> be normal behavior.

Yeah, I noticed the date on it too. I considered opening a new one, but it was this issue exactly. It is not reproducible with notepad or notepad++. Other developers using the exact same setup were not experiencing the issue on the same files on the network.

I am working with PHP files and the issue occurs regardless of which key I entered. I can type any letter, number, or character and push CTRL+S and the message would pop up. I can reproduce on demand. Is there a log file anywhere, that I can post, that would help with this?
Comment 9 teynon 2013-05-13 13:29:07 UTC
Also, it is saving the files fine. However, it's giving me warnings every time I change a character.
Comment 10 Miloslav Metelka 2013-05-14 07:48:55 UTC
Could you please check whether a modification datetime of the file (possibly use ls --full-time in bash) upon save corresponds with the actual system's datetime?

If you could run the IDE with parameter (possibly see http://wiki.netbeans.org/FaqStartupParameters)

-J-Dorg.openide.text.CloneableEditorSupport.level=FINE

and attach the resulting messages.log to this issue (possibly see http://wiki.netbeans.org/FaqLogMessagesFile)? Thanks.
Comment 11 teynon 2013-05-14 14:00:29 UTC
Created attachment 134423 [details]
Netbeans log with notifyModified

EDT 2013
FINE [org.openide.text.CloneableEditorSupport]: PExcel.php: saveDocument() started.
FINE [org.openide.text.CloneableEditorSupport]: PExcel.php: Saved 26204 bytes to memory output stream.
FINE [org.openide.text.CloneableEditorSupport]: PExcel.php: Setting new lastSaveTime to -1, Wed Dec 31 18:59:59 EST 1969
FINE [org.openide.text.CloneableEditorSupport]: PExcel.php: setAlreadyModified from true to false
FINE [org.openide.text.CloneableEditorSupport]: PExcel.php: Save to file OK, oldSaveTime: 1368539627000, Tue May 14 09:53:47 EDT 2013
FINE [org.openide.text.CloneableEditorSupport]: PExcel.php: Setting new lastSaveTime to 1368539627000, Tue May 14 09:53:47 EDT 2013
FINE [org.openide.text.CloneableEditorSupport]: PExcel.php: setAlreadyModified from false to true
FINE [org.openide.text.CloneableEditorSupport]: notifyModified returns true; env.isModified()=true
FINE [org.openide.text.CloneableEditorSupport]: PExcel.php: saveDocument() started.
FINE [org.openide.text.CloneableEditorSupport]: PExcel.php:  externalMod=1368539629000 > prevLST=1368539627000 => throw new UserQuestionException()
FINE [org.openide.text.CloneableEditorSupport]: PExcel.php: Setting new lastSaveTime to 1368539629000, Tue May 14 09:53:49 EDT 2013
FINE [org.openide.text.CloneableEditorSupport]: PExcel.php: saveDocument() started.
FINE [org.openide.text.CloneableEditorSupport]: PExcel.php: Saved 26203 bytes to memory output stream.
FINE [org.openide.text.CloneableEditorSupport]: PExcel.php: Setting new lastSaveTime to -1, Wed Dec 31 18:59:59 EST 1969
FINE [org.openide.text.CloneableEditorSupport]: PExcel.php: setAlreadyModified from true to false
FINE [org.openide.text.CloneableEditorSupport]: PExcel.php: Save to file OK, oldSaveTime: 1368539629000, Tue May 14 09:53:49 EDT 2013
FINE [org.openide.text.CloneableEditorSupport]: PExcel.php: Setting new lastSaveTime to 1368539629000, Tue May 14 09:53:49 EDT 2013
FINE [org.openide.text.CloneableEditorSupport]: PExcel.php: setAlreadyModified from false to true
FINE [org.openide.text.CloneableEditorSupport]: notifyModified returns true; env.isModified()=true
FINE [org.openide.text.CloneableEditorSupport]: PExcel.php: saveDocument() started.
FINE [org.openide.text.CloneableEditorSupport]: PExcel.php:  externalMod=1368539631000 > prevLST=1368539629000 => throw new UserQuestionException()
FINE [org.openide.text.CloneableEditorSupport]: PExcel.php: Setting new lastSaveTime to 1368539631000, Tue May 14 09:53:51 EDT 2013
FINE [org.openide.text.CloneableEditorSupport]: PExcel.php: saveDocument() started.
FINE [org.openide.text.CloneableEditorSupport]: PExcel.php: Saved 26204 bytes to memory output stream.
FINE [org.openide.text.CloneableEditorSupport]: PExcel.php: Setting new lastSaveTime to -1, Wed Dec 31 18:59:59 EST 1969
FINE [org.openide.text.CloneableEditorSupport]: PExcel.php: setAlreadyModified from true to false
FINE [org.openide.text.CloneableEditorSupport]: PExcel.php: Save to file OK, oldSaveTime: 1368539631000, Tue May 14 09:53:51 EDT 2013
FINE [org.openide.text.CloneableEditorSupport]: PExcel.php: Setting new lastSaveTime to 1368539631000, Tue May 14 09:53:51 EDT 2013
FINE [org.openide.text.CloneableEditorSupport]: PExcel.php: setAlreadyModified from false to true
FINE [org.openide.text.CloneableEditorSupport]: notifyModified returns true; env.isModified()=true
FINE [org.openide.text.CloneableEditorSupport]: PExcel.php: saveDocument() started.
FINE [org.openide.text.CloneableEditorSupport]: PExcel.php:  externalMod=1368539633000 > prevLST=1368539631000 => throw new UserQuestionException()
FINE [org.openide.text.CloneableEditorSupport]: PExcel.php: Setting new lastSaveTime to 1368539633000, Tue May 14 09:53:53 EDT 2013
FINE [org.openide.text.CloneableEditorSupport]: PExcel.php: saveDocument() started.
FINE [org.openide.text.CloneableEditorSupport]: PExcel.php: Saved 26203 bytes to memory output stream.
FINE [org.openide.text.CloneableEditorSupport]: PExcel.php: Setting new lastSaveTime to -1, Wed Dec 31 18:59:59 EST 1969
FINE [org.openide.text.CloneableEditorSupport]: PExcel.php: setAlreadyModified from true to false
FINE [org.openide.text.CloneableEditorSupport]: PExcel.php: Save to file OK, oldSaveTime: 1368539633000, Tue May 14 09:53:53 EDT 2013
FINE [org.openide.text.CloneableEditorSupport]: PExcel.php: Setting new lastSaveTime to 1368539633000, Tue May 14 09:53:53 EDT 2013
FINE [org.openide.text.CloneableEditorSupport]: PExcel.php: PROP_TIME new value: Tue May 14 09:53:56 EDT 2013, 1368539636000
FINE [org.openide.text.CloneableEditorSupport]:        lastSaveTime: Tue May 14 09:53:53 EDT 2013, 1368539633000
FINE [org.openide.text.CloneableEditorSupport]:              reload: true
FINE [org.openide.text.CloneableEditorSupport]: PExcel.php: reload task posted
FINE [org.openide.text.CloneableEditorSupport]: PExcel.php: checkReload noAsk: true
FINE [org.openide.text.CloneableEditorSupport]: reloadDocument in Thread[AWT-EventQueue-0,6,IDE Main]
FINE [org.openide.text.CloneableEditorSupport]: clearDocument
FINE [org.openide.text.CloneableEditorSupport]: PExcel.php: Setting new lastSaveTime to 1368539636000, Tue May 14 09:53:56 EDT 2013
FINE [org.openide.text.CloneableEditorSupport]: post-reload task posting to AWT
FINE [org.openide.text.CloneableEditorSupport]: Posting the AWT runnable: org.openide.text.CloneableEditorSupport$9$2@73fa8402
FINE [org.openide.text.CloneableEditorSupport]: Posted in Thread[AWT-EventQueue-0,6,IDE Main]
FINE [org.openide.text.CloneableEditorSupport]: task-discardAllEdits
FINE [org.openide.text.CloneableEditorSupport]: task-check already modified
FINE [org.openide.text.CloneableEditorSupport]: task-addUndoableEditListener
Comment 12 teynon 2013-05-14 14:06:00 UTC
Last bash file save time appears to match the last one in netbeans.
-rwxrwxrwx 1 teynon developers 26203 2013-05-14 09:53:56.000000000 -0400 PExcel.php

I attached the complete log file. Maybe this is expected, but in the log file, I am seeing an odd time:

FINE [org.openide.text.CloneableEditorSupport]: PExcel.php: saveDocument() started.
FINE [org.openide.text.CloneableEditorSupport]: PExcel.php: Saved 26204 bytes to memory output stream.
FINE [org.openide.text.CloneableEditorSupport]: PExcel.php: Setting new lastSaveTime to -1, Wed Dec 31 18:59:59 EST 1969
FINE [org.openide.text.CloneableEditorSupport]: PExcel.php: setAlreadyModified from true to false
FINE [org.openide.text.CloneableEditorSupport]: PExcel.php: Save to file OK, oldSaveTime: 1368539627000, Tue May 14 09:53:47

Note the: Setting new lastSaveTime to -1, Wed Dec 31 18:59:59 EST 1969
Comment 13 teynon 2013-05-14 14:25:27 UTC
The save date and the linux date appear to be in sync, but I did notice that my Win 7 system time appears to be about 1 - 2 seconds ahead of the bash date time.