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

Bug #963963 reported by Astuur
16
This bug affects 2 people
Affects Status Importance Assigned to Milestone
widelands
Fix Released
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

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

Revision history for this message
Shevonar (shevonar) wrote :

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

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

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

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

Revision history for this message
SirVer (sirver) wrote :

merged in r6398. Thanks Andreas!

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

Duplicates of this bug

Other bug subscribers

Remote bug watches

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