bzr7705[trunk] crashes in do_conquer_area

Bug #1534962 reported by Klaus Halfmann
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
widelands
New
Undecided
Unassigned

Bug Description

I was testing a Map I created with this Version when I was bulding a Port (as Atlanters) at the coast of the Barbarians
the Games stopped with:

Assertion failed: (preferred_player != player_area.player_number), function do_conquer_area, file ...widelands-repo/trunk/src/logic/editor_game_base.cc, line 679.

This game was a netowrk game I started agains an AI, it was temporary "visited" by a netowrk player "whytrytofly", who left the game again after a few minute.

Ill try to reproduce this with a debugger based on the last autosave, but this may take some time ...

Revision history for this message
Klaus Halfmann (klaus-halfmann) wrote :
Revision history for this message
Klaus Halfmann (klaus-halfmann) wrote :

Ok, found this in the debugger.

this Widelands::Game * 0x7fff5a53cd98 0x00007fff5a53cd98
conquer const bool false false
preferred_player Widelands::PlayerNumber '\x01' '\x01'
neutral_when_no_influence const bool false false
neutral_when_competing_influence const bool false false
conquer_guarded_location_by_superior_influence const bool false false
first_field const Widelands::Field & 0x00000001164d0000 0x00000001164d0000
conquering_player Widelands::Player & 0x0000000300000000 0x0000000300000000

player_area Widelands::PlayerArea<Widelands::Area<Widelands::FCoords, unsigned short> >
Widelands::Area<Widelands::FCoords, unsigned short> Widelands::Area<Widelands::FCoords, unsigned short>
Widelands::FCoords Widelands::FCoords
radius Widelands::Area<Widelands::FCoords, unsigned short>::RadiusType 5 5
player_number Widelands::PlayerNumber '\x01' '\x01'

Revision history for this message
Klaus Halfmann (klaus-halfmann) wrote :
Revision history for this message
Klaus Halfmann (klaus-halfmann) wrote :
Revision history for this message
wl-zocker (wl-zocker) wrote :

The problem seems to be that the port is a big building, and the spot just to the left of the entry is still part of the building. But then, there is no space for a border between the port and the red player's area.

A correct approach would be to reserve enough space for the construction site already. If the red player has been there before, the construction of a port should not have started (the ship should not have found the port space, similar to when the other player would own the whole territory). If the construction site was first, the tower would have destroyed it.

I think bug 1296884 describes the same problem.

Revision history for this message
Klaus Halfmann (klaus-halfmann) wrote :

Must Add tgis is on OSX using a clang build

Revision history for this message
Klaus Halfmann (klaus-halfmann) wrote :

Thanks @wl-zocker for that analysis. I think in such a case the Port should somehow "invade" the enemies terretory, so it can be used to build some Military building (if feasisble). How welse should it be possible to invade any enemy Iland?

Revision history for this message
wl-zocker (wl-zocker) wrote :

A rule of Widelands has always been that you cannot lose territory as long as you do not destroy you military buildings and as long as none of them are conquered. Neither of these two conditions is fulfilled when an enemy builds a port close to your border.
The correct approach would be to somehow send soldiers to the port space who will attack the military building (i.e. the tower in this case). See bug 1191296 for more information and a discussion about different possibilities. It will not happen for build19 though.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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