Closed balwierz closed 1 year ago
@balwierz probably same as #1520
What I see in the game is that the harbour is being attacked. The crash happens right when the enemy soldier enters it:
The crash occurs, because this condition is not true: https://github.com/Return-To-The-Roots/s25client/blob/master/libs/s25main/figures/noFigure.cpp#L429
The actual value of the GOT at that position is GO_Type::Fire
.
When simply adding an if guard for this condition in noFigure::GoHome
, another check fails: https://github.com/Return-To-The-Roots/s25client/blob/master/libs/s25main/buildings/nobBaseWarehouse.h#L220
The problem is somehow related to the fact that at this moment an expedition was about to start from this harbour and calling DestroyBuilding()
cause adding figures. I don't quite understand what is supposed to happen with figures here though.
I think I found the bug. I will create a pull request.
win32 version v20230302-60d3d9470be818b02f1af32f53a545bd8d30d041 Steps to reproduce:
dfhg.zip
PS. Also at the same game there started to appear less serious bugs before: Some goods are not transported near the blue player's harbour. Blue player cannot attack the enemy's harbour although it is visible, there are enough soldiers etc. Blue player has some buildings not being built (despite enough resources and builder present) near the harbour.