Segfault when destroying harbour; constuction sites do not get available wares.

Bug #1820582 reported by Vier Eck
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
widelands
Fix Released
Undecided
Unassigned

Bug Description

(Applies to at least widelands bzr9007[trunk]. EDIT: Still valid for bzr9017[trunk].)

I have a widelands game with those weirdnesses:

(1) There are some construction sites which wait for wood (when I started their construction there was a wood shortage) and never get it, although there is wood available. Also isolating those constructions sites with woodcutters into a small seperate economy does not help; the wood the woodcutters produce will then just lay on the flags.

(2) There is another spot with three harbours nearby (connected by roads), I will call them harbour A (southern harbour), harbour B (middle harbour) and harbour C (northern harbout). When I burn down harbour A, a lot of wares geht put out of harbour B and C to it's flag (and seem to be carried back in). When I then dismantle harbour C, the game crashes reproducably with a segmentation fault.

(3) When I do (2) without the economy isolation explained in (1), the game does not crash, and the construction sites will get their wood.
So, to reproduce, step (1) needs to be done before step (2).

When trying to reproduce I had it once that the game did not segfault when I dismantled harbour B. But when I after that dismantled harbour C, too, it crashed with a segmentation fault.

I have it running under Arch GNU/Linux (kernel 4.20 with pf-6 patch, which is a 4.20.12 with some additional features and fixes) and self-built

I have attached an archive with several files:

* `widelands-command.txt`: The commands I used to execute widelands.
* `widelands-terminal-output.txt`: The terminal output (combined stderr and stdout) of `widelands --verbose`.
  The line `Segmentation fault` is not written to the file, it is printed (by the shell?) to the terminal directly.
* `dmesg.txt`: The kernel message about the segmentation fault (lines from `dmesg`).
* `wl_autosave_00.wgf`: The savegame used to reproduce.
* `01_-_loading_savegame.png`: Proof of loading the correct savegame.
* `02_-_isolated_construction_sites_dont_get_available_wood.png`: Shows the constuction sites waiting for wood in an isolated economy that has wod lying around at flags.
* `03_-_about_to_destroy_harbour_A.png`: Shows the area with the three harbours, about to destroy harbour A.
* `04_-_wares_are_put_out_of_harbours_B_and_C.png`: Shows wares put out of harbour B after destroying harbour A.
* `05_-_about_to_dismantle_harbour_C.png`: About to destroy harbour C; after acknowleding that, the game crashes with a segmentation fault.
* `cmake-options.txt`: The options I pass to `cmake` during build of widelands.

(The screenshots I converted to 8 or 128 colours indexed colours to make the PNG's file size smaller.)

.. There is already some discussion about this at [this widelands forum post](https://wl.widelands.org/forum/topic/2786/?page=26#post-27311).

Related branches

Revision history for this message
Vier Eck (viereck) wrote :
GunChleoc (gunchleoc)
Changed in widelands:
milestone: none → build20-rc1
status: New → Fix Committed
Revision history for this message
Vier Eck (viereck) wrote :
Revision history for this message
Vier Eck (viereck) wrote :
  • Replay Edit (46.4 KiB, application/octet-stream)
Revision history for this message
Vier Eck (viereck) wrote :
Revision history for this message
Vier Eck (viereck) wrote :

I've just attached a video and a replay which shows the following:

The two "Reethof"s and the "Zitadelle" wait for a long time for some wood from another economy. Then, eventually, the wood they wait for becomes deallocated and the wood from the economy where the construction sites are part of becomes allocated, and the construction sites finish. Expected behaviour would be that after seperation into a single economy the wood gets reallocated within a short time (a few seconds max).

Revision history for this message
GunChleoc (gunchleoc) wrote :

Fixed in build20-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.