URL:
  <http://gna.org/bugs/?17281>

                 Summary: Segmentation fault in get_total_defense_power
                 Project: Freeciv
            Submitted by: doctorjlowe
            Submitted on: Thu 09 Dec 2010 01:59:59 PM GMT
                Category: None
                Severity: 3 - Normal
                Priority: 5 - Normal
                  Status: None
             Assigned to: None
        Originator Email: 
             Open/Closed: Open
                 Release: 2.3.99
         Discussion Lock: Any
        Operating System: GNU/Linux
         Planned Release: 

    _______________________________________________________

Details:

I've been getting this problem for about a week now, currently at revision
18707 running on a 64 bit 2.6.32 kernel.  It may or may not be relevant, but
this doesn't seem to happen with the default ruleset, but pops up pretty often
here with the experimental ruleset.

On turn done, the server silently crashes and dumps the client back to the
main menu.  I will attach a savegame that fails 100% of the time for me.  With
gdb i see this:

Program received signal SIGSEGV, Segmentation fault.
0x00000000004d0a08 in get_total_defense_power (attacker=0x14b31b0,
defender=0x0) at combat.c:561
561       return defense_multiplication(unit_type(attacker),
unit_type(defender),
(gdb) bt full
#0  0x00000000004d0a08 in get_total_defense_power (attacker=0x14b31b0,
defender=0x0) at combat.c:561
No locals.
#1  0x00000000004d0ee3 in unit_win_chance (attacker=0x14b31b0, defender=0x0)
at combat.c:363
        def_power = <value optimized out>
        att_power = <value optimized out>
        chance = 1549.6230356428332
        def_fp = 0
        att_fp = 21705136
#2  0x000000000041d304 in unit_survive_autoattack (punit=0x14b31b0) at
unittools.c:2545
        enemy_defender = 0x0
        punit_defender = <value optimized out>
        punitwin = 0
        threshold = <value optimized out>
        sanity2 = 301
        penemywin = 0
        ptile = <value optimized out>
        penemy = 0x14cd800
        penemy_index = 0
        penemy_size = <value optimized out>
        moves = 3
        sanity1 = 179
#3  0x000000000041db5b in move_unit (punit=0x14b31b0, pdesttile=0x1a1aea0,
move_cost=<value optimized out>) at unittools.c:3050
        pplayer = <value optimized out>
        psrctile = 0x1a1aef8
        pcity = <value optimized out>
        ptransporter = 0x0
        old_vision = 0x1a1aef8
        new_vision = <value optimized out>
        saved_id = 179
        unit_lives = <value optimized out>
        __FUNCTION__ = "move_unit"
#4  0x00000000004960e1 in unit_move_handling (punit=0x14b31b0,
pdesttile=0x1a1aea0, igzoc=false, move_diplomat_city=<value optimized out>) at
unithand.c:1477
        move_cost = 21705136
        pplayer = <value optimized out>
        pcity = <value optimized out>
        __FUNCTION__ = "unit_move_handling"
#5  0x000000000042683f in ai_unit_move (punit=0x14b31b0, ptile=0x1a1aea0) at
aitools.c:1100
        bodyguard = <value optimized out>
        sanity = 179
        pplayer = <value optimized out>
        is_ai = true
        __FUNCTION__ = "ai_unit_move"
#6  0x000000000043c870 in adv_unit_execute_path (punit=0x14b31b0,
path=0x1093240) at advgoto.c:100
---Type <return> to continue, or q <return> to quit---
        plr = <value optimized out>
        ptile = 0x1a1aea0
        id = 179
        is_ai = true
        i = 3
        __FUNCTION__ = "adv_unit_execute_path"
#7  0x000000000043cbdb in adv_follow_path (punit=0x14b31b0, path=0x1093240,
ptile=<value optimized out>) at advgoto.c:57
        old_tile = 0x1a35e08
        activity = ACTIVITY_IDLE
        alive = <value optimized out>
#8  0x0000000000428283 in ai_unit_goto_constrained (punit=0x14b31b0,
ptile=0x1a35e08, parameter=<value optimized out>) at aitools.c:431
        alive = <value optimized out>
        pfm = <value optimized out>
        path = <value optimized out>
        __FUNCTION__ = "ai_unit_goto_constrained"
#9  0x0000000000428511 in ai_unit_goto (punit=0x14b31b0, ptile=0x1a35e08) at
aitools.c:843
        parameter = {start_tile = 0x1a1dba8, moves_left_initially = 12,
fuel_left_initially = 1, move_rate = 12, fuel = 1, owner = 0x150a870, uclass =
0x9fa9d0, unit_flags = {
            vec = "\000\000\000\000\b\000\000"}, omniscience = true, get_MC =
0x570890 <sea_overlap_move>, unknown_MC = 6, get_TB = 0x56ff70 <no_fights>, 
          get_EC = 0x427050 <prefer_short_stacks>, can_invade_tile = 0x54e010
<player_can_invade_tile>, get_zoc = 0, is_pos_dangerous = 0,
get_moves_left_req = 0, 
          get_costs = 0, data = 0x7fffffffdce0}
        risk_cost = {base_value = 40, fearfulness = 455.11111111111109,
enemy_zoc_cost = 1310720}
        __FUNCTION__ = "ai_unit_goto"
#10 0x0000000000424c9b in ai_manage_ferryboat (pplayer=0xb, punit=0x14b31b0)
at aiferry.c:1113
        pcity = <value optimized out>
        sanity = <value optimized out>
        unit_data = 0x14d2310
        __FUNCTION__ = "ai_manage_ferryboat"
#11 0x000000000049fe93 in ai_manage_unit (pplayer=0x150a870, punit=0x14b31b0)
at aiunit.c:2255
        bodyguard = <value optimized out>
        is_ferry = true
        __FUNCTION__ = "ai_manage_unit"
#12 0x00000000004a11c5 in ai_manage_units (pplayer=<value optimized out>) at
aiunit.c:2381
        punit = 0x14b31b0
        punit_index = 12
        punit_size = 17
#13 0x0000000000499329 in ai_do_first_activities (pplayer=0x150a870) at
aihand.c:482
No locals.
#14 0x000000000040ad50 in ai_start_phase () at srv_main.c:778
        MY_i = 100
        pplayer = 0x150a870
#15 begin_phase () at srv_main.c:924
No locals.
#16 srv_running () at srv_main.c:2112
---Type <return> to continue, or q <return> to quit---
        eot_timer = 0x1093d40
        save_counter = 1
        is_new_turn = <value optimized out>
        need_send_pending_events = false
        __FUNCTION__ = "srv_running"
#17 0x000000000040b4e7 in srv_main () at srv_main.c:2549
        __FUNCTION__ = "srv_main"
#18 0x0000000000403f31 in main (argc=<value optimized out>,
argv=0x7fffffffe368) at civserver.c:375
        inx = 1
        showhelp = 96
        showvers = false
        option = 0x0
        __FUNCTION__ = "main"



    _______________________________________________________

File Attachments:


-------------------------------------------------------
Date: Thu 09 Dec 2010 01:59:59 PM GMT  Name:
freeciv-T0048-Y-1600-manual.sav.gz  Size: 52kB   By: doctorjlowe

<http://gna.org/bugs/download.php?file_id=11528>

    _______________________________________________________

Reply to this item at:

  <http://gna.org/bugs/?17281>

_______________________________________________
  Message sent via/by Gna!
  http://gna.org/


_______________________________________________
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev

Reply via email to