segfault when building port

Bug #1829482 reported by Leighton Man
16
This bug affects 2 people
Affects Status Importance Assigned to Milestone
widelands
Won't Fix
Undecided
Unassigned

Bug Description

When playing version bzr9040[trunk] with map "Crossing the Horizon" and a new port reaches 99% complete the game freezes briefly and I get the console messages:

Message: adding warehouse for player 1 at (51, 49)

Attempting to setup port without neighboring water (coords: 51x 49).

Segmentation fault (core dumped)

Tags: seafaring
Revision history for this message
Leighton Man (leightonman) wrote :
Revision history for this message
kaputtnik (franku) wrote :

See also:

 bug 1296884 "Port near frontier is destroyed when its construction has finished"
 bug 1785951 "River Explorers crashes on Port completion"

I remember we had a similar bug for the map 'The Nile' but cant find it.

Don't know if we should mark bug 1296884 as duplicate, because that bug as no crash, but i think the underlying problem is the same.

Revision history for this message
Leighton Man (leightonman) wrote :

Replay files added

Revision history for this message
Leighton Man (leightonman) wrote :

replay file

Revision history for this message
Toni Förster (stonerl) wrote :

The replay starts at 7h 7min. We need one that starts earlier because here all the military buildings are already erected.

Revision history for this message
Leighton Man (leightonman) wrote :
Revision history for this message
Leighton Man (leightonman) wrote :
Revision history for this message
kaputtnik (franku) wrote :

Thanks for the replays :-)

It shows that the red players guardhouses are erected long before the port construction site is built. The ports construction site is build round about at 7 hrs of the replay.

I think it shouldn't be possible to start building a port there.

Changed in widelands:
status: New → Confirmed
Revision history for this message
Toni Förster (stonerl) wrote :

I assume the problem here is, the water space needed to build a port and the space a constructed port needs, are different.

Revision history for this message
Leighton Man (leightonman) wrote :

As an experiment, I played the game again and built the port next to the red player's territory as early as possible. It completed, as expected, with no problem. After red had colonized the adjacent island and built the guardhouses, I dismantled the port. Red's territory expanded so the port space did not reappear making the island inaccessible. That does not feel quite right to me?

Revision history for this message
kaputtnik (franku) wrote :

Thanks for the effort to testplay it again :-)

Looks like something with the calculation is wrong, depending on if opposite areas get claimed or not.

I don't know the reason why the initial port space is smaller in construction than after finishing the port, but i think having the same size for a ports construction site as we have after finishing the port would make it more clear (for the code logic). And as i mentioned in the forum, this may be helpful once we allow soldiers in expeditions.

Revision history for this message
GunChleoc (gunchleoc) wrote :

How about having 4 construction site types - small, medium, big, and mine? Maybe per tribe too?

This way, we could also give them individual graphics if we want.

tags: added: seafaring
Revision history for this message
GunChleoc (gunchleoc) wrote :
Changed in widelands:
status: Confirmed → Won't Fix
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.