[Freeciv-Dev] Core dump in aihand.c
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Stack trace is:
#0 0x807a06c in ai_manage_taxes (pplayer=0x8201ec4) at aihand.c:413
#1 0x807933d in ai_do_last_activities (pplayer=0x8201ec4) at aihand.c:121
#2 0x805a3c7 in update_player_activities (pplayer=0x8201ec4) at plrhand.c:596
#3 0x804f1e8 in end_turn () at civserver.c:689
#4 0x804e7f3 in main (argc=4, argv=0xbffffae4) at civserver.c:428
#5 0x8048f8e in ___crt_dummy__ ()
Line 413 is
unit_list_iterate(pcity->units_supported, punit)
pcity->units_supported is:
$3 = {list = {nelements = 1, null_link = {next = 0x8218494, prev = 0x8218494,
dataptr = 0x0}, head_link = 0x821c850, tail_link = 0x821c850}}
and punit is:
$4 = (struct unit *) 0x3
In context:
if (pcity->shield_surplus < 0) {
unit_list_iterate(pcity->units_supported, punit)
if (punit != defender && pcity->shield_surplus < 0) {
/* the defender MUST NOT be disbanded! -- Syela */
flog(LOG_DEBUG, "Disbanding %s's %s",
pcity->name, unit_types[punit->type].name);
pack.unit_id = punit->id;
handle_unit_disband(pplayer, &pack);
city_refresh(pcity);
}
unit_list_iterate_end;
}
The block is only entered if pcity->shield_surplus <0, but at the core dump
pcity->shield_surplus is equal to zero.
This bug popped up in a 4 AI game in 140AD.
==Jake
- [Freeciv-Dev] Core dump in aihand.c,
Jake Kesinger <=
|
|