I keep getting the "The file 'somefile.txt' on the disk is more recent than the current buffer." message after ~30 seconds on each save.
I'm using Ubuntu's network drive system to edit files on a remote system so the filenames are "/run/user/1000/gvfs/sftp:host= ...". This wasn't an issue with the 1.24 release and only started happening after upgrading to 1.25.
Is this a known issue?
Also, is there any way to downgrade to the 1.24 version? I'm using the PPA, but it doesn't look like the 1.24 version is available on there any more.
On 21/07/15 19:42, Tim Tisdall wrote:
Is this a known issue?
I’m not having problems with this myself on Ubuntu. I think it could well be due to the FUSE SFTP layer refreshing your files and clobbering the modification times, and Geany getting confused. This is only a guess as I haven’t used SFTP mounts lately. Does the same thing happen with files on the local disk?
Did you update Ubuntu lately? I’m guessing you would have mentioned it, but something else could have changed which causes this behaviour.
Also, is there any way to downgrade to the 1.24 version? I'm using the PPA, but it doesn't look like the 1.24 version is available on there any more.
That you can do: http://download.geany.org/ has all releases. Geany isn’t hard to compile and won’t interfere with anything else in Ubuntu’s packaging system (but ensure you uninstall any packaged versions first).
I might try this myself with 1.25 and see if I can reproduce it,.
Usual disclaimer: I am not a Geany developer, just a layman in the Cult of Geany.
Best of luck, James
On 21 July 2015 at 14:57, James Brierley jmb8710@gmail.com wrote:
Does the same thing happen with files on the local disk?
It doesn't appear to be happening on local files.
Did you update Ubuntu lately? I’m guessing you would have mentioned it, but something else could have changed which causes this behaviour.
Sorry, I should have mentioned I'm using Ubuntu 14.04. I've been installing the regular updates. I also occasionally use gedit on the SFTP mounts and it hasn't had any similar issues.
That you can do: http://download.geany.org/ has all releases. Geany isn’t hard to compile and won’t interfere with anything else in Ubuntu’s packaging system (but ensure you uninstall any packaged versions first).
Okay, I'll leave it at 1.25 for the moment and see if anyone has any solutions to fix the issue. (or perhaps someone has things I can try to diagnose the issue)
On 15-07-21 11:42 AM, Tim Tisdall wrote:
I keep getting the "The file 'somefile.txt' on the disk is more recent than the current buffer." message after ~30 seconds on each save.
I'm using Ubuntu's network drive system to edit files on a remote system so the filenames are "/run/user/1000/gvfs/sftp:host= ...". This wasn't an issue with the 1.24 release and only started happening after upgrading to 1.25.
Is this a known issue?
I've never heard of it. One thing you could try is to watch the files using `inotifywait` (in `inotify-tools` package) like:
$ inotifywait -m /path/to/a/file/in/question
And see if it reports changes. Another way (since I don't think Geany uses inotify by default but rather just stat's the file), would be something like:
$ watch -n 1 stat -c '%y' /path/to/a/file/in/question
And see if the timestamp changes when you do whatever stuff to the files. If it does change, it's expected that Geany would prompt you since the file actually changed (it would be a bug in your filesystem).
Cheers, Matthew Brush
On 21 July 2015 at 17:04, Matthew Brush mbrush@codebrainz.ca wrote:
I've never heard of it. One thing you could try is to watch the files using `inotifywait` (in `inotify-tools` package) like:
$ inotifywait -m /path/to/a/file/in/question
And see if it reports changes. Another way (since I don't think Geany uses inotify by default but rather just stat's the file), would be something like:
$ watch -n 1 stat -c '%y' /path/to/a/file/in/question
And see if the timestamp changes when you do whatever stuff to the files. If it does change, it's expected that Geany would prompt you since the file actually changed (it would be a bug in your filesystem).
I'm on a different machine today, but I'll have to try this out on Friday when I'm using the machine I upgraded on.
Is there any way to switch Geany to using inotify over stat? I'm not sure if that'd help, but worth a try.
On 22 July 2015 at 22:24, Tim Tisdall tisdall@gmail.com wrote:
On 21 July 2015 at 17:04, Matthew Brush mbrush@codebrainz.ca wrote:
I've never heard of it. One thing you could try is to watch the files using `inotifywait` (in `inotify-tools` package) like:
$ inotifywait -m /path/to/a/file/in/question
And see if it reports changes. Another way (since I don't think Geany uses inotify by default but rather just stat's the file), would be something like:
$ watch -n 1 stat -c '%y' /path/to/a/file/in/question
And see if the timestamp changes when you do whatever stuff to the files. If it does change, it's expected that Geany would prompt you since the file actually changed (it would be a bug in your filesystem).
I'm on a different machine today, but I'll have to try this out on Friday when I'm using the machine I upgraded on.
Is there any way to switch Geany to using inotify over stat? I'm not sure if that'd help, but worth a try.
It has been tried, but IIRC it seemed to generate even more spurious notifications, so it was turned off.
Cheers Lex
Users mailing list Users@lists.geany.org https://lists.geany.org/cgi-bin/mailman/listinfo/users
Hello, how do I get removed from this list?
Thanks
On Wednesday, July 22, 2015, Lex Trotman elextr@gmail.com wrote:
On 22 July 2015 at 22:24, Tim Tisdall <tisdall@gmail.com javascript:;> wrote:
On 21 July 2015 at 17:04, Matthew Brush <mbrush@codebrainz.ca
javascript:;> wrote:
I've never heard of it. One thing you could try is to watch the files
using
`inotifywait` (in `inotify-tools` package) like:
$ inotifywait -m /path/to/a/file/in/question
And see if it reports changes. Another way (since I don't think Geany
uses
inotify by default but rather just stat's the file), would be something like:
$ watch -n 1 stat -c '%y' /path/to/a/file/in/question
And see if the timestamp changes when you do whatever stuff to the
files. If
it does change, it's expected that Geany would prompt you since the file actually changed (it would be a bug in your filesystem).
I'm on a different machine today, but I'll have to try this out on Friday when I'm using the machine I upgraded on.
Is there any way to switch Geany to using inotify over stat? I'm not sure if that'd help, but worth a try.
It has been tried, but IIRC it seemed to generate even more spurious notifications, so it was turned off.
Cheers Lex
Users mailing list Users@lists.geany.org javascript:; https://lists.geany.org/cgi-bin/mailman/listinfo/users
Users mailing list Users@lists.geany.org javascript:; https://lists.geany.org/cgi-bin/mailman/listinfo/users
On 22 July 2015 at 08:38, William Waalkes waalkesw@umich.edu wrote:
Hello, how do I get removed from this list?
I think you email users-request@lists.geany.org with the body and/or subject being "unsubscribe"
On 21 July 2015 at 17:04, Matthew Brush mbrush@codebrainz.ca wrote:
On 15-07-21 11:42 AM, Tim Tisdall wrote:
I'm using Ubuntu's network drive system to edit files on a remote system so the filenames are "/run/user/1000/gvfs/sftp:host= ...". This wasn't an issue with the 1.24 release and only started happening after upgrading to 1.25.
I've never heard of it. One thing you could try is to watch the files using `inotifywait` (in `inotify-tools` package) like:
$ inotifywait -m /path/to/a/file/in/question
And see if it reports changes. Another way (since I don't think Geany uses inotify by default but rather just stat's the file), would be something like:
$ watch -n 1 stat -c '%y' /path/to/a/file/in/question
Okay, I'm not sure how it supposed to work, but here's what happens on my machine with the 1.25:
inotifywait seems to register nothing when I save the file. When the warning comes up in Geany and I pick "relead", then inotify registers three actions: "OPEN", "ACCESS", and "CLOSE_NOWRITE,CLOSE".
watch is rather annoying because it doesn't give an ongoing log of changes. I turned on the '-d' to highlight the changes, but it'd still be better if it gave an ongoing log. The result with that was that it only seemed to update the timestamps once. However, it's possible that since it's polling once a second that two timestamp changes occurred within that one second and I'm just not able to see that. :(
So, I'm not really sure if we're any further ahead with figuring out the issue... Are there any other tests I could try?
On 25 July 2015 at 00:27, Tim Tisdall tisdall@gmail.com wrote:
On 21 July 2015 at 17:04, Matthew Brush mbrush@codebrainz.ca wrote:
On 15-07-21 11:42 AM, Tim Tisdall wrote:
I'm using Ubuntu's network drive system to edit files on a remote system so the filenames are "/run/user/1000/gvfs/sftp:host= ...". This wasn't an issue with the 1.24 release and only started happening after upgrading to 1.25.
I've never heard of it. One thing you could try is to watch the files using `inotifywait` (in `inotify-tools` package) like:
$ inotifywait -m /path/to/a/file/in/question
And see if it reports changes. Another way (since I don't think Geany uses inotify by default but rather just stat's the file), would be something like:
$ watch -n 1 stat -c '%y' /path/to/a/file/in/question
Okay, I'm not sure how it supposed to work, but here's what happens on my machine with the 1.25:
inotifywait seems to register nothing when I save the file.
That doesn't seem right, what file are you watching? The time we need is of the remote file, which, if its only accessible by sftp, may not be able to be watched by notify.
When the warning comes up in Geany and I pick "relead", then inotify registers three actions: "OPEN", "ACCESS", and "CLOSE_NOWRITE,CLOSE".
Looks right for reload, it just reads the file after all, but it doesn't show the stat call.
watch is rather annoying because it doesn't give an ongoing log of changes. I turned on the '-d' to highlight the changes, but it'd still be better if it gave an ongoing log. The result with that was that it only seemed to update the timestamps once. However, it's possible that since it's polling once a second that two timestamp changes occurred within that one second and I'm just not able to see that. :(
So, I'm not really sure if we're any further ahead with figuring out the issue... Are there any other tests I could try?
The only thing I can suggest is if you can build Geany then add some printfs to see what times it sees during the operations to try to find out what is actually happening.
Users mailing list Users@lists.geany.org https://lists.geany.org/cgi-bin/mailman/listinfo/users
On 24 July 2015 at 10:51, Lex Trotman elextr@gmail.com wrote:
Okay, I'm not sure how it supposed to work, but here's what happens on my machine with the 1.25:
inotifywait seems to register nothing when I save the file.
That doesn't seem right, what file are you watching? The time we need is of the remote file, which, if its only accessible by sftp, may not be able to be watched by notify.
I'm watching the file on my local machine. The "/run/user/1000/gvfs/sftp:host= ... somefile.py" file. Should I try it on the file on the remote machine? I thought it only mattered what Geany saw on the local machine.
When the warning comes up in Geany and I pick "relead", then inotify registers three actions: "OPEN", "ACCESS", and "CLOSE_NOWRITE,CLOSE".
Looks right for reload, it just reads the file after all, but it doesn't show the stat call.
watch is rather annoying because it doesn't give an ongoing log of changes. I turned on the '-d' to highlight the changes, but it'd still be better if it gave an ongoing log. The result with that was that it only seemed to update the timestamps once. However, it's possible that since it's polling once a second that two timestamp changes occurred within that one second and I'm just not able to see that. :(
So, I'm not really sure if we're any further ahead with figuring out the issue... Are there any other tests I could try?
The only thing I can suggest is if you can build Geany then add some printfs to see what times it sees during the operations to try to find out what is actually happening.
Yeah... The only issue is Geany is supposed to be a tool to help me do my work... not a tool to help create new work for me. ;) I'll see if I can find time to do this, but it doesn't look promising. I also have zero familiarity with the code-base so I'd probably take me longer than I'd like to figure out where to put those printf statements.
On 25 July 2015 at 01:02, Tim Tisdall tisdall@gmail.com wrote:
On 24 July 2015 at 10:51, Lex Trotman elextr@gmail.com wrote:
Okay, I'm not sure how it supposed to work, but here's what happens on my machine with the 1.25:
inotifywait seems to register nothing when I save the file.
That doesn't seem right, what file are you watching? The time we need is of the remote file, which, if its only accessible by sftp, may not be able to be watched by notify.
I'm watching the file on my local machine. The "/run/user/1000/gvfs/sftp:host= ... somefile.py" file. Should I try it on the file on the remote machine? I thought it only mattered what Geany saw on the local machine.
Well I guess really the question is how do the times on the two machines compare? Also how do the clocks on the two machines compare? Its really still fishing since as far as we can tell we didn't do anything significant in the latest Geany.
When the warning comes up in Geany and I pick "relead", then inotify registers three actions: "OPEN", "ACCESS", and "CLOSE_NOWRITE,CLOSE".
Looks right for reload, it just reads the file after all, but it doesn't show the stat call.
watch is rather annoying because it doesn't give an ongoing log of changes. I turned on the '-d' to highlight the changes, but it'd still be better if it gave an ongoing log. The result with that was that it only seemed to update the timestamps once. However, it's possible that since it's polling once a second that two timestamp changes occurred within that one second and I'm just not able to see that. :(
So, I'm not really sure if we're any further ahead with figuring out the issue... Are there any other tests I could try?
The only thing I can suggest is if you can build Geany then add some printfs to see what times it sees during the operations to try to find out what is actually happening.
Yeah... The only issue is Geany is supposed to be a tool to help me do my work... not a tool to help create new work for me. ;) I'll see if I can find time to do this, but it doesn't look promising. I also have zero familiarity with the code-base so I'd probably take me longer than I'd like to figure out where to put those printf statements.
Yeah, sorry its a pain, but nobody else has your setup, so only you can reproduce the problem.
Might have time later to look where to put the prints.
Cheers Lex
Users mailing list Users@lists.geany.org https://lists.geany.org/cgi-bin/mailman/listinfo/users
On 24/07/15 16:26, Lex Trotman wrote:
Well I guess really the question is how do the times on the two machines compare? Also how do the clocks on the two machines compare?
This is actually a good point from Lex. Is one of the two machines running slightly slow? Check if an NTP client is installed on both of them, and ensure that they are syncing from a reliable upstream server (your site may have one, and even most home routers have NTP functionality nowadays).
Computers with the time set wrong often end up confused (e.g. https://community.ardour.org/node/8509) and I’ve run into this myself, to the point that I almost always install NTP on new machines.
Give it a shot,
James
On 24 July 2015 at 11:37, James Brierley jmb8710@gmail.com wrote:
On 24/07/15 16:26, Lex Trotman wrote:
Well I guess really the question is how do the times on the two machines compare? Also how do the clocks on the two machines compare?
This is actually a good point from Lex. Is one of the two machines running slightly slow? Check if an NTP client is installed on both of them, and ensure that they are syncing from a reliable upstream server (your site may have one, and even most home routers have NTP functionality nowadays).
Computers with the time set wrong often end up confused (e.g. https://community.ardour.org/node/8509) and I’ve run into this myself, to the point that I almost always install NTP on new machines.
I have NTP running on both machines. I have a different timezone setting between them, though. However, that hasn't changed between upgrading the Geany install so I that shouldn't make a difference.
On 22 July 2015 at 04:42, Tim Tisdall tisdall@gmail.com wrote:
I keep getting the "The file 'somefile.txt' on the disk is more recent than the current buffer." message after ~30 seconds on each save.
This has turned up very occasionally in the past, it is due to the network filesystem reporting a local time for the file modification time whilst the actual modification time on the remote system doesn't exist yet (because the writing hasn't finished). Its an attempt to make the networked filesystem look more responsive.
So the two times disagree. This does not happen on the local filesystems since there is only one time.
So when Geany compares the time of the file modification 30secs later it finds it different and notifies you.
There may be some option you can set on the FUSE filesystem to stop it doing that and maybe the latest Ubuntu has changed the default.
Cheers Lex
I'm using Ubuntu's network drive system to edit files on a remote system so the filenames are "/run/user/1000/gvfs/sftp:host= ...". This wasn't an issue with the 1.24 release and only started happening after upgrading to 1.25.
Is this a known issue?
Also, is there any way to downgrade to the 1.24 version? I'm using the PPA, but it doesn't look like the 1.24 version is available on there any more.
Users mailing list Users@lists.geany.org https://lists.geany.org/cgi-bin/mailman/listinfo/users
On 15-07-21 04:18 PM, Lex Trotman wrote:
On 22 July 2015 at 04:42, Tim Tisdall tisdall@gmail.com wrote:
I keep getting the "The file 'somefile.txt' on the disk is more recent than the current buffer." message after ~30 seconds on each save.
[...] There may be some option you can set on the FUSE filesystem to stop it doing that and maybe the latest Ubuntu has changed the default.
If it's acceptable, you can also disable the checking in Geany by changing `Prefs->Files->Miscellaneous->Disk check timeout` to zero.
Cheers, Matthew Brush
On 21 July 2015 at 19:18, Lex Trotman elextr@gmail.com wrote:
On 22 July 2015 at 04:42, Tim Tisdall tisdall@gmail.com wrote:
I keep getting the "The file 'somefile.txt' on the disk is more recent than the current buffer." message after ~30 seconds on each save.
This has turned up very occasionally in the past, it is due to the network filesystem reporting a local time for the file modification time whilst the actual modification time on the remote system doesn't exist yet (because the writing hasn't finished). Its an attempt to make the networked filesystem look more responsive.
So the two times disagree. This does not happen on the local filesystems since there is only one time.
So when Geany compares the time of the file modification 30secs later it finds it different and notifies you.
There may be some option you can set on the FUSE filesystem to stop it doing that and maybe the latest Ubuntu has changed the default.
I was wondering if there was some sort of automatic change directly after Geany saved to the file that was triggering things. However, didn't the previous version of Geany work that way too? Why did this only start happening after upgrading?
There may be some option you can set on the FUSE filesystem to stop it doing that and maybe the latest Ubuntu has changed the default.
I was wondering if there was some sort of automatic change directly after Geany saved to the file that was triggering things. However, didn't the previous version of Geany work that way too? Why did this only start happening after upgrading?
Sorry I misread that you had upgraded both Ubuntu and Geany, if it was only Geany then Ubuntu is unlikely to have changed how it worked.
What save settings are you using, see the wiki http://wiki.geany.org/config/all_you_never_wanted_to_know_about_file_saving for a discussion of the settings available. Maybe the new Geany is using different settings?
The new version does an extra check of the file status, so that the user gets the chance to decide to save or not if the buffer doesn't match the file on disk, even if the buffer is unchanged. But that is before the save actually takes place, so I can't see how it could affect things, but who knows.
Cheers Lex
Users mailing list Users@lists.geany.org https://lists.geany.org/cgi-bin/mailman/listinfo/users
On 22 July 2015 at 09:32, Lex Trotman elextr@gmail.com wrote:
The new version does an extra check of the file status, so that the user gets the chance to decide to save or not if the buffer doesn't match the file on disk, even if the buffer is unchanged. But that is before the save actually takes place, so I can't see how it could affect things, but who knows.
I get two different warnings... If I save the file and then give that file editor focus after 30 seconds, I get the "The file 'somefile.txt' on the disk is more recent than the current buffer." warning. If I make a change to the file before the 30 seconds elapses and try to re-save, I get a different warning that allows me to "overwrite" (so it does another check just before saving). ...eh.. I'm not sure if that information helps, though.
I get two different warnings... If I save the file and then give that file editor focus after 30 seconds, I get the "The file 'somefile.txt' on the disk is more recent than the current buffer." warning.
That is what is expected if the filesystem is fibbing about the times as I originally described, Geany does a stat of the file after it has verified that the write was successful. The time of that stat is the one used 30 secs later to compare to another stat, but if the filesystem has now updated the time to match what the remote has, then it will be different.
If I make a change to the file before the 30 seconds elapses and try to re-save, I get a different warning that allows me to "overwrite" (so it does another check just before saving). ...eh.. I'm not sure if that information helps, though.
That makes sense, the file time will be different, and the buffer has been modified, so Geany says "Ok, there are two things changed, whatdya wanna do?"
I'll have to check this on Friday. But when you do an upgrade, is a change made to the .conf file automatically? I never changed that setting so it should still be using "use_gio_unsafe_file_saving" which is the default.
If you are using an existing config then it should not change the setting. Using GIO, hmmm, wonder if its doing some funny business, I know it tries to make the writes atomic by writing a new file and then renaming it over the old file, wonder if that works on sftp, and if the file time gets changed on the rename, or if it has to recopy the file because it can't rename.
And GVFS might cache a time, or FUSE or ...
Lots of moving parts in this system.
Cheers Lex
Users mailing list Users@lists.geany.org https://lists.geany.org/cgi-bin/mailman/listinfo/users
On 22 July 2015 at 09:32, Lex Trotman elextr@gmail.com wrote:
What save settings are you using, see the wiki http://wiki.geany.org/config/all_you_never_wanted_to_know_about_file_saving for a discussion of the settings available. Maybe the new Geany is using different settings?
I'll have to check this on Friday. But when you do an upgrade, is a change made to the .conf file automatically? I never changed that setting so it should still be using "use_gio_unsafe_file_saving" which is the default.
On 22 July 2015 at 09:32, Lex Trotman elextr@gmail.com wrote:
What save settings are you using, see the wiki http://wiki.geany.org/config/all_you_never_wanted_to_know_about_file_saving for a discussion of the settings available. Maybe the new Geany is using different settings?
I checked and it's still using the "use_gio_unsafe_file_saving" default
Okay, I simply can't take this any more so I've downgraded to 1.24.1 . I'd be really surprised to find that I'm the only one with this issue. It appears to be a race condition as there's about a 5% chance that it doesn't happen.
For anyone else that also needs to downgrade: The .deb files are still available in the PPA's pool, but unfortunately not accessible via apt. You just need to down load the .deb files you need from http://ppa.launchpad.net/geany-dev/ppa/ubuntu/pool/main/g/geany/ and install with dpkg. (I did it that way instead of installing libgtk2.0-dev to compile from source.)
On 11 August 2015 at 00:39, Tim Tisdall tisdall@gmail.com wrote:
Okay, I simply can't take this any more so I've downgraded to 1.24.1 . I'd be really surprised to find that I'm the only one with this issue. It
Yes, somebody else has raised an issue on github, but as I said there, none of the Geany devs has access to a system to test it. Anybody who has the problem and can build a custom Geany please offer their services.
Cheers Lex
appears to be a race condition as there's about a 5% chance that it doesn't happen.
For anyone else that also needs to downgrade: The .deb files are still available in the PPA's pool, but unfortunately not accessible via apt. You just need to down load the .deb files you need from http://ppa.launchpad.net/geany-dev/ppa/ubuntu/pool/main/g/geany/ and install with dpkg. (I did it that way instead of installing libgtk2.0-dev to compile from source.)
Users mailing list Users@lists.geany.org https://lists.geany.org/cgi-bin/mailman/listinfo/users
I'll take the conversation over there then...
I have no problem building it from source, but I don't really have the time to familiarize myself with the codebase to try to figure out the source of the problem.
On 10 August 2015 at 19:23, Lex Trotman elextr@gmail.com wrote:
On 11 August 2015 at 00:39, Tim Tisdall tisdall@gmail.com wrote:
Okay, I simply can't take this any more so I've downgraded to 1.24.1 .
I'd
be really surprised to find that I'm the only one with this issue. It
Yes, somebody else has raised an issue on github, but as I said there, none of the Geany devs has access to a system to test it. Anybody who has the problem and can build a custom Geany please offer their services.
Cheers Lex
appears to be a race condition as there's about a 5% chance that it
doesn't
happen.
For anyone else that also needs to downgrade: The .deb files are still available in the PPA's pool, but unfortunately not accessible via apt.
You
just need to down load the .deb files you need from http://ppa.launchpad.net/geany-dev/ppa/ubuntu/pool/main/g/geany/ and
install
with dpkg. (I did it that way instead of installing libgtk2.0-dev to compile from source.)
Users mailing list Users@lists.geany.org https://lists.geany.org/cgi-bin/mailman/listinfo/users
Users mailing list Users@lists.geany.org https://lists.geany.org/cgi-bin/mailman/listinfo/users