Changes between Version 1 and Version 2 of Ticket #1687


Ignore:
Timestamp:
Oct 1, 2012, 2:10:27 PM (12 years ago)
Author:
historic_bruno
Comment:

Confirmed that the bug still occurs with the inotify patch from #1316 (though the events are slightly different).

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #1687 – Description

    v1 v2  
    1 While troubleshooting hotloading/FAM on Ubuntu 12.04, I noticed that editing a GUI page in gedit was not triggering correct hotloading behavior - for some reason it was ignoring the FAM events. Using gdb I found the following sequence of events as processed by the game:
     1While troubleshooting hotloading/FAM on Ubuntu 12.04, I noticed that editing a GUI page in gedit was not triggering correct hotloading behavior - for some reason it was ignoring the FAM events. Using gdb I found the following sequence of events in a single call to [source:/ps/trunk/source/lib/sysdep/os/linux/dir_watch_fam.cpp#L223 dir_watch_Poll()]:
    22
    33{{{
     
    1313}}}
    1414
    15 I believe the bug occurs when the temporary file `.goutputstream-HV66KW` is created and deleted between calls to [source:/ps/trunk/source/lib/sysdep/os/linux/dir_watch_fam.cpp#L223 dir_watch_Poll()]. By the time the notification is processed, the file has already been deleted. When [source:/ps/trunk/source/ps/Filesystem.cpp#L70 ReloadChangedFiles()] tries to remove the file from VFS, it silently fails and all further notifications from that polling are lost. The change to `mainmenu.xml` occurs last and is never processed.
     15I believe the bug occurs when the temporary file `.goutputstream-HV66KW` is created and deleted between calls to `dir_watch_Poll()`. By the time the notification is processed, the file has already been deleted. When [source:/ps/trunk/source/ps/Filesystem.cpp#L70 ReloadChangedFiles()] tries to remove the file from VFS, it silently fails and all further notifications from that polling are lost. The change to `mainmenu.xml` occurs last and is never processed.
    1616
    1717If instead I directly overwrite `mainmenu.xml` with another file, hotloading works as expected.