Lua Message Boxes & Autosave do not go well together

Bug #571921 reported by SirVer
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
widelands
Fix Released
Critical
Unassigned

Bug Description

When a modal message box is displayed by a Lua script and the autosave interval elapses while the user reads the box, the game crashes with a cryptic error message (attempting to persist a C function). The problem is likely that the autosave time is not the gametime, but real time and when the ok button is pressed, widelands attempts to save immediately with the lua coroutine still running. A running coroutine can not be saved. Some workaround must be found for this.

Tags: crash lua

Related branches

Revision history for this message
SirVer (sirver) wrote :

one possible solution could be to implement autosave as Lua coroutine. This would imply that the save interval would be in game time, not real time.

Changed in widelands:
status: New → Confirmed
importance: Undecided → Critical
assignee: nobody → SirVer (sirver)
milestone: none → build16-rc1
tags: added: crash lua
Revision history for this message
David Allwicher (aber) wrote :

It might be a idea to emulate real time. If the game runs at twice the speed let twice the time elapse.

SirVer (sirver)
Changed in widelands:
status: Confirmed → In Progress
SirVer (sirver)
Changed in widelands:
status: In Progress → Fix Committed
SirVer (sirver)
Changed in widelands:
assignee: SirVer (sirver) → nobody
Revision history for this message
SirVer (sirver) wrote :

Released in build16-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.

Other bug subscribers

Remote bug watches

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