Strange Lua script behaviour after starting MP game with saved game

Bug #1237016 reported by Nasenbaer
24
This bug affects 3 people
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.

Tags: lua

Related branches

Revision history for this message
Nasenbaer (nasenbaer) wrote :
Revision history for this message
SirVer (sirver) wrote :

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 :).

Changed in widelands:
importance: Undecided → Medium
milestone: none → build19-rc1
Revision history for this message
Nasenbaer (nasenbaer) wrote :

@#2 yes the save game was from the host and was automatically exchanged during loading process. However the behaviour was the same on both host and client side - so for the host it was his own savegame

Revision history for this message
SirVer (sirver) wrote :

I started working a bit on this by integrating with eris. I added eris to our build and started doing the necessary ports to get our stuff running on Lua 5.2 (which eris integrates with). This will break safegame compatibility, but it seems to be reasonably easy to move forward with this.

I would suggest we use the change to get rid of compatibility code in Widelands in loading too, because this will be incompatbile anyways.

Changed in widelands:
status: Confirmed → In Progress
SirVer (sirver)
Changed in widelands:
status: In Progress → 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.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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