Complete.Org: Mailing Lists: Archives: freeciv-dev: September 2004:
[Freeciv-Dev] Re: (PR#10237) AutoReply: Assertion failed: packhand.c:202
Home

[Freeciv-Dev] Re: (PR#10237) AutoReply: Assertion failed: packhand.c:202

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: imbaczek@xxxxxxxxx
Subject: [Freeciv-Dev] Re: (PR#10237) AutoReply: Assertion failed: packhand.c:2022: handle_tile_info: `unit_list_size(&ptile->units) == 0'
From: "Marko Lindqvist" <marko.lindqvist@xxxxxxxxxxx>
Date: Tue, 21 Sep 2004 14:16:55 -0700
Reply-to: rt@xxxxxxxxxxx

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


  I don't know actual culprint, but attached patch might fix this for 
NDEBUG compilations. There is comment in #9864 about this.


  - Caz

diff -Nurd -X.diff_ignore freeciv/server/maphand.c freeciv/server/maphand.c
--- freeciv/server/maphand.c    2004-09-21 18:52:44.484375000 +0300
+++ freeciv/server/maphand.c    2004-09-22 00:12:41.187500000 +0300
@@ -1108,6 +1108,15 @@
       if (update_player_tile_knowledge(pplayer, x, y)) {
         send_tile_info(&pplayer->connections, x, y);
       }
+#ifdef NDEBUG
+      else {
+        /* It seems that some callers are relying on us calling
+           send_tile_info() even if terrain and special knowledge
+           doesn't change. Those caller should be fixed,
+           but for NDEBUG compilations robustness comes first. */
+        send_tile_info(&pplayer->connections, x,y);
+      }
+#endif
     }
   } players_iterate_end;
 

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