Complete.Org: Mailing Lists: Archives: freeciv-dev: June 2004:
[Freeciv-Dev] Re: (PR#8920) bizarre crash
Home

[Freeciv-Dev] Re: (PR#8920) bizarre crash

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: undisclosed-recipients: ;
Subject: [Freeciv-Dev] Re: (PR#8920) bizarre crash
From: "Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx>
Date: Sun, 6 Jun 2004 11:40:47 -0700
Reply-to: rt@xxxxxxxxxxx

<URL: http://rt.freeciv.org/Ticket/Display.html?id=8920 >

Jason Short wrote:
> <URL: http://rt.freeciv.org/Ticket/Display.html?id=8920 >
> 
> Jason Short wrote:
> 
>><URL: http://rt.freeciv.org/Ticket/Display.html?id=8920 >
>>
>>I have no idea why this is happening.
>>
>>- Apply the attached patch.
>>- Load the attached savegame.
>>- Conquer the city.
>>- End the turn.
>>
>>The game ends and I get the score screen.
> 
> 
> OK it's a bit easier to reproduce:
> 
> - Start a game.
> - /end it.
> 
> If you do this through the conndlg the server will crash.

And the fix.

jason

? doc/Who_to_create_the_temperature_math.txt
Index: server/srv_main.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/server/srv_main.c,v
retrieving revision 1.167
diff -u -r1.167 srv_main.c
--- server/srv_main.c   6 Jun 2004 18:31:09 -0000       1.167
+++ server/srv_main.c   6 Jun 2004 18:40:10 -0000
@@ -1519,10 +1519,6 @@
   /* Run server loop */
   while (TRUE) {
     srv_loop();
-    if (game.timeout == -1 || srvarg.exit_on_end) {
-      /* For autogames or if the -e option is specified, exit the server. */
-      server_quit();
-    }
 
     send_game_state(&game.game_connections, CLIENT_GAME_OVER_STATE);
     report_final_scores();
@@ -1538,6 +1534,11 @@
       (void) sniff_packets();
     }
 
+    if (game.timeout == -1 || srvarg.exit_on_end) {
+      /* For autogames or if the -e option is specified, exit the server. */
+      server_quit();
+    }
+
     /* Reset server */
     server_game_free();
     game_init();

[Prev in Thread] Current Thread [Next in Thread]