Game crashes when ship construction site cannot be cleared for a new ship

Bug #963963 reported by Astuur on 2012-03-24
16
This bug affects 2 people
Affects Status Importance Assigned to Milestone
widelands
Medium
Andreas Breitschopp

Bug Description

When the shipwright builds a new ship the last one is moved out of the way to clear the construction site.
When this is not possible due to space restrictions, the game crashes.

Related branches

Hans Joachim Desserud (hjd) wrote :

Thanks for splitting this out from bug 963799. This should be dealt with, but I doubt it will get into build17, thus targetting to build18.

Changed in widelands:
importance: Undecided → Medium
tags: added: crash
Changed in widelands:
milestone: none → build18-rc1
tags: added: seafaring
Changed in widelands:
status: New → Confirmed
Hans Joachim Desserud (hjd) wrote :

Could either of you please attach a savegame where this issue is reproducible and/or terminal output including an error message (and preferably backtrace) when this happens?

Shevonar (shevonar) wrote :

The duplicate bug #1009504 has a patch for this problem.

Andreas Breitschopp (ab-tools) wrote :

Ah, sorry for posting a duplicate bug - I searched before, but obviously with the wrong keywords...

I'll create a branch and propose it for merging as suggested. Thanks for your fast reply, Shevanar!

Andreas Breitschopp (ab-tools) wrote :

I've added a new branch and proposed it for merging.

Changed in widelands:
assignee: nobody → Andreas Breitschopp (ab-tools)
SirVer (sirver) wrote :

Andreas, thanks for debugging this. But what happens now in this situations? If the pont is full of ships, no other ship can go there. The crash was not ideal, but what happens now after your solution?

Andreas Breitschopp (ab-tools) wrote :

First this crash does not only occur when there is really no space left anymore at all, but already (see the description of my duplicate bug where I also explained the reason for it) when a ship is requested to move, but it cannot, because in every direction there is another ship already.

Therefore in my test save game there was not yet every space filled up with ships as my sea is quite large.

But just for fun I've tested it now after applying my patch: after building 40 shipyards the sea was full of ships quite soon. ;-)

It looks funny then, because every ship constantly trys to move around, ships just swapping places with each other all the time, everywhere in the sea.

I think this is expected behavior in this case and with my patch applied there was no crash anymore (I kept it running for about 4 hours at 6x speed).

SirVer (sirver) wrote :

merged in r6398. Thanks Andreas!

Changed in widelands:
status: Confirmed → 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.

Duplicates of this bug

Other bug subscribers