Lua Message Boxes & Autosave do not go well together
Bug #571921 reported by
SirVer
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.
Related branches
lp:~sirver/widelands/tutorial_mission
Merged
into
lp:widelands
- Chuck Wilder: Needs Fixing (playtesting, spellchecking)
-
Diff: 2904 lines (+1455/-235)41 files modifiedcampaigns/cconfig (+2/-2)
campaigns/emp01.wmf/scripting/texts.lua (+5/-5)
campaigns/emp02.wmf/scripting/texts.lua (+4/-4)
campaigns/t01.wmf/scripting/initial_messages.lua (+1/-1)
campaigns/t01.wmf/scripting/khantrukhs_talking.lua (+1/-1)
campaigns/t01.wmf/scripting/texts.lua (+5/-5)
campaigns/t02.wmf/scripting/mission_thread.lua (+1/-1)
campaigns/t02.wmf/scripting/mission_thread_texts.lua (+2/-2)
campaigns/t03.wmf/scripting/texts.lua (+14/-14)
campaigns/tutorial01.wmf/elemental (+1/-1)
campaigns/tutorial01.wmf/player_names (+6/-0)
campaigns/tutorial01.wmf/player_position (+2/-0)
campaigns/tutorial01.wmf/scripting/init.lua (+527/-73)
campaigns/tutorial01.wmf/scripting/texts.lua (+425/-104)
src/economy/flag.cc (+11/-0)
src/economy/flag.h (+1/-0)
src/economy/road.cc (+18/-0)
src/economy/road.h (+1/-0)
src/logic/building.cc (+26/-0)
src/logic/building.h (+2/-0)
src/logic/immovable.cc (+9/-0)
src/logic/immovable.h (+10/-0)
src/logic/legacy.cc (+17/-0)
src/save_handler.cc (+3/-0)
src/save_handler.h (+5/-1)
src/scripting/lua_game.cc (+46/-8)
src/scripting/lua_map.cc (+83/-2)
src/scripting/lua_map.h (+31/-2)
src/scripting/lua_ui.cc (+63/-0)
src/scripting/lua_ui.h (+4/-0)
src/scripting/scripting.cc (+5/-0)
src/scripting/test/ts.wmf/scripting/test_baseimmovables.lua (+2/-0)
src/scripting/test/ts.wmf/scripting/test_constructionsite.lua (+46/-0)
src/scripting/test/ts.wmf/scripting/test_flag.lua (+7/-1)
src/scripting/test/ts.wmf/scripting/test_immovables.lua (+1/-0)
src/scripting/test/ts.wmf/scripting/test_road.lua (+11/-4)
src/scripting/test/ts.wmf/scripting/test_ui.lua (+16/-0)
src/ui_basic/panel.cc (+32/-0)
src/ui_basic/panel.h (+4/-0)
src/wlapplication.cc (+0/-2)
src/wui/interactive_base.cc (+5/-2)
Changed in widelands: | |
status: | Confirmed → In Progress |
Changed in widelands: | |
status: | In Progress → Fix Committed |
Changed in widelands: | |
assignee: | SirVer (sirver) → nobody |
To post a comment you must log in.
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.