Complete.Org: Mailing Lists: Archives: freeciv-dev: July 2005:
[Freeciv-Dev] (PR#13388) Server Crash on Load Saved Game
Home

[Freeciv-Dev] (PR#13388) Server Crash on Load Saved Game

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Subject: [Freeciv-Dev] (PR#13388) Server Crash on Load Saved Game
From: "White Raven" <whraven@xxxxxxxxxxxxxxxx>
Date: Fri, 1 Jul 2005 08:37:02 -0700
Reply-to: bugs@xxxxxxxxxxx

<URL: http://bugs.freeciv.org/Ticket/Display.html?id=13388 >

CVS version of 30 July, 2005, compiled for GTK-2.0.

>From the log file:

> civserver: game.c:442: game_remove_player: Assertion 
> `conn_list_size(pplayer->connections) == 0' failed.

The assertion in game.c:

assert(conn_list_size(pplayer->connections) == 0);

is not true when the client requests the load of a savegame; there is,
in fact, at least one client connection.  The server crashes, and the
savegame cannot be loaded.  The patch below appears to fix the crash
without causing other serious problems.  Without knowing why the
assertion was there in the first place, I'm not sure whether it should
be removed (as this patch does), or modified.

===================================================================
RCS file: /home/freeciv/CVS/freeciv/common/game.c,v
retrieving revision 1.223
diff -u -r1.223 game.c
--- common/game.c       30 Jun 2005 18:56:13 -0000      1.223
+++ common/game.c       1 Jul 2005 15:17:31 -0000
@@ -439,7 +439,6 @@
     pplayer->attribute_block.data = NULL;
   }
  
-  assert(conn_list_size(pplayer->connections) == 0);
   conn_list_unlink_all(pplayer->connections);
   conn_list_free(pplayer->connections);
   pplayer->connections = NULL;





[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] (PR#13388) Server Crash on Load Saved Game, White Raven <=