Complete.Org: Mailing Lists: Archives: freeciv-ai: July 2004:
[freeciv-ai] Re: [Freeciv-Dev] (PR#9353) A save game that crashes the se
Home

[freeciv-ai] Re: [Freeciv-Dev] (PR#9353) A save game that crashes the se

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: astals11@xxxxxxxx
Subject: [freeciv-ai] Re: [Freeciv-Dev] (PR#9353) A save game that crashes the server
From: "Per Inge Mathisen" <per@xxxxxxxxxxx>
Date: Mon, 12 Jul 2004 13:56:13 -0700
Reply-to: rt@xxxxxxxxxxx

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

On Mon, 12 Jul 2004, Albert Astals Cid wrote:
> Hi, that saved game crashes the server with both client and server compiled
> from CVS as of 12-July-2004
>
> The server gives that error
>
> civserver: citytools.c:2103: server_set_worker_city: Assertion
> `get_worker_city(pcity, city_x, city_y) == C_TILE_EMPTY' failed.
> Aborted

Thanks for this bug report. Here is a patch.

  - Per

Index: ai/aihand.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/ai/aihand.c,v
retrieving revision 1.89
diff -u -r1.89 aihand.c
--- ai/aihand.c 7 Jul 2004 07:32:03 -0000       1.89
+++ ai/aihand.c 12 Jul 2004 20:53:19 -0000
@@ -188,10 +188,12 @@
         if (pcity->ai.celebrate == TRUE) {
           freelog(LOGLEVEL_TAX, "setting %s to celebrate", pcity->name);
           cm_query_result(pcity, &cmp, &cmr);
-          apply_cmresult_to_city(pcity, &cmr);
-          generic_city_refresh(pcity, TRUE, NULL);
-          if (cmr.found_a_valid && !city_happy(pcity)) {
-            CITY_LOG(LOG_ERROR, pcity, "is NOT happy when it should be!");
+          if (cmr.found_a_valid) {
+            apply_cmresult_to_city(pcity, &cmr);
+            generic_city_refresh(pcity, TRUE, NULL);
+            if (!city_happy(pcity)) {
+              CITY_LOG(LOG_ERROR, pcity, "is NOT happy when it should be!");
+            }
           }
         }
       } city_list_iterate_end;

[Prev in Thread] Current Thread [Next in Thread]
  • [freeciv-ai] Re: [Freeciv-Dev] (PR#9353) A save game that crashes the server, Per Inge Mathisen <=