r6433 has an economy mismatch after building a third port

Bug #1074979 reported by Oliver Maier on 2012-11-04
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
widelands
High
Nicolai Hähnle

Bug Description

This bug is not a security vulnerability. Just this buggy launchpad says so.
Conquering the red enemy doesn't cause a problem, destroying the port either. Having built a new port the game continues nicely without a problem.
However, any try to restart a game saved after building the third port causes widelands to crash, complaining:
terminate called after throwing an instance of '_wexception'
  what(): [/home/judith/widelands/widelands/src/economy/transfer.cc:172] Transfer::get_next_step: inconsistent economy
appended are gelaende_erobert.wgf just before building the port and hafen_gebaut.wgf which was saved immediately after completion of the port.

Related branches

Oliver Maier (o3170235) wrote :
Oliver Maier (o3170235) wrote :

Ok, the launchpad is not buggy, and it is not a security vulnerability. I just didn't see that this was an option to tag

Oliver Maier (o3170235) wrote :

Meanwhile I continued the game. Building a port on Mine Island (hafen2) doesn't disturb the ability to load the game, even after having continued for some time (hafen2b). However, building a second port on Green Island immediately causes above error.

Oliver Maier (o3170235) wrote :
Oliver Maier (o3170235) wrote :

Building the port on Green Island using the seafaring branch also causes the saved game to be unloadable.

Nasenbaer (nasenbaer) wrote :

Thanks for the report!
I did not have the time to take a closer look into the bug until now, but at least the tags should make sure that this bug will not get lost.
Hopefully our seafaring feature will receive some improvements at the end of this year and even more hopefully at least until build18, so I tagged this to build18-rc1. :)

tags: added: seafaring
Changed in widelands:
milestone: none → build18-rc1
Nicolai Hähnle (nha) wrote :

Luckily, it was relatively easy to guess the cause of the problem: During game shutdown, the Fleet object is destroyed before the PortDock objects, which causes economies to not be split properly as they should, hence triggering the assertion. I'm writing a fix for this.

Changed in widelands:
status: New → Confirmed
importance: Undecided → High
assignee: nobody → Nicolai Hähnle (nha)
Nicolai Hähnle (nha) on 2013-02-09
Changed in widelands:
status: Confirmed → In Progress
Nicolai Hähnle (nha) wrote :

Fix committed to trunk in bzr6508.

Changed in widelands:
status: In Progress → Fix Committed
SirVer (sirver) wrote :

Released in build-18 rc1.

Changed in widelands:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Bug attachments