[Freeciv-Dev] civgame-750-hangs.gdb
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Here is the trace that shows where it hangs.
Things to fix immediately would be:
- make sure dangerfunct (v=0, m=0, dist=39) advmilitary.c:127
is not called with a zero value m. ( add a assert(m); there ).
The unit pointer/unit type used is fishy, see punit.
BTW.:
I could only run the program after editing your savefile, I don´t have so many
nations.
Maybe the nation info should be expanded/ or substituted so that it works,
instead of relying on a nation index;
I don't know whether the nation id is actually used, guess in the ai setup, and
in the image selection.
Program received signal SIGINT, Interrupt.
0x80938d4 in dangerfunct (v=0, m=0, dist=39) at advmilitary.c:127
/home/schaefer/freeciv-1.9.0/ai/advmilitary.c:127:4258:beg:0x80938d4
(gdb) insp funit->type
No symbol "funit" in current context.
(gdb) where
#0 0x80938d4 in dangerfunct (v=0, m=0, dist=39) at advmilitary.c:127
#1 0x80943dc in assess_danger (pcity=0x82d0590) at advmilitary.c:322
#2 0x8051253 in main (argc=3, argv=0xbffff4e4) at civserver.c:440
(gdb) return
Make dangerfunct return now? (y or n) y
#0 0x80943dc in assess_danger (pcity=0x82d0590) at advmilitary.c:322
/home/schaefer/freeciv-1.9.0/ai/advmilitary.c:322:11967:beg:0x80943dc
(gdb) insp funit->type
$4 = 0
(gdb) insp funit
$5 = (struct unit *) 0xbffff3b4
(gdb) insp *funit
$6 = {type = 0, id = 0, owner = 0, x = 0, y = 0, veteran = 0, homecity = 0,
moves_left = 0, hp = 0, unhappiness = 0, upkeep = 0,
upkeep_food = 0, upkeep_gold = 0, foul = 0, fuel = 0, bribe_cost = 0, ai =
{control = 0, ai_role = 0, ferryboat = 0, passenger = 0,
bodyguard = 0, charge = 0}, activity = ACTIVITY_IDLE, goto_dest_x = 0,
goto_dest_y = 0, activity_count = 0, activity_target = 0,
focus_status = FOCUS_AVAIL, ord_map = 0, ord_city = 0, moved = 0, paradropped
= 0}
(gdb) insp unit_types[funit->type]
$7 = {name = "Settlers", '\000' <repeats 23 times>, name_orig = "Settlers",
'\000' <repeats 23 times>,
graphic_str = "u.settlers", '\000' <repeats 21 times>, graphic_alt = "-",
'\000' <repeats 30 times>, sprite = 0x0,
move_type = LAND_MOVING, build_cost = 40, attack_strength = 0,
defense_strength = 1, move_rate = 3, tech_requirement = 0,
vision_range = 1, transport_capacity = 0, hp = 20, firepower = 1,
obsoleted_by = 1, fuel = 0, flags = 4227080, roles = 0, happy_cost = 0,
shield_cost = 1, food_cost = 1, gold_cost = 0, paratroopers_range = 0,
paratroopers_mr_req = 0, paratroopers_mr_sub = 0,
helptext = 0x82bf818 "Setters are one of the key units in the game. They can
be used to found new cities, irrigate land, build roads, railroads, fortresses,
airbases and mines, and clean up pollution. Upkeep for Settlers"...}
(gdb) insp unit_types[0]
$8 = {name = "Settlers", '\000' <repeats 23 times>, name_orig = "Settlers",
'\000' <repeats 23 times>,
graphic_str = "u.settlers", '\000' <repeats 21 times>, graphic_alt = "-",
'\000' <repeats 30 times>, sprite = 0x0,
move_type = LAND_MOVING, build_cost = 40, attack_strength = 0,
defense_strength = 1, move_rate = 3, tech_requirement = 0,
vision_range = 1, transport_capacity = 0, hp = 20, firepower = 1,
obsoleted_by = 1, fuel = 0, flags = 4227080, roles = 0, happy_cost = 0,
shield_cost = 1, food_cost = 1, gold_cost = 0, paratroopers_range = 0,
paratroopers_mr_req = 0, paratroopers_mr_sub = 0,
helptext = 0x82bf818 "Setters are one of the key units in the game. They can
be used to found new cities, irrigate land, build roads, railroads, fortresses,
airbases and mines, and clean up pollution. Upkeep for Settlers"...}
(gdb) insp *punit
$9 = {type = 51, id = 241, owner = 5, x = 61, y = 27, veteran = 0, homecity =
0, moves_left = 6, hp = 10, unhappiness = 1684104556,
upkeep = 824996453, upkeep_food = 0, upkeep_gold = 1634885960, foul = 0, fuel
= 3, bribe_cost = -1, ai = {control = 0, ai_role = 0,
ferryboat = 0, passenger = 0, bodyguard = 0, charge = 0}, activity =
ACTIVITY_IDLE, goto_dest_x = 0, goto_dest_y = 0,
activity_count = 0, activity_target = 0, focus_status = 1684104556, ord_map =
1, ord_city = 0, moved = 0, paradropped = 0}
(gdb) insp unit_types[punit->type]
$10 = {name = '\000' <repeats 31 times>, name_orig = '\000' <repeats 31 times>,
graphic_str = '\000' <repeats 31 times>,
graphic_alt = '\000' <repeats 31 times>, sprite = 0x0, move_type = 0,
build_cost = 0, attack_strength = 0, defense_strength = 0,
move_rate = 0, tech_requirement = 0, vision_range = 0, transport_capacity =
0, hp = 0, firepower = 0, obsoleted_by = 0, fuel = 0,
flags = 0, roles = 0, happy_cost = 0, shield_cost = 0, food_cost = 0,
gold_cost = 0, paratroopers_range = 0, paratroopers_mr_req = 0,
paratroopers_mr_sub = 0, helptext = 0x0}
(gdb) insp punit
$11 = (struct unit *) 0x82cde88 et a list of the available commands with 'help'.
>
1: Connection request from Mao with client version 1.9.0
1: <Mao@localhost> has rejoined the game.
> s
Warning: 's' interpreted as 'start', but it is ambiguous. Try 'help'.
Starting game.
Wilhelm is now hard.
Program received signal SIGINT, Interrupt.
0x80938d4 in dangerfunct (v=0, m=0, dist=57) at advmilitary.c:127
/home/schaefer/freeciv-1.9.0/ai/advmilitary.c:127:4258:beg:0x80938d4
(gdb) where
#0 0x80938d4 in dangerfunct (v=0, m=0, dist=57) at advmilitary.c:127
#1 0x80943dc in assess_danger (pcity=0x82d00f8) at advmilitary.c:322
#2 0x8051253 in main (argc=3, argv=0xbffff4e4) at civserver.c:440
(gdb) insp pcity
No symbol "pcity" in current context.
(gdb) up
#1 0x80943dc in assess_danger (pcity=0x82d00f8) at advmilitary.c:322
/home/schaefer/freeciv-1.9.0/ai/advmilitary.c:322:11967:beg:0x80943dc
(gdb) insp pcity
$1 = (struct city *) 0x82d00f8
(gdb) insp *pcity
$2 = {id = 226, owner = 1, x = 42, y = 28, name = "Münster\000
\000\000\000\020\000\000\000H\005-\b(¿-\bT¦*\b!\004\000", size = 3,
ppl_happy = {0, 0, 0, 0, 0}, ppl_content = {3, 3, 3, 3, 3}, ppl_unhappy = {0,
0, 0, 0, 0}, ppl_elvis = 0, ppl_scientist = 0,
ppl_taxman = 0, trade = {0, 0, 0, 0}, trade_value = {0, 0, 0, 0}, food_prod =
10, food_surplus = 4, shield_prod = 1, shield_surplus = 0,
trade_prod = 11, corruption = 0, tile_trade = 11, shield_bonus = 100,
tax_bonus = 100, science_bonus = 100, luxury_total = 0,
tax_total = 11, science_total = 0, food_stock = 36, shield_stock = 15,
pollution = 0, incite_revolt_cost = -1, is_building_unit = 0,
currently_building = 7, improvements = '\000' <repeats 13 times>, "\001",
'\000' <repeats 53 times>, city_map = {{C_TILE_UNAVAILABLE,
C_TILE_EMPTY, C_TILE_EMPTY, C_TILE_EMPTY, C_TILE_UNAVAILABLE},
{C_TILE_EMPTY, C_TILE_EMPTY, C_TILE_WORKER, C_TILE_WORKER,
C_TILE_EMPTY}, {C_TILE_EMPTY, C_TILE_WORKER, C_TILE_WORKER, C_TILE_EMPTY,
C_TILE_EMPTY}, {C_TILE_EMPTY, C_TILE_EMPTY, C_TILE_EMPTY,
C_TILE_EMPTY, C_TILE_EMPTY}, {C_TILE_UNAVAILABLE, C_TILE_EMPTY,
C_TILE_EMPTY, C_TILE_EMPTY, C_TILE_UNAVAILABLE}}, units_supported = {
list = {nelements = 1, null_link = {next = 0x82d028c, prev = 0x82d028c,
dataptr = 0x0}, head_link = 0x82d1b58, tail_link = 0x82d1b58}},
steal = 0, did_buy = 0, did_sell = 0, is_updated = 137167512, anarchy = 0,
was_happy = 0, airlift = 0, original = 1, city_options = 15,
ai = {workremain = 1, ai_role = 0, building_want = {0 <repeats 68 times>},
danger = -1, diplomat_threat = 0, urgency = 16,
grave_danger = 0, wallvalue = 137167832, trade_want = 12, choice = {choice
= 16, want = 137167880, type = 137167848}, downtown = 736,
distance_to_wonder_city = 16, detox = {{1048, 2093, 1016, 2093, 752}, {0,
16, 0, 1064, 2093}, {1032, 2093, 768, 0, 16}, {0, 1080, 2093,
1048, 2093}, {784, 0, 16, 0, 1096}}, mine = {{2093, 1064, 2093, 800,
0}, {16, 0, 1112, 2093, 1080}, {2093, 816, 0, 16, 0}, {1128,
2093, 1096, 2093, 832}, {0, 16, 0, 1144, 2093}}, irrigate = {{1112,
2093, 848, 0, 16}, {0, 1160, 2093, 1128, 2093}, {864, 0, 16, 0,
1176}, {2093, 1144, 2093, 880, 0}, {16, 0, 1192, 2093, 1160}}, road =
{{2093, 896, 0, 16, 0}, {1208, 2093, 1176, 2093, 912}, {0,
16, 0, 1224, 2093}, {1192, 2093, 928, 0, 16}, {0, 1240, 2093, 1208,
2093}}, railroad = {{944, 0, 16, 0, 1256}, {2093, 1224, 2093,
960, 0}, {16, 0, 1272, 2093, 1240}, {2093, 976, 0, 16, 0}, {1288, 2093,
1256, 2093, 992}}, transform = {{0, 16, 0, 1304, 2093}, {
1272, 2093, 1008, 0, 16}, {0, 1320, 2093, 1288, 2093}, {1024, 0, 16, 0,
1336}, {2093, 1304, 2093, 1040, 0}}, tile_value = {{16, 0,
-22948, 2090, 1320}, {2093, 1104, 0, 16, 0}, {2888, 2093, 280, 2093,
-20380}, {2090, 1521, 0, -22048, 2091}, {24440, 16401, 16, 0,
16}}, settler_want = 137168248, a = 137168216, f = 32, invasion = 16}}
hangs.civgame-750.sav.bz2
Description: Binary data
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Freeciv-Dev] civgame-750-hangs.gdb,
Peter Schaefer <=
|
|