Strange Lua script behaviour after starting MP game with saved game
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
widelands |
Fix Released
|
Medium
|
Unassigned |
Bug Description
In Our WLT2013 game (Game 10), the host lost the internet connection two times, therefore we had to reload the game from a saved game, however it seems this reload lead to a strange Lua bug.
First of all, the message of "the game will end in X minutes" showed "153minutes" in every message after the reload.
Second of all: once I conquered 50% of the land, the we got the message, that I have to hold the land for 12 minutes. after 12 minutes nothing happend. instead we received a message after roughly 30 minutes, that I should hold at least those 50% of the lands for -23 further minutes. So a negative value.
After that message, the message apperead every 5 minutes until 4 hours were over and I finally won the game
So the 4 hours counter seemd to be running correctly, but all the other counters behaved strangely.
Related branches
- Jens Beyer: Pending requested
- Widelands Developers: Pending requested
-
Diff: 32789 lines (+24836/-5410)143 files modifiedCMakeLists.txt (+0/-3)
CREDITS (+3/-3)
doc/sphinx/source/implementation.rst (+11/-12)
regression_test.py (+1/-0)
scripting/format_help.lua (+2/-2)
scripting/infrastructure.lua (+1/-1)
scripting/lunit.lua (+129/-320)
src/CMakeLists.txt (+8/-6)
src/ai/defaultai.cc (+1/-1)
src/logic/bill_of_materials.h (+5/-4)
src/logic/building.h (+1/-1)
src/logic/cmd_luacoroutine.cc (+1/-1)
src/logic/editor_game_base.cc (+1/-1)
src/logic/game.cc (+1/-1)
src/logic/production_program.cc (+2/-2)
src/logic/production_program.h (+2/-2)
src/logic/productionsite.cc (+5/-6)
src/logic/productionsite.h (+6/-6)
src/logic/tribe.cc (+5/-10)
src/map_io/widelands_map_buildingdata_data_packet.cc (+3/-3)
src/map_io/widelands_map_scripting_data_packet.cc (+14/-4)
src/network/netclient.cc (+6/-7)
src/network/nethost.cc (+1/-1)
src/scripting/CMakeLists.txt (+74/-1)
src/scripting/c_utils.cc (+1/-3)
src/scripting/c_utils.h (+2/-2)
src/scripting/coroutine_impl.cc (+0/-144)
src/scripting/coroutine_impl.h (+0/-63)
src/scripting/eris.h (+29/-0)
src/scripting/eris/README.eris (+9/-9)
src/scripting/eris/eris.c (+2658/-0)
src/scripting/eris/eris.h (+148/-0)
src/scripting/eris/lapi.c (+1284/-0)
src/scripting/eris/lapi.h (+24/-0)
src/scripting/eris/lauxlib.c (+959/-0)
src/scripting/eris/lauxlib.h (+212/-0)
src/scripting/eris/lbaselib.c (+494/-0)
src/scripting/eris/lbitlib.c (+212/-0)
src/scripting/eris/lcode.c (+881/-0)
src/scripting/eris/lcode.h (+83/-0)
src/scripting/eris/lcorolib.c (+171/-0)
src/scripting/eris/lctype.c (+52/-0)
src/scripting/eris/lctype.h (+95/-0)
src/scripting/eris/ldblib.c (+398/-0)
src/scripting/eris/ldebug.c (+593/-0)
src/scripting/eris/ldebug.h (+34/-0)
src/scripting/eris/ldo.c (+681/-0)
src/scripting/eris/ldo.h (+46/-0)
src/scripting/eris/ldump.c (+173/-0)
src/scripting/eris/lfunc.c (+161/-0)
src/scripting/eris/lfunc.h (+33/-0)
src/scripting/eris/lgc.c (+1220/-0)
src/scripting/eris/lgc.h (+157/-0)
src/scripting/eris/linit.c (+68/-0)
src/scripting/eris/liolib.c (+682/-0)
src/scripting/eris/llex.c (+530/-0)
src/scripting/eris/llex.h (+78/-0)
src/scripting/eris/llimits.h (+309/-0)
src/scripting/eris/lmathlib.c (+279/-0)
src/scripting/eris/lmem.c (+99/-0)
src/scripting/eris/lmem.h (+57/-0)
src/scripting/eris/loadlib.c (+759/-0)
src/scripting/eris/lobject.c (+287/-0)
src/scripting/eris/lobject.h (+607/-0)
src/scripting/eris/lopcodes.c (+107/-0)
src/scripting/eris/lopcodes.h (+288/-0)
src/scripting/eris/loslib.c (+323/-0)
src/scripting/eris/lparser.c (+1638/-0)
src/scripting/eris/lparser.h (+119/-0)
src/scripting/eris/lstate.c (+323/-0)
src/scripting/eris/lstate.h (+228/-0)
src/scripting/eris/lstring.c (+185/-0)
src/scripting/eris/lstring.h (+46/-0)
src/scripting/eris/lstrlib.c (+1035/-0)
src/scripting/eris/ltable.c (+588/-0)
src/scripting/eris/ltable.h (+45/-0)
src/scripting/eris/ltablib.c (+283/-0)
src/scripting/eris/ltm.c (+77/-0)
src/scripting/eris/ltm.h (+57/-0)
src/scripting/eris/lua.c (+497/-0)
src/scripting/eris/lua.h (+444/-0)
src/scripting/eris/lua.hpp (+9/-0)
src/scripting/eris/luac.c (+432/-0)
src/scripting/eris/luaconf.h (+551/-0)
src/scripting/eris/lualib.h (+58/-0)
src/scripting/eris/lundump.c (+258/-0)
src/scripting/eris/lundump.h (+28/-0)
src/scripting/eris/lvm.c (+867/-0)
src/scripting/eris/lvm.h (+44/-0)
src/scripting/eris/lzio.c (+76/-0)
src/scripting/eris/lzio.h (+65/-0)
src/scripting/factory.h (+1/-2)
src/scripting/lua_bases.cc (+6/-5)
src/scripting/lua_bases.h (+1/-2)
src/scripting/lua_editor.cc (+6/-6)
src/scripting/lua_editor.h (+1/-2)
src/scripting/lua_game.cc (+6/-5)
src/scripting/lua_game.h (+1/-4)
src/scripting/lua_globals.cc (+3/-7)
src/scripting/lua_globals.h (+1/-3)
src/scripting/lua_map.cc (+596/-561)
src/scripting/lua_map.h (+38/-159)
src/scripting/lua_root.cc (+5/-5)
src/scripting/lua_root.h (+1/-4)
src/scripting/lua_ui.cc (+6/-6)
src/scripting/lua_ui.h (+1/-2)
src/scripting/luna.h (+3/-13)
src/scripting/luna_impl.cc (+33/-30)
src/scripting/luna_impl.h (+23/-13)
src/scripting/pdep.cc (+0/-112)
src/scripting/pdep/README (+0/-5)
src/scripting/pdep/lauxlib.h (+0/-174)
src/scripting/pdep/ldo.h (+0/-57)
src/scripting/pdep/lfunc.h (+0/-34)
src/scripting/pdep/lgc.h (+0/-110)
src/scripting/pdep/llimits.h (+0/-128)
src/scripting/pdep/lobject.h (+0/-381)
src/scripting/pdep/lopcodes.h (+0/-268)
src/scripting/pdep/lstate.h (+0/-169)
src/scripting/pdep/lstring.h (+0/-31)
src/scripting/pdep/ltm.h (+0/-54)
src/scripting/pdep/lua.h (+0/-388)
src/scripting/pdep/lzio.h (+0/-65)
src/scripting/pdep/pdep.h (+0/-44)
src/scripting/persistence.cc (+88/-41)
src/scripting/persistence.h (+5/-3)
src/scripting/pluto.cc (+0/-1430)
src/scripting/pluto.h (+0/-31)
src/scripting/scripting.cc (+322/-280)
src/scripting/scripting.h (+123/-63)
src/scripting/test/CMakeLists.txt (+12/-10)
src/scripting/test/test_luna.cc (+24/-23)
src/ui_basic/helpwindow.cc (+2/-4)
src/ui_fsmenu/fileview.cc (+2/-2)
src/ui_fsmenu/launchMPG.cc (+1/-1)
src/ui_fsmenu/launchSPG.cc (+1/-1)
test/maps/expedition.wmf/scripting/init.lua (+0/-1)
test/maps/lua_persistence.wmf/scripting/test_persistence.lua (+5/-11)
test/maps/lua_testsuite.wmf/scripting/common_init.lua (+0/-1)
test/maps/ship_transportation.wmf/scripting/init.lua (+0/-1)
test/save/compatibility_build15/test_game_loads.lua (+0/-13)
test/save/compatibility_build16/test_game_loads.lua (+0/-13)
test/save/compatibility_build17/test_game_loads.lua (+0/-13)
Changed in widelands: | |
status: | In Progress → Fix Committed |
Changed in widelands: | |
status: | Fix Committed → Fix Released |
mmh - we had reports of errors in saved lua games before. Did you send over the savegame file, so that maybe a savegame from another computer was loaded on your system? (it should not have mattered though).
Some of the counters are correct though - I have a feeling as if closure variables are not correctly saved.
I believe the best fix is to move over to https:/ /github. com/fnuecke/ eris/, which seems much more solid groundwork than what we have right now instead of debugging this. However, this costs savegame compatibility :).