Currently Online

Latest Posts

Topic: Bugs

WorldSavior
Avatar
Topic Opener
Joined: 2016-10-15, 04:10
Posts: 2091
OS: Linux
Version: Recent tournament version
Ranking
One Elder of Players
Location: Germany
Posted at: 2019-03-13, 21:14

It looks like any constructionside can count in the "civilian buildings lost" statistic.

Constructionssides count also in the statistic "buildings". Is that a bug or a feature?


Wanted to save the world, then I got widetracked

Top Quote
GunChleoc
Avatar
Joined: 2013-10-07, 15:56
Posts: 3324
Ranking
One Elder of Players
Location: RenderedRect
Posted at: 2019-03-13, 22:34

For the normal statistics, it would make sense to remove them.

For the buildings lost I am not so sure - after all, it can be very costly when all your wares go poof when the enemy kills it.


Busy indexing nil values

Top Quote
dreieck
Avatar
Joined: 2018-08-25, 11:48
Posts: 72
OS: Artix GNU/Linux
Version: -git
Ranking
Likes to be here
Location: Germany
Posted at: 2019-03-14, 10:53

I have a widelands-savegame (autosave), which, when I dismantle one building, widelands segfaults.

What do you need to properly report it? Does the savegame-file and description of how to reprodice it and the widelands-bzr-revision is enough?

Also, there are the following peculiarities:

  • Several buildings do not finish because they wait for wood, but enough wood is available. Also, isolating woodcutter and a construction site waiting for wood into a seperate economy does not seem to help. New constructions sites properly get wood, but the construction sites waiting for wood were laid down when there was a wood shortage.
  • The building whose dismantling leads to the segfault is a harbour. There are three harbours nearby, all connected by roads, and only a few construction sites connected to them by roads. If I dismantle harbour A, suddenly a lot of wares get put out of the doors of harbour B (also wares which are not needed for construction sites; maybe they are to be transported to harbour C?). If I destroy harbour C, the game segfaults. Did not test yet what happens if I touch harbour B.

Widelands version: bzr9007[trunk]

Edited: 2019-03-14, 10:56

(empty signature.)

Top Quote
Nordfriese
Avatar
Joined: 2017-01-17, 18:07
Posts: 1928
OS: Debian Testing
Version: Latest master
Ranking
One Elder of Players
Location: 0x55555d3a34c0
Posted at: 2019-03-14, 11:13

Could you please file a bug on launchpad and attach the autosave? Your description should be enough to investigate the bug then.


Top Quote
WorldSavior
Avatar
Topic Opener
Joined: 2016-10-15, 04:10
Posts: 2091
OS: Linux
Version: Recent tournament version
Ranking
One Elder of Players
Location: Germany
Posted at: 2019-03-14, 16:42

GunChleoc wrote:

For the normal statistics, it would make sense to remove them.

Maybe. It can also be useful to see via this statistic how fast your opponents places new buildings, but at the other hand the statistic can be easily manipulated by placing a lot of constructionsides...

For the buildings lost I am not so sure - after all, it can be very costly when all your wares go poof when the enemy kills it.

Okay, that's right. So it's probably not a bug.


Wanted to save the world, then I got widetracked

Top Quote
dreieck
Avatar
Joined: 2018-08-25, 11:48
Posts: 72
OS: Artix GNU/Linux
Version: -git
Ranking
Likes to be here
Location: Germany
Posted at: 2019-03-15, 13:42

Nordfriese wrote:

Could you please file a bug on launchpad and attach the autosave? Your description should be enough to investigate the bug then.

I can't -- tried two times, same error:

Timeout error

Sorry, something just went wrong in Launchpad.

We’ve recorded what happened, and we’ll fix it as soon as possible. Apologies for the inconvenience.

Trying again in a couple of minutes might work.

(Error ID: OOPS-64359e45b1ad6c02616484929e9218a0)

So I paste my report here:


(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 (Size: ~2.5 MB) 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.)


Edited: 2019-03-18, 17:29

