I have upgraded Geany to r3492 and it started to behave strangely. It constantly informs about the fact, that the file I am currently editing has newer modify date than the buffer and asks, if should be reloaded. Would you be able to take a look at this? Can I somehow provide some more diagnostic information?
2009/1/20 Filip Gruszczyński gruszczy@gmail.com:
I have upgraded Geany to r3492 and it started to behave strangely. It constantly informs about the fact, that the file I am currently editing has newer modify date than the buffer and asks, if should be reloaded. Would you be able to take a look at this? Can I somehow provide some more diagnostic information?
Are you using NFS or SAMBA? If so, it might be caused by the server clock being in advance.
Sebastien Barthelemy wrote:
2009/1/20 Filip Gruszczyński gruszczy@gmail.com:
I have upgraded Geany to r3492 and it started to behave strangely. It constantly informs about the fact, that the file I am currently editing has newer modify date than the buffer and asks, if should be reloaded. Would you be able to take a look at this? Can I somehow provide some more diagnostic information?
Are you using NFS or SAMBA? If so, it might be caused by the server clock being in advance.
I'm experiencing the same. No NFS or Samba stuff.
23:39:53: INFO : Geany 0.16 (svn >= 3490), GTK+ 2.14.4, GLib 2.18.2 On KDE4.2
On Tue, 20 Jan 2009 22:14:32 +0100 Filip Gruszczyński gruszczy@gmail.com wrote:
I have upgraded Geany to r3492 and it started to behave strangely. It constantly informs about the fact, that the file I am currently editing has newer modify date than the buffer and asks, if should be reloaded. Would you be able to take a look at this? Can I somehow provide some more diagnostic information?
Does this issue also happen with svn r3483? Do you have any log message inside the debug dialog?
Cheers, Frank
Does this issue also happen with svn r3483?
I think I had r348* before, but I can't guarantee. I do updates quite often.
Do you have any log message inside the debug dialog?
Only this:
gruszczy@localhost ~/Programs/Python/rpgdirector/src $ geany --verbose ** INFO: Geany 0.16 (svn >= r3492), GTK+ 2.12.11, GLib 2.16.5 ** INFO: /home/gruszczy/Programs/Python/rpgdirector/src/rpg/character/sheetwidgets.py : Python (UTF-8) ** INFO: /home/gruszczy/Programs/Python/rpgdirector/src/rpg/character/sheet.py : Python (UTF-8) ** INFO: /home/gruszczy/Programs/Python/rpgdirector/src/rpg/character/sheetwidgets.py : Python (UTF-8) ** INFO: /home/gruszczy/Programs/Python/rpgdirector/src/rpg/character/sheetwidgets.py : Python (UTF-8) ** INFO: /home/gruszczy/Programs/Python/rpgdirector/src/rpg/character/sheetwidgets.py : Python (UTF-8) ** INFO: Quitting...
Frank Lanitz wrote:
Does this issue also happen with svn r3483? Do you have any log message inside the debug dialog?
Cheers, Frank
23:39:53: INFO : Geany 0.16 (svn >= 3490), GTK+ 2.14.4, GLib 2.18.2 23:39:53: INFO : Initializing plugin 'Dateibrowser' 23:39:53: INFO : Loaded: /usr/local/lib/geany/filebrowser.so (Dateibrowser) 23:39:53: INFO : Initializing plugin 'Debugger' 23:39:53: INFO : Loaded: /usr/local/lib/geany/geanygdb.so (Debugger) 23:39:53: INFO : Initializing plugin 'Exportieren' 23:39:53: INFO : Loaded: /usr/local/lib/geany/export.so (Exportieren) 23:39:53: INFO : Initializing plugin 'Fenster teilen' 23:39:53: INFO : Loaded: /usr/local/lib/geany/splitwindow.so (Fenster teilen) 23:39:53: INFO : Initializing plugin 'LaTeX' 23:39:53: INFO : Loaded: /usr/local/lib/geany/geanylatex.so (LaTeX) 23:39:53: INFO : Initializing plugin 'Project' 23:39:53: INFO : Loaded: /usr/local/lib/geany/geanyprj.so (Project) 23:39:53: INFO : Initializing plugin 'VC' 23:39:53: INFO : Loaded: /usr/local/lib/geany/geanyvc.so (VC) 23:39:53: CRITICAL : g_key_file_get_string: assertion `key != NULL' failed 23:39:53: INFO : /home/kugel/sources/geany/geany-plugins/geanyvc/geanyvc.c : C (UTF-8) 23:39:53: INFO : Loaded /home/kugel/.config/geany/tags/sqlite3.c.tags (C), total tags: 404. 23:39:54: INFO : /home/kugel/sources/geanyvc.vc.diff : Diff (UTF-8)
Note:
23:39:53: CRITICAL : g_key_file_get_string: assertion `key != NULL' failed
Filip Gruszczyński wrote:
I have upgraded Geany to r3492 and it started to behave strangely. It constantly informs about the fact, that the file I am currently editing has newer modify date than the buffer and asks, if should be reloaded. Would you be able to take a look at this? Can I somehow provide some more diagnostic information?
The attached patch seems to fix it.
From reading the SOURCE, ignoring stuff implies setting file status to FILE_OK. Several cases which were supposed to be ignored don't do this.
However, I don't know GIO good enough to pretend that this is the proper fix, so let the pros look at it.
Thomas Martitz wrote:
The attached patch seems to fix it.
From reading the SOURCE, ignoring stuff implies setting file status to FILE_OK. Several cases which were supposed to be ignored don't do this.
However, I don't know GIO good enough to pretend that this is the proper fix, so let the pros look at it.
I found out, that if you type anything in the editor window (let it be text or just moving cursor, or clicking in the windw) quickly after the file was saved, the file is reported as changed (and thus the reload message is issued). That also means if you wait long enough, the reload message doesn't appear.
By debugging I found, that the time frame is the time between saving and the return of file_monitor_changed_cb() (in document.c) (which is IIUC polled every few seconds, so the time frame is variable). That said, GIO reports G_FILE_MONITOR_EVENT_CHANGED if the typing has taken place between saving and the regular file status update, even though the file as is hasn't been changed after saving.
This is a bit weird, since saving files explicitly sets the file status to FILE_IGNORE, which should result in ignoring G_FILE_MONITOR_EVENT_CHANGED.
Apparently, typing within the mentioned time frame gets FILE_IGNORE removed, before GIO is polled.
I have no idea yet, where the issue is, but I'm sure (I hope) Enrico will find it quickly with this information :)
Taking this into account, the patch I supplied was rather shit ;)
Is it possible to add arbitrary files to the Tools > Configuration Files submenu?
Thanks,
Steve
On Wed, 21 Jan 2009 02:37:48 +0100, Thomas Martitz thomas.martitz@fhtw-berlin.de wrote:
Thomas Martitz wrote:
The attached patch seems to fix it.
From reading the SOURCE, ignoring stuff implies setting file status to FILE_OK. Several cases which were supposed to be ignored don't do this.
However, I don't know GIO good enough to pretend that this is the proper fix, so let the pros look at it.
I found out, that if you type anything in the editor window (let it be text or just moving cursor, or clicking in the windw) quickly after the file was saved, the file is reported as changed (and thus the reload message is issued). That also means if you wait long enough, the reload message doesn't appear.
By debugging I found, that the time frame is the time between saving and the return of file_monitor_changed_cb() (in document.c) (which is IIUC polled every few seconds, so the time frame is variable). That said, GIO reports G_FILE_MONITOR_EVENT_CHANGED if the typing has taken place between saving and the regular file status update, even though the file as is hasn't been changed after saving.
This is a bit weird, since saving files explicitly sets the file status to FILE_IGNORE, which should result in ignoring G_FILE_MONITOR_EVENT_CHANGED.
Yeah, but there was one check for the ignore flag missing in the code which resulted in this weird behaviour. This and some other issues should be fixed/better in SVN 3495.
Thanks a lot for these information.
Regards, Enrico
Cool :) Thanks for quick response.
2009/1/21 Enrico Tröger enrico.troeger@uvena.de:
On Wed, 21 Jan 2009 02:37:48 +0100, Thomas Martitz thomas.martitz@fhtw-berlin.de wrote:
Thomas Martitz wrote:
The attached patch seems to fix it.
From reading the SOURCE, ignoring stuff implies setting file status to FILE_OK. Several cases which were supposed to be ignored don't do this.
However, I don't know GIO good enough to pretend that this is the proper fix, so let the pros look at it.
I found out, that if you type anything in the editor window (let it be text or just moving cursor, or clicking in the windw) quickly after the file was saved, the file is reported as changed (and thus the reload message is issued). That also means if you wait long enough, the reload message doesn't appear.
By debugging I found, that the time frame is the time between saving and the return of file_monitor_changed_cb() (in document.c) (which is IIUC polled every few seconds, so the time frame is variable). That said, GIO reports G_FILE_MONITOR_EVENT_CHANGED if the typing has taken place between saving and the regular file status update, even though the file as is hasn't been changed after saving.
This is a bit weird, since saving files explicitly sets the file status to FILE_IGNORE, which should result in ignoring G_FILE_MONITOR_EVENT_CHANGED.
Yeah, but there was one check for the ignore flag missing in the code which resulted in this weird behaviour. This and some other issues should be fixed/better in SVN 3495.
Thanks a lot for these information.
Regards, Enrico
-- Get my GPG key from http://www.uvena.de/pub.asc
Geany mailing list Geany@uvena.de http://lists.uvena.de/cgi-bin/mailman/listinfo/geany
Sadly, it didn't help. I am still experiencing this bug, although it seems to happen rarer.
2009/1/21 Filip Gruszczyński gruszczy@gmail.com:
Cool :) Thanks for quick response.
2009/1/21 Enrico Tröger enrico.troeger@uvena.de:
On Wed, 21 Jan 2009 02:37:48 +0100, Thomas Martitz thomas.martitz@fhtw-berlin.de wrote:
Thomas Martitz wrote:
The attached patch seems to fix it.
From reading the SOURCE, ignoring stuff implies setting file status to FILE_OK. Several cases which were supposed to be ignored don't do this.
However, I don't know GIO good enough to pretend that this is the proper fix, so let the pros look at it.
I found out, that if you type anything in the editor window (let it be text or just moving cursor, or clicking in the windw) quickly after the file was saved, the file is reported as changed (and thus the reload message is issued). That also means if you wait long enough, the reload message doesn't appear.
By debugging I found, that the time frame is the time between saving and the return of file_monitor_changed_cb() (in document.c) (which is IIUC polled every few seconds, so the time frame is variable). That said, GIO reports G_FILE_MONITOR_EVENT_CHANGED if the typing has taken place between saving and the regular file status update, even though the file as is hasn't been changed after saving.
This is a bit weird, since saving files explicitly sets the file status to FILE_IGNORE, which should result in ignoring G_FILE_MONITOR_EVENT_CHANGED.
Yeah, but there was one check for the ignore flag missing in the code which resulted in this weird behaviour. This and some other issues should be fixed/better in SVN 3495.
Thanks a lot for these information.
Regards, Enrico
-- Get my GPG key from http://www.uvena.de/pub.asc
Geany mailing list Geany@uvena.de http://lists.uvena.de/cgi-bin/mailman/listinfo/geany
-- Filip Gruszczyński
Filip Gruszczyński wrote:
Sadly, it didn't help. I am still experiencing this bug, although it seems to happen rarer.
I can confirm that. Very hard to reproduce though.
It's just that I have this reflex, that makes me press Ctrl+S about every ten seconds. So you can imagine, that I can get this effect pretty often, especially that pressing this Ctrl+S doesn't stop me from typing forward the thing I was just doing.
2009/1/22 Thomas Martitz thomas.martitz@fhtw-berlin.de:
Filip Gruszczyński wrote:
Sadly, it didn't help. I am still experiencing this bug, although it seems to happen rarer.
I can confirm that. Very hard to reproduce though.
-- Kind regards
Geany mailing list Geany@uvena.de http://lists.uvena.de/cgi-bin/mailman/listinfo/geany
On Wed, 21 Jan 2009 23:22:57 +0100, Filip Gruszczyński gruszczy@gmail.com wrote:
It's just that I have this reflex, that makes me press Ctrl+S about every ten seconds. So you can imagine, that I can get this effect pretty often, especially that pressing this Ctrl+S doesn't stop me from typing forward the thing I was just doing.
It happens when you save a document quickly after the last save process. The 'file has changed' notification takes a moment (I didn't measured it but I'd say something about 0.5-1 sec) until it is triggered. So there is a little time frame where the state is inconsistent and this time frame is hit when saving really fast continuously. For me, it is practically impossible to hit this in a normal work flow. But the time frame might be significantly larger on other systems, not sure by what factors it is influenced. One of the main factors is probably the used file alteration system, as mentioned before it can FAM, Gamin or nothing (i.e. usual file polling). And then FAM and Gamin can use the kernel's inotify (which probably only exists on Linux) or they also do just polling. And there are probably other possibilities.
After all, since we are working towards the next release, I disabled the GIO based file monitoring for now since it doesn't work as stable yet as I wish.
If anyone wants to re-activate it, in src/document.c is a commented macro USE_GIO_FILEMON, uncomment it and recompile Geany. Otherwise, the old polling method is used which is also not that bad.
Regards, Enrico