Complete.Org: Mailing Lists: Archives: freeciv-dev: October 2004:
[Freeciv-Dev] (PR#10600) ai_data_turn_init crash
Home

[Freeciv-Dev] (PR#10600) ai_data_turn_init crash

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: undisclosed-recipients: ;
Subject: [Freeciv-Dev] (PR#10600) ai_data_turn_init crash
From: "Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx>
Date: Mon, 18 Oct 2004 17:07:07 -0700
Reply-to: rt@xxxxxxxxxxx

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

I was playing around building diplomats (I edited the ruleset so they 
had no tech_req and cost 2 shields).  I was fortifying, exploring, 
aitoggling myself, etc.  There were also other players in the game.  And:

#0  0x080c4f89 in map_get_city (ptile=0x0)
     at ../../freeciv-2.0/common/map.c:1394
1394      return ptile->city;
(gdb) bt
#0  0x080c4f89 in map_get_city (ptile=0x0)
     at ../../freeciv-2.0/common/map.c:1394
#1  0x0811d089 in ai_data_turn_init (pplayer=0x8204270)
     at ../../freeciv-2.0/ai/aidata.c:284
#2  0x0804f2b6 in begin_phase (is_new_phase=true)
     at ../../freeciv-2.0/server/srv_main.c:513
#3  0x08050f52 in main_loop () at ../../freeciv-2.0/server/srv_main.c:1502
#4  0x08051842 in srv_loop () at ../../freeciv-2.0/server/srv_main.c:1855
#5  0x0805119f in srv_main () at ../../freeciv-2.0/server/srv_main.c:1621
#6  0x0804a8cb in main (argc=3, argv=0xbffff7e4)
     at ../../freeciv-2.0/server/civserver.c:167

(gdb) select 1
(gdb) p pplayer->player_no
$1 = 0
(gdb) p pplayer->ai.control
$2 = false
(gdb) p unit_types[punit->type].name
$1 = "Diplomat", '\0' <repeats 23 times>
(gdb) p punit->activity
$2 = ACTIVITY_FORTIFIED
(gdb) p punit->ai.ai_role
$3 = AIUNIT_ATTACK
(gdb) p punit->tile->city
$1 = (struct city *) 0x84e1318
(gdb) p punit->goto_tile
$2 = (struct tile *) 0x0

This is odd.  Why are we updating AI data for a human player?  This 
player may have been AI in the previous turn.

In fact this is clearly the same bug as PR#10567.  And since it's with 
the most recent stable branch (S2_0 as of this moment, post-dipl2.diff) 
this bug is not fixed.

However, I've tried to reproduce it and haven't been able to.  However I 
can say for sure I was just building diplomats, fortifying them in and 
out of cities, and aitoggling and toggling back.  So someone else can 
probably reproduce it, if you try hard enough.

jason




[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] (PR#10600) ai_data_turn_init crash, Jason Short <=