Unable to rename rolling autosave

Bug #1746270 reported by GunChleoc
18
This bug affects 3 people
Affects Status Importance Assigned to Milestone
widelands
Fix Released
Undecided
Unassigned

Bug Description

I am having some issues with the file system in Windows 7. I am in zip file mode.

Autosave: 300000 ms interval elapsed, current gametime: 14:01, saving...
Autosave: Rolling savefiles (count): 5
Autosave: Rolled save\wl_autosave_02.wgf to save\wl_autosave_03.wgf
Autosave: Rolled save\wl_autosave_01.wgf to save\wl_autosave_02.wgf
Fatal exception: [../src/io/filesystem/disk_filesystem.cc:428] DiskFileSystem: unable to rename C:\Users\User\.widelands\save\wl_autosave_00.wgf to C:\Users\User\.widelands\save\wl_autosave_01.wgf: Permission denied
FATAL ERROR - game crashed. Attempting emergency save.

Related branches

Revision history for this message
kaputtnik (franku) wrote :

Does this happen on every auto save?

I had a similar issue when working with the editor. No console output, only a window pops up. The last sentence says: "Could not write xy.tmp to xy, the directory is not empty".

This happened when i was working on a scenario and had a texteditor open with my used files. I opened the widelands editor with the scenario map and made some modifications. Also made some modifications to a file opened in my text editor. I never had a problem when working like this (simultaniously editing the map and scenario files). The difference when the crash happens: I did not saved the open (edited!) scenario file before saving the map. So my guess is, at least in my case, that an unsaved change in a file leaves an open file handle to the directory, or to a file in the directory, which prevent saving anything there.

Could an open file handle also be the reason for this bug?

If so, what about file indexers? E.g. an auto save try's to save but an file indexer just indexes the file?

Revision history for this message
GunChleoc (gunchleoc) wrote :

I think there was difference between savegames and new games. So, maybe the file handle doesn't get released when loading a game from a savegame? The problem would then occur when manually saving to the same file, or autosaving when the loaded game was a savegame.

Revision history for this message
kaputtnik (franku) wrote :

See also bug 1785628 "crash during autosave"

Revision history for this message
GunChleoc (gunchleoc) wrote :

I can reproduce this as follows:

1. Start an autosave game
2. Open the autosave game in 7zip
3. Wait for roll_save_files to come around -> crash

We have exception handling in the save game menu when that happens - I think we should just quietly fail here and skip to the next roll.

GunChleoc (gunchleoc)
Changed in widelands:
assignee: Tino (tino79) → GunChleoc (gunchleoc)
status: New → In Progress
Changed in widelands:
status: In Progress → Fix Committed
GunChleoc (gunchleoc)
Changed in widelands:
assignee: GunChleoc (gunchleoc) → nobody
Revision history for this message
GunChleoc (gunchleoc) wrote :

Fixed in build20-rc1

Changed in widelands:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.