You are here: PSPad forum > English discussion forum > File Contents were Changed. Reload?

File Contents were Changed. Reload?

Goto Page: Previous1 2 3 4 5 6 7

#61 Re: File Contents were Changed. Reload?

Posted by: orel | Date: 2013-04-30 07:23 | IP: IP Logged

Interestingly, if we save the file encoded in UTF8, then we have no problems

Options: Reply | Quote | Up ^


#62 Re: File Contents were Changed. Reload?

Posted by: Merome | Date: 2013-08-19 13:12 | IP: IP Logged

Using PSPad for years (many thanks), I have a new PC since last week and this problem occured.

Last PC : Win Xp editing files on network shared (Win 2003) => no problem.
New PC : Win7 editing the same files => problem appears all the time.

Symptoms :
1. When I save the edited file (a PHP script encoded in ISO-8859-2, served by Apache on the Win 2003 machine), it become inaccessible from webserver for a while (about 5 seconds). Apache saying : "Warning: Unknown: failed to open stream: Permission denied in Unknown on line 0 Fatal error: Unknown: Failed opening required 'D:/Apache/htdocs/Geidephp/workflow.php' (include_path='.;D:\PHP\pear') in Unknown on line 0 "
Then the script become accessible from his URL.

2. When I return to the PSPad window, I get : "File Contents were Changed. Reload?" but nothing has changed (I'm the only one working on this file).

Reading the last post in this thread, I tried to turn encoding to "UTF-8", and the two symptoms disappeared : no more inaccessible file on the webserver, nor "File contents were changed". But, unfortunately, the accentuation of the displays of the script is broken.

I hope this can help you to solve the problem. I summarize :
- It appears with Win7 (Win XP worked fine in same conditions)
- It locks the file for the web server for a few seconds
- It detects a false modification
- It disappear if I turn encoding to UTF-8

I subscribe to the thread, if you want me to do more testing, please tell me.

Oups I forgot the PSPad Version : 4.5.7 (2450) (I can't remember the version of my last PC)

Edited 1 time(s). Last edit at 2013-08-19 13:14 by Merome.

Options: Reply | Quote | Up ^


#63 Re: File Contents were Changed. Reload?

Posted by: pspad | Date: 2013-08-19 14:19 | IP: IP Logged

Thank you for detailed description. I will try to investigate what's going on.

Options: Reply | Quote | Up ^


#64 Re: File Contents were Changed. Reload?

Posted by: sonic9 | Date: 2013-08-23 22:00 | IP: IP Logged

on win8 x64, same problem, editing ansi txt file stored on a qnap nas (samba share), if i convert to utf-8, there isn't problem.

edit: I have tested on a win7 x86 shared folder and same problem, fixed if converted to utf-8 ...

Edited 1 time(s). Last edit at 2013-08-23 22:06 by sonic9.

Options: Reply | Quote | Up ^


#65 Re: File Contents were Changed. Reload?

Posted by: gwinkless | Date: 2013-10-03 14:47 | IP: IP Logged

I have suddenly started seeing this, since maybe a couple of weeks ago (after the last set of windows updates? not sure)

PSPad 4.5.8 (2457), Windows 7 x64, NTP time, accessing samba shares on a server (which I control) that is also NTP'd to the same server and with the same timezone settings. smb.conf file hasn't changed since 2011.

Running in XP compatibility mode doesn't help. Changing to previous versions of PSPad doesn't help.

As noted previously, changing "Format" to UTF-8 (or indeed either of the UTF-16's, although I'm not doing that!) does resolve this problem; I can imagine that might give a hint as to what's going wrong? Changing to any of the other settings doesn't help :(

stat says that the file update time is changing some 10-15 seconds after the initial save:

$ stat /tmp/wibble
File: `/tmp/wibble'
Size: 22686 Blocks: 48 IO Block: 4096 regular file
Device: 842h/2114d Inode: 19 Links: 1
Access: (0744/-rwxr--r--) Uid: ( 0/ root) Gid: ( 0/ root)
Access: 2013-10-03 14:17:21.000000000 +0100
Modify: 2013-10-03 14:57:02.000000000 +0100
Change: 2013-10-03 14:57:02.000000000 +0100

$ stat /tmp/wibble
File: `/tmp/wibble'
Size: 22686 Blocks: 48 IO Block: 4096 regular file
Device: 842h/2114d Inode: 19 Links: 1
Access: (0744/-rwxr--r--) Uid: ( 0/ root) Gid: ( 0/ root)
Access: 2013-10-03 14:17:21.000000000 +0100
Modify: 2013-10-03 14:57:14.000000000 +0100
Change: 2013-10-03 14:57:13.000000000 +0100

Turning up debug logging in samba suggests that something is opening the file multiple times when saving in ANSI mode, with one of the filehandles being kept open for the duration:

When saving in UTF8 mode:
[2013/10/03 15:35:41.487168, 2] smbd/open.c:634(open_file)
root opened file tmp/wibble read=No write=Yes (numopen=1)
[2013/10/03 15:35:41.501812, 2] smbd/close.c:656(close_normal_file)
root closed file tmp/wibble (numopen=0) NT_STATUS_OK

When saving in ANSI mode:
[2013/10/03 15:42:55.127573, 2] smbd/open.c:634(open_file)
root opened file tmp/wibble read=Yes write=No (numopen=1)
[2013/10/03 15:42:55.150337, 2] smbd/open.c:634(open_file)
root opened file tmp/wibble read=No write=No (numopen=2)
[2013/10/03 15:42:55.160314, 2] smbd/close.c:656(close_normal_file)
root closed file tmp/wibble (numopen=1) NT_STATUS_OK
[2013/10/03 15:42:55.162229, 2] smbd/close.c:656(close_normal_file)
root closed file tmp/wibble (numopen=0) NT_STATUS_OK
[2013/10/03 15:42:55.163473, 2] smbd/open.c:634(open_file)
root opened file tmp/wibble read=No write=Yes (numopen=1)
[2013/10/03 15:42:55.170458, 2] smbd/open.c:634(open_file)
root opened file tmp/wibble read=No write=No (numopen=2)
[2013/10/03 15:42:55.171926, 2] smbd/close.c:656(close_normal_file)
root closed file tmp/wibble (numopen=1) NT_STATUS_OK

[2013/10/03 15:43:07.507428, 2] smbd/close.c:656(close_normal_file)
root closed file tmp/wibble (numopen=0) NT_STATUS_OK

Note the 8 second gap between the penultimate and last close() calls.

Turning off opportunistic locking in samba ("oplocks=no" in /etc/samba/smb.conf) does seem to stop the problem, although that's not ideal.

This is about as far as my knowledge goes. We did change to Symantec AV recently, although I have a feeling the errors started before that; however it might be worth noting if others with the same problem are also using Symantec?

Note that notepad++ doesn't exhibit the same behaviour even when saving as ANSI, so even if symantec is doing something odd it's not affecting everything.

Edited 1 time(s). Last edit at 2013-10-03 14:48 by gwinkless.

Options: Reply | Quote | Up ^


#66 Re: File Contents were Changed. Reload?

Posted by: gwinkless | Date: 2013-10-07 12:18 | IP: IP Logged

gwinkless:
This is about as far as my knowledge goes.

OK, so I did a bit more digging. smiling smiley

I ran process monitor and filtered for the filename, saving once as UTF8 and once as ANSI

Both ANSI and UTF8 start out like this:

13:04:04.4120808 PSPad.exe 5912 CreateFile \\myserver\myshare\testfile SUCCESS Desired Access: Read Attributes, Disposition: Open, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a, OpenResult: Opened
13:04:04.4197268 PSPad.exe 5912 QueryNetworkOpenInformationFile \\myserver\myshare\testfile SUCCESS CreationTime: 03/10/2013 13:47:42, LastAccessTime: 03/10/2013 13:47:42, LastWriteTime: 07/10/2013 13:04:03, ChangeTime: 07/10/2013 13:04:03, AllocationSize: 01/01/1601 01:00:00, EndOfFile: 01/01/1601 01:00:00, FileAttributes: A
13:04:04.4202671 PSPad.exe 5912 CloseFile \\myserver\myshare\testfile SUCCESS
13:04:04.4289214 PSPad.exe 5912 CreateFile \\myserver\myshare\testfile SUCCESS Desired Access: Read Attributes, Disposition: Open, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a, OpenResult: Opened
13:04:04.4352822 PSPad.exe 5912 QueryBasicInformationFile \\myserver\myshare\testfile SUCCESS CreationTime: 03/10/2013 13:47:42, LastAccessTime: 03/10/2013 13:47:42, LastWriteTime: 07/10/2013 13:04:03, ChangeTime: 07/10/2013 13:04:03, FileAttributes: A
13:04:04.4357708 PSPad.exe 5912 CloseFile \\myserver\myshare\testfile SUCCESS
13:04:04.4401144 PSPad.exe 5912 CreateFile \\myserver\myshare\testfile SUCCESS Desired Access: Write Attributes, Synchronize, Disposition: Open, Options: Synchronous IO Non-Alert, Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a, OpenResult: Opened
13:04:04.4478802 PSPad.exe 5912 SetBasicInformationFile \\myserver\myshare\testfile SUCCESS CreationTime: 01/01/1601 01:00:00, LastAccessTime: 01/01/1601 01:00:00, LastWriteTime: 01/01/1601 01:00:00, ChangeTime: 01/01/1601 01:00:00, FileAttributes: AN
13:04:04.4484688 PSPad.exe 5912 CloseFile \\myserver\myshare\testfile SUCCESS
13:04:04.4587408 PSPad.exe 5912 CreateFile \\myserver\myshare\testfile SUCCESS Desired Access: Read Attributes, Disposition: Open, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a, OpenResult: Opened
13:04:04.4650277 PSPad.exe 5912 QueryNetworkOpenInformationFile \\myserver\myshare\testfile SUCCESS CreationTime: 03/10/2013 13:47:42, LastAccessTime: 03/10/2013 13:47:42, LastWriteTime: 07/10/2013 13:04:03, ChangeTime: 07/10/2013 13:04:03, AllocationSize: 01/01/1601 01:00:00, EndOfFile: 01/01/1601 01:00:00, FileAttributes: A
13:04:04.4655590 PSPad.exe 5912 CloseFile \\myserver\myshare\testfile SUCCESS
13:04:04.4697467 PSPad.exe 5912 CreateFile \\myserver\myshare\testfile SUCCESS Desired Access: Generic Write, Read Attributes, Disposition: Open, Options: Synchronous IO Non-Alert, Non-Directory File, Attributes: N, ShareMode: None, AllocationSize: n/a, OpenResult: Opened
13:04:04.4760707 PSPad.exe 5912 SetEndOfFileInformationFile \\myserver\myshare\testfile SUCCESS EndOfFile: 42,353
13:04:04.4766520 PSPad.exe 5912 SetAllocationInformationFile \\myserver\myshare\testfile SUCCESS AllocationSize: 42,353
13:04:04.4771976 PSPad.exe 5912 WriteFile \\myserver\myshare\testfile SUCCESS Offset: 0, Length: 42,353, Priority: Normal
13:04:04.4816534 PSPad.exe 5912 CloseFile \\myserver\myshare\testfile SUCCESS
13:04:04.4862162 PSPad.exe 5912 CreateFile \\myserver\myshare\testfile SUCCESS Desired Access: Write Attributes, Synchronize, Disposition: Open, Options: Synchronous IO Non-Alert, Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a, OpenResult: Opened
13:04:04.4873521 PSPad.exe 5912 SetBasicInformationFile \\myserver\myshare\testfile SUCCESS CreationTime: 01/01/1601 01:00:00, LastAccessTime: 01/01/1601 01:00:00, LastWriteTime: 01/01/1601 01:00:00, ChangeTime: 01/01/1601 01:00:00, FileAttributes: AN
13:04:04.4879457 PSPad.exe 5912 CloseFile \\myserver\myshare\testfile SUCCESS
13:04:04.4969427 PSPad.exe 5912 QueryDirectory \\myserver\myshare\testfile SUCCESS Filter: testfile, 1: testfile
13:04:04.5087018 PSPad.exe 5912 QueryDirectory \\myserver\myshare\testfile SUCCESS Filter: testfile, 1: testfile

All well and good; however, for the ANSI save only, 10 seconds later:

13:04:14.6294097 PSPad.exe 5912 CreateFile \\myserver\myshare\testfile SUCCESS Desired Access: Read Attributes, Disposition: Open, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a, OpenResult: Opened
13:04:14.6311044 PSPad.exe 5912 QueryNetworkOpenInformationFile \\myserver\myshare\testfile SUCCESS CreationTime: 03/10/2013 13:47:42, LastAccessTime: 03/10/2013 13:47:42, LastWriteTime: 07/10/2013 13:04:05, ChangeTime: 07/10/2013 13:04:05, AllocationSize: 01/01/1601 01:00:00, EndOfFile: 01/01/1601 01:00:00, FileAttributes: A
13:04:14.6316718 PSPad.exe 5912 CloseFile \\myserver\myshare\testfile SUCCESS
13:04:14.6389831 PSPad.exe 5912 CreateFile \\myserver\myshare\testfile SUCCESS Desired Access: Read Attributes, Disposition: Open, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a, OpenResult: Opened
13:04:14.6400402 PSPad.exe 5912 QueryBasicInformationFile \\myserver\myshare\testfile SUCCESS CreationTime: 03/10/2013 13:47:42, LastAccessTime: 03/10/2013 13:47:42, LastWriteTime: 07/10/2013 13:04:05, ChangeTime: 07/10/2013 13:04:05, FileAttributes: A
13:04:14.6404788 PSPad.exe 5912 CloseFile \\myserver\myshare\testfile SUCCESS
13:04:14.6438229 PSPad.exe 5912 QueryDirectory \\myserver\myshare\testfile SUCCESS Filter: testfile, 1: testfile
13:04:15.5922956 PSPad.exe 5912 CreateFile \\myserver\myshare\testfile SUCCESS Desired Access: Read Attributes, Disposition: Open, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a, OpenResult: Opened
13:04:15.5933014 PSPad.exe 5912 QueryNetworkOpenInformationFile \\myserver\myshare\testfile SUCCESS CreationTime: 03/10/2013 13:47:42, LastAccessTime: 03/10/2013 13:47:42, LastWriteTime: 07/10/2013 13:04:05, ChangeTime: 07/10/2013 13:04:05, AllocationSize: 01/01/1601 01:00:00, EndOfFile: 01/01/1601 01:00:00, FileAttributes: A
13:04:15.5936795 PSPad.exe 5912 CloseFile \\myserver\myshare\testfile SUCCESS
13:04:15.5998121 PSPad.exe 5912 CreateFile \\myserver\myshare\testfile SUCCESS Desired Access: Read Attributes, Disposition: Open, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a, OpenResult: Opened
13:04:15.6011030 PSPad.exe 5912 QueryBasicInformationFile \\myserver\myshare\testfile SUCCESS CreationTime: 03/10/2013 13:47:42, LastAccessTime: 03/10/2013 13:47:42, LastWriteTime: 07/10/2013 13:04:05, ChangeTime: 07/10/2013 13:04:05, FileAttributes: A
13:04:15.6016131 PSPad.exe 5912 CloseFile \\myserver\myshare\testfile SUCCESS
13:04:15.6048910 PSPad.exe 5912 QueryDirectory \\myserver\myshare\testfile SUCCESS Filter: testfile, 1: testfile

So it certainly looks like pspad is deliberately saving the file twice.

Options: Reply | Quote | Up ^


#67 Re: File Contents were Changed. Reload?

Posted by: gwinkless | Date: 2014-05-30 10:04 | IP: IP Logged

For anyone following this thread, this is now fixed in the latest development build (4.5.8 (2471))

Options: Reply | Quote | Up ^


#68 Re: File Contents were Changed. Reload?

Posted by: Merome | Date: 2014-09-22 14:57 | IP: IP Logged

I've just downloaded and installed 4.5.9 (2503), and I still get an error with ISO-8859 files saved on a shared folder : Apache cannot access the file for a couple of seconds. See message #62

However, the message "File Contents were Changed. Reload?" doesn't appear anymore when returning on PsPad.

Options: Reply | Quote | Up ^


#69 Re: File Contents were Changed. Reload?

Posted by: pspad | Date: 2014-09-22 15:10 | IP: IP Logged

Merome:
I've just downloaded and installed 4.5.9 (2503), and I still get an error with ISO-8859 files saved on a shared folder : Apache cannot access the file for a couple of seconds. See message #62

However, the message "File Contents were Changed. Reload?" doesn't appear anymore when returning on PsPad.

Please check access rights. Maybe PSPad, cause it runs under your account sets rights when save file what doesn't suit for Apache.
Try to open Program settings / Direct edit and change value of variable:
DontChangeFileAttribs=1
It should keep access rights on Samba without change

Options: Reply | Quote | Up ^


Goto Page: Previous1 2 3 4 5 6 7





Editor PSPad - freeware editor, © 2001 - 2021 Jan Fiala, Hosted by Webhosting TOJEONO.CZ, design by WebDesign PAY & SOFT, code Petr Dvořák, Privacy policy and GDPR