(empty signature.)

Top Quote
Nordfriese
Avatar
Joined: 2017-01-17, 18:07
Posts: 1928
OS: Debian Testing
Version: Latest master
Ranking
One Elder of Players
Location: 0x55555d3a34c0
Posted at: 2019-03-15, 13:58

Okay… In the log output, I get lots of Economy::find_best_supply: Error, COULD NOT FIND A ROUTE! ... ware at: 42x 34, requestor at: 57x 15!. But I can´t reproduce the segfault. Which roads exactly do I have to destroy before burning down the ports to get the crash?


Top Quote
dreieck
Avatar
Joined: 2018-08-25, 11:48
Posts: 72
OS: Artix GNU/Linux
Version: -git
Ranking
Likes to be here
Location: Germany
Posted at: 2019-03-16, 12:38

Nordfriese wrote:

Okay… In the log output, I get lots of Economy::find_best_supply: Error, COULD NOT FIND A ROUTE! ... ware at: 42x 34, requestor at: 57x 15!.

Is this something which should not happen (and instead, maybe, reallocation to occur)?

But I can´t reproduce the segfault. Which roads exactly do I have to destroy before burning down the ports to get the crash?

So that it looks like in the screenshoot 02_-_isolated_construction_sites_dont_get_available_wood.png:

  • In the image, there is close to the lower left corner a road connecting the "Holzfällerhütte" to the rest of the economy removed (it connected close to the two "Zitadelle"s),
  • in the image, there is close to the top right corner a road connecting the rightmost "Goldmine" to the rest of the economy removed.

If you compare the screenshot with the savegame (where the roads are still there), you will see the difference.

But I can´t reproduce the segfault

If you still can't, can an strace help (maybe with redirection of widelands' stdout and stderr to /dev/null to only see strace output)? If a programme is terminated with a segmentation fault may also depend on compiler settings (e.g. hardening) and other local system stuff.

Can you reproduce that the construction sites do not get wood delivered although there is wood available?

Can you reproduce that they get the wood once you burn down harbour A (and maybe face-cool.png while not having destroyed the roads?

Edited: 2019-03-16, 12:39

(empty signature.)

Top Quote
Nordfriese
Avatar
Joined: 2017-01-17, 18:07
Posts: 1928
OS: Debian Testing
Version: Latest master
Ranking
One Elder of Players
Location: 0x55555d3a34c0
Posted at: 2019-03-16, 18:57

Thanks for the description, now I can reproduce the crash.

Can you reproduce that the construction sites do not get wood delivered although there is wood available?

This might actually be this multiplayer bug.
I observed the same behaviour before several times (in singleplayer), but I never found a way to reproduce it, so I didn´t report it.
But I believe it´s probably unrelated to the crash.

Okay… In the log output, I get lots of Economy::find_best_supply: Error, COULD NOT FIND A ROUTE! ... ware at: 42x 34, requestor at: 57x 15!.

Is this something which should not happen (and instead, maybe, reallocation to occur)?

I never got this in a game yet, but lots of times when redesigning the economy concepts while working on the ferries branch. There, it always meant that flags that can not be reached from each other are in the same economy, which is the opposite of the definition of an economy. If this can happen in trunk, something has gone seriously wrong. I guess the segfault may be related to it, I´ll investigate…

Do you have a replay for this game? It might be useful to watch how this impossible situation could have come to be in the first place.


Top Quote
Nordfriese
Avatar
Joined: 2017-01-17, 18:07
Posts: 1928
OS: Debian Testing
Version: Latest master
Ranking
One Elder of Players
Location: 0x55555d3a34c0
Posted at: 2019-03-17, 11:27

You have three bugs in one savegame here face-wink.png

The crash was easy to fix, I created a merge request. The problem is that a worker who is waiting to carry a ware into his building from the flag before it doesn´t notice (yet) if you burn down his house underneath him.

The economy problem is actually unrelated to the crash, but it has to be fixed as well of course. I´ll start on that one next.


Top Quote