Segfault when destroying harbour; constuction sites do not get available wares.
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-
* `widelands-
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_
* `01_-_loading_
* `02_-_isolated_
* `03_-_about_
* `04_-_wares_
* `05_-_about_
* `cmake-
(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:/
Related branches
- GunChleoc: Approve
-
Diff: 18 lines (+8/-0)1 file modifiedsrc/logic/map_objects/tribes/worker.cc (+8/-0)
Changed in widelands: | |
milestone: | none → build20-rc1 |
status: | New → Fix Committed |
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).