Editor fails on save with zip filesystem

Bug #1548932 reported by GunChleoc
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
widelands
Fix Released
High
Unassigned

Bug Description

In Windows, the editor fails on the second save for a zip save:
If you start the editor and save the map "abc" and "abc" already exists it gets overwritten correctly.
But you can't save again "abc" without restarting the editor (or save once under another name).

So the editor itself does put also a lock on the save file after the first save.

Tags: editor windows

Related branches

GunChleoc (gunchleoc)
Changed in widelands:
milestone: none → build19-rc1
tags: added: windows
Revision history for this message
SirVer (sirver) wrote : Re: [Bug 1548932] [NEW] Editor fails on save with zip filesystem

Widelands does not use filelocks imho. I cannot remember that they have been in the codebase ever.

> Am 23.02.2016 um 19:04 schrieb GunChleoc <email address hidden>:
>
> Public bug reported:
>
> In Windows, the editor fails on the second save for a zip save:
> If you start the editor and save the map "abc" and "abc" already exists it gets overwritten correctly.
> But you can't save again "abc" without restarting the editor (or save once under another name).
>
> So the editor itself does put also a lock on the save file after the
> first save.
>
> ** Affects: widelands
> Importance: High
> Status: Confirmed
>
>
> ** Tags: editor windows
>
> ** Changed in: widelands
> Milestone: None => build19-rc1
>
> ** Tags added: windows
>
> --
> You received this bug notification because you are subscribed to
> widelands.
> https://bugs.launchpad.net/bugs/1548932
>
> Title:
> Editor fails on save with zip filesystem
>
> Status in widelands:
> Confirmed
>
> Bug description:
> In Windows, the editor fails on the second save for a zip save:
> If you start the editor and save the map "abc" and "abc" already exists it gets overwritten correctly.
> But you can't save again "abc" without restarting the editor (or save once under another name).
>
> So the editor itself does put also a lock on the save file after the
> first save.
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/widelands/+bug/1548932/+subscriptions

Revision history for this message
GunChleoc (gunchleoc) wrote :

Seems like Windows decides to lock stuff anyway - at least that's the problem Tino solved in the branch that I just merged. It will be a file handle somewhere.

Revision history for this message
SirVer (sirver) wrote : Re: [Bug 1548932] Re: Editor fails on save with zip filesystem

Have you tried renaming the file before deleting it? Renames should be always atomic.

> Am 23.02.2016 um 21:50 schrieb GunChleoc <email address hidden>:
>
> Seems like Windows decides to lock stuff anyway - at least that's the
> problem Tino solved in the branch that I just merged. It will be a file
> handle somewhere.
>
> --
> You received this bug notification because you are subscribed to
> widelands.
> https://bugs.launchpad.net/bugs/1548932
>
> Title:
> Editor fails on save with zip filesystem
>
> Status in widelands:
> Confirmed
>
> Bug description:
> In Windows, the editor fails on the second save for a zip save:
> If you start the editor and save the map "abc" and "abc" already exists it gets overwritten correctly.
> But you can't save again "abc" without restarting the editor (or save once under another name).
>
> So the editor itself does put also a lock on the save file after the
> first save.
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/widelands/+bug/1548932/+subscriptions

Revision history for this message
GunChleoc (gunchleoc) wrote :

I just looked at the error message again - it is allegedly trying to rename <mapname>.tmp to <mapname>.tmp.

So, last time we though that it was a path issue and it was a file handler issue, now it's the other way around.

Revision history for this message
GunChleoc (gunchleoc) wrote :

I am out of ideas, so pinging Tino.

Changed in widelands:
assignee: nobody → Tino (tino79)
Revision history for this message
Tino (tino79) wrote :

Ok, the bug is more complex, it has also problems without zipping:

- Load scenario
- Save it under the same name => error
- Save it again under the same same => works, but empty scripting dir

It seems the scripting/lua engine is causing this file lock?

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

Fixed in build19-rc1.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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