r6433 has an economy mismatch after building a third port

Bug #1074979 reported by Oliver Maier
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
widelands
Fix Released
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.

Tags: seafaring

Related branches

Revision history for this message
Oliver Maier (o3170235) wrote :
Revision history for this message
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

Revision history for this message
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.

Revision history for this message
Oliver Maier (o3170235) wrote :
Revision history for this message
Oliver Maier (o3170235) wrote :

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

Revision history for this message
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
Revision history for this message
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)
Changed in widelands:
status: Confirmed → In Progress
Revision history for this message
Nicolai Hähnle (nha) wrote :

Fix committed to trunk in bzr6508.

Changed in widelands:
status: In Progress → Fix Committed
Revision history for this message
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  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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