Complete.Org: Mailing Lists: Archives: freeciv-dev: September 2003:
[Freeciv-Dev] Re: (PR#6260) Assert in server on city size
Home

[Freeciv-Dev] Re: (PR#6260) Assert in server on city size

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: paul@xxxxxxxxxxxxx
Subject: [Freeciv-Dev] Re: (PR#6260) Assert in server on city size
From: "Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx>
Date: Tue, 30 Sep 2003 20:01:57 -0700
Reply-to: rt@xxxxxxxxxxxxxx

Jason Short wrote:
> Can be reproduced with the attached rc file.  It takes until ~1690 AD,
> however.
> 
> auto_arrange_workers should NOT, NOT, NOT be calling the helper
> functions to change the city workers.  Each of these helper functions
> calls various other helper functions, way on down the line, which can
> (but should not) result in a recursive call back to
> auto_arrange_workers.  I remember a very similar bug happening earlier.
>  The problem is there is no available function to change tile status
> that doesn't have the possibility for recursive re-entry.

Run the autogame with this patch.  The CM is telling the city to use an 
unavailable tile.

jason

? core.7132
? core.7149
? core.7246
Index: server/cityturn.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/server/cityturn.c,v
retrieving revision 1.225
diff -u -r1.225 cityturn.c
--- server/cityturn.c   2003/09/22 16:04:03     1.225
+++ server/cityturn.c   2003/10/01 03:51:34
@@ -240,6 +240,7 @@
     if (pcity->city_map[x][y] != C_TILE_WORKER
        && !is_city_center(x, y)
        && cmr.worker_positions_used[x][y]) {
+      assert(city_can_work_tile(pcity, x, y));
       server_set_worker_city(pcity, x, y);
     }
   } city_map_checked_iterate_end;

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