[Freeciv-Dev] Re: (PR#10415) segfault in map_distance_vector()
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: |
undisclosed-recipients: ; |
Subject: |
[Freeciv-Dev] Re: (PR#10415) segfault in map_distance_vector() |
From: |
"Marko Lindqvist" <marko.lindqvist@xxxxxxxxxxx> |
Date: |
Sun, 3 Oct 2004 21:59:11 -0700 |
Reply-to: |
rt@xxxxxxxxxxx |
<URL: http://rt.freeciv.org/Ticket/Display.html?id=10415 >
Another map_distance_vector() segfault. This time it originates from
hut_get_barbarians().
"CVS Oct 2 08:31 EEST", attached autogame.
Program received signal SIGSEGV, Segmentation fault.
map_distance_vector (dx=0x22ea80, dy=0x22ea84, tile0=0x1028f638, tile1=0x0)
at ../../freeciv-src/common/map.c:1541
1541 base_map_distance_vector(dx, dy,
(gdb) bt
#0 map_distance_vector (dx=0x22ea80, dy=0x22ea84, tile0=0x1028f638,
tile1=0x0)
at ../../freeciv-src/common/map.c:1541
#1 0x004672a6 in real_map_distance (tile0=0x1028f638, tile1=0x0)
at ../../freeciv-src/common/map.c:649
#2 0x00468b48 in is_tiles_adjacent (tile0=0x1028f638, tile1=0x0)
at ../../freeciv-src/common/map.c:1277
#3 0x004b678a in test_unit_move_to_tile (type=20, unit_owner=0x5cc4b0,
activity=ACTIVITY_IDLE,
pfromtile=0x1028f638, ptotile=0x0, igzoc=true) at
../../freeciv-src/common/unit.c:1505
#4 0x004b673f in can_unit_move_to_tile (punit=0x10ceb458, dst_tile=0x0,
igzoc=1)
at ../../freeciv-src/common/unit.c:1468
#5 0x00445df0 in unleash_barbarians (ptile=0x1028f638)
at ../../freeciv-src/server/barbarian.c:249
#6 0x00442b43 in hut_get_barbarians (punit=0x1120ed80)
at ../../freeciv-src/server/unittools.c:2298
#7 0x00442d64 in unit_enter_hut (punit=0x1120ed80) at
../../freeciv-src/server/unittools.c:2379
#8 0x00443c7a in move_unit (punit=0x1120ed80, pdesttile=0x1028f638,
move_cost=3)
at ../../freeciv-src/server/unittools.c:2777
#9 0x0045301e in handle_unit_move_request (punit=0x1120ed80,
pdesttile=0x1028f638, igzoc=false,
move_diplomat_city=false) at ../../freeciv-src/server/unithand.c:1133
#10 0x004c7578 in ai_unit_attack (punit=0x1120ed80, ptile=0x1028f638)
at ../../freeciv-src/ai/aitools.c:480
#11 0x004c6721 in ai_unit_execute_path (punit=0x1120ed80, path=0x10e52240)
at ../../freeciv-src/ai/aitools.c:123
#12 0x004ca346 in ai_military_rampage (punit=0x1120ed80, thresh_adj=1,
thresh_move=1)
at ../../freeciv-src/ai/aiunit.c:754
#13 0x004cd165 in ai_military_attack (pplayer=0x5a9eb0, punit=0x1120ed80)
at ../../freeciv-src/ai/aiunit.c:1769
#14 0x004cdc6c in ai_manage_military (pplayer=0x5a9eb0, punit=0x1120ed80)
at ../../freeciv-src/ai/aiunit.c:2043
#15 0x004ce484 in ai_manage_units (pplayer=0x5a9eb0) at
../../freeciv-src/ai/aiunit.c:2203
#16 0x004056d8 in ai_start_turn () at
../../freeciv-src/server/srv_main.c:469
#17 0x004059af in begin_phase (is_new_phase=true) at
../../freeciv-src/server/srv_main.c:542
#18 0x004078b5 in main_loop () at ../../freeciv-src/server/srv_main.c:1509
#19 0x00407b5b in srv_main () at ../../freeciv-src/server/srv_main.c:1628
#20 0x0040140f in main (argc=3, argv=0x10101c48) at
../../freeciv-src/server/civserver.c:170
(gdb) frame 4
#4 0x004b673f in can_unit_move_to_tile (punit=0x10ceb458, dst_tile=0x0,
igzoc=1)
at ../../freeciv-src/common/unit.c:1468
1468 return MR_OK == test_unit_move_to_tile(punit->type,
unit_owner(punit),
(gdb) p *punit
$1 = {type = 20, id = 2306, owner = 11, tile = 0x1028f638, homecity = 0,
moves_left = 6,
hp = 10, veteran = 0, unhappiness = 0, upkeep = 0, upkeep_food = 0,
upkeep_gold = 0, fuel = 5,
bribe_cost = -1, ai = {control = false, ai_role = AIUNIT_NONE,
ferryboat = 0, passenger = 0,
bodyguard = 0, charge = 0, prev_struct = 0x0, cur_struct = 0x0,
prev_pos = 0x0,
cur_pos = 0x0, target = 0, hunted = 0}, activity = ACTIVITY_IDLE,
goto_tile = 0x0,
activity_count = 0, activity_target = S_NO_SPECIAL, focus_status =
FOCUS_AVAIL, ord_map = 0,
ord_city = 0, foul = false, debug = false, moved = false, paradropped
= false,
done_moving = false, transported_by = -1, occupy = 0, client = {color
= 0},
has_orders = false, orders = {length = 0, index = 0, repeat = false,
vigilant = false,
list = 0x0}}
(gdb) p game.year
$2 = 1670
(gdb) p unit_name(punit->type)
$3 = 0x620160 "Knights"
(gdb) frame 6
#6 0x00442b43 in hut_get_barbarians (punit=0x1120ed80)
at ../../freeciv-src/server/unittools.c:2298
2298 ok = unleash_barbarians(unit_tile);
(gdb) p *unit_tile
$4 = {x = 59, y = 47, nat_x = 59, nat_y = 47, index = 3725, terrain = 10,
special = S_NO_SPECIAL, city = 0x0, units = {list = {nelements = 4,
head_link = 0x111dcda8,
tail_link = 0x10dfde98}}, known = 4079, assigned = 0, worked =
0x0, continent = 8,
move_cost = "\t\006HHHHHH", owner = 0x0, client = {hilite =
HILITE_NONE}, spec_sprite = 0x0}
(gdb) frame 7
#7 0x00442d64 in unit_enter_hut (punit=0x1120ed80) at
../../freeciv-src/server/unittools.c:2379
2379 ok = hut_get_barbarians(punit);
(gdb) p *punit
$5 = {type = 0, id = 1953719636, owner = 29285, tile = 0x0, homecity =
0, moves_left = 0,
hp = 0, veteran = 0, unhappiness = 0, upkeep = 1935765077,
upkeep_food = 1852270963,
upkeep_gold = 25701, fuel = 0, bribe_cost = 0, ai = {control = false,
ai_role = AIUNIT_NONE,
ferryboat = 0, passenger = 1, bodyguard = 2, charge = 2,
prev_struct = 0x4e,
cur_struct = 0xff, prev_pos = 0x0, cur_pos = 0xea, target = 1,
hunted = -1},
activity = ACTIVITY_POLLUTION, goto_tile = 0xe0, activity_count =
660, activity_target = 5,
focus_status = FOCUS_AVAIL, ord_map = 0, ord_city = 0, foul = true,
debug = false,
moved = false, paradropped = false, done_moving = 16, transported_by
= 0, occupy = 20,
client = {color = 0}, has_orders = false, orders = {length = 0, index
= 16, repeat = false,
vigilant = false, list = 0x0}}
(gdb) p unit_name(punit->type)
$6 = 0x61bf20 "Settlers"
- Caz
- [Freeciv-Dev] Re: (PR#10415) segfault in map_distance_vector(),
Marko Lindqvist <=
|
|