URL: <http://gna.org/bugs/?20520>
Summary: player_set_nation() assertions failed Project: Freeciv Submitted by: pepeto Submitted on: dim. 17 févr. 2013 13:20:52 CET Category: general Severity: 3 - Normal Priority: 5 - Normal Status: Ready For Test Assigned to: pepeto Originator Email: Open/Closed: Open Release: trunk r22341 Discussion Lock: Any Operating System: None Planned Release: 2.5.0 _______________________________________________________ Details: When trying to change of ruleset, I get: 1: in player_set_nation() [player.c::739]: assertion 'pnation->player == NULL' failed. 1: Please report this message at http://gna.org/projects/freeciv/ 1: in player_set_nation() [player.c::739]: assertion 'pnation->player == NULL' failed. 1: Please report this message at http://gna.org/projects/freeciv/ 1: in player_set_nation() [player.c::739]: assertion 'pnation->player == NULL' failed. 1: Please report this message at http://gna.org/projects/freeciv/ 1: in player_set_nation() [player.c::739]: assertion 'pnation->player == NULL' failed. 1: Please report this message at http://gna.org/projects/freeciv/ 1: in player_set_nation() [player.c::735]: assertion 'pplayer->nation->player == pplayer' failed. 1: Please report this message at http://gna.org/projects/freeciv/ 1: in player_set_nation() [player.c::735]: assertion 'pplayer->nation->player == pplayer' failed. 1: Please report this message at http://gna.org/projects/freeciv/ 1: in player_set_nation() [player.c::739]: assertion 'pnation->player == NULL' failed. 1: Please report this message at http://gna.org/projects/freeciv/ 1: in player_set_nation() [player.c::735]: assertion 'pplayer->nation->player == pplayer' failed. 1: Please report this message at http://gna.org/projects/freeciv/ 1: in player_set_nation() [player.c::739]: assertion 'pnation->player == NULL' failed. 1: Please report this message at http://gna.org/projects/freeciv/ 1: in player_set_nation() [player.c::735]: assertion 'pplayer->nation->player == pplayer' failed. 1: Please report this message at http://gna.org/projects/freeciv/ 1: in player_set_nation() [player.c::739]: assertion 'pnation->player == NULL' failed. 1: Please report this message at http://gna.org/projects/freeciv/ 1: in player_set_nation() [player.c::735]: assertion 'pplayer->nation->player == pplayer' failed. 1: Please report this message at http://gna.org/projects/freeciv/ 1: in player_set_nation() [player.c::739]: assertion 'pnation->player == NULL' failed. 1: Please report this message at http://gna.org/projects/freeciv/ This is linked with patch #3688, using nation_count() for serialize a NULL nation to the clients. Unfortunately, player infos are sent many times when switching ruleset (after nations have been freed and when loading the ruleset settings). It results that client:nation_count() != server:nation_count() and produces these errors. I didn't notice yet, but the NATION type for packet handling is SINT16, so the attached fix replace nation_count() by NATION_NONE for computing the PACKET_PLAYER_INFO. _______________________________________________________ File Attachments: ------------------------------------------------------- Date: dim. 17 févr. 2013 13:20:52 CET Name: trunk_packet_player_nation.diff Size: 630 o By: pepeto <http://gna.org/bugs/download.php?file_id=17237> _______________________________________________________ Reply to this item at: <http://gna.org/bugs/?20520> _______________________________________________ Message posté via/par Gna! http://gna.org/ _______________________________________________ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev