[Freeciv-tickets] [freeciv] #46176: Segfault from dai_hunter_manage

Zurück zum Archiv-Index
OSDN Ticket System norep****@osdn*****
Sun Dec 4 05:14:44 JST 2022


#46176: Segfault from dai_hunter_manage

  Open Date: 2022-12-03 21:15
Last Update: 2022-12-03 22:14

URL for this Ticket:
    https://osdn.net//projects/freeciv/ticket/46176
RSS feed for this Ticket:
    https://osdn.net/ticket/ticket_rss.php?group_id=12505&tid=46176

---------------------------------------------------------------------

Last Changes/Comment on this Ticket:
2022-12-03 22:14 Updated by: cazfi

Comment:

Reply To cazfi
S3_0 version applies to S2_6 too.
Well, applied, but didn't compile. Separate S2_6 version attached.

---------------------------------------------------------------------
Ticket Status:

      Reporter: lexxie9952
         Owner: cazfi
          Type: Bugs
        Status: Open [Owner assigned]
      Priority: 5 - Medium
     MileStone: 3.0.5
     Component: AI
      Severity: 5 - Medium
    Resolution: Accepted
---------------------------------------------------------------------

Ticket details:

Segfault in FCW server appears to have possibility for same issue in upstream server.
blamed: dai_hunter_manage() called unit_win_chance() with a null pdefender
stack trace:
Program terminated with signal SIGSEGV, Segmentation fault.
#0  get_defense_power (punit=0x0) at ../../freeciv/common/combat.c:550
550       struct tile *ptile = unit_tile(punit);
[Current thread is 1 (Thread 0x7f67c4151800 (LWP 26778))]
#0  get_defense_power (punit=0x0) at ../../freeciv/common/combat.c:550
#1  get_total_defense_power (defender=0x0, attacker=0x55fc042954f0)
    at ../../freeciv/common/combat.c:710
#2  unit_win_chance (attacker=attacker at entry=0x55fc042954f0, defender=0x0)
    at ../../freeciv/common/combat.c:409
#3  0x000055fc0158dba5 in dai_hunter_manage (ait=ait at entry=0x55fc01ba4640 <ai_types>,
    pplayer=pplayer at entry=0x55fc05c60dd0, punit=punit at entry=0x55fc042954f0)
    at ../../../freeciv/ai/default/aihunt.c:523
#4  0x000055fc0158e5eb in eval_hunter_want (veteran=<optimized out>,
    best_type=0x55fc02345730 <unit_types+115920>, choice=0x55fc043d6f30,
    pcity=0x55fc05e5edf0, pplayer=0x55fc05c60dd0, ait=0x55fc01ba4640 <ai_types>)
    at ../../../freeciv/ai/default/aihunt.c:243
#5  dai_hunter_choice (ait=ait at entry=0x55fc01ba4640 <ai_types>,
    pplayer=pplayer at entry=0x55fc05c60dd0, pcity=pcity at entry=0x55fc05e5edf0,
    choice=choice at entry=0x55fc043d6f30, allow_gold_upkeep=allow_gold_upkeep at entry=true)
    at ../../../freeciv/ai/default/aihunt.c:280
#6  0x000055fc015858ff in military_advisor_choose_build (
    ait=ait at entry=0x55fc01ba4640 <ai_types>, pplayer=pplayer at entry=0x55fc05c60dd0,
    pcity=pcity at entry=0x55fc05e5edf0, mamap=<optimized out>, ul_cb=ul_cb at entry=0x0)
    at ../../../freeciv/ai/default/daimilitary.c:1677
#7  0x000055fc015764f9 in dai_manage_cities (ait=ait at entry=0x55fc01ba4640 <ai_types>,
    pplayer=pplayer at entry=0x55fc05c60dd0) at ../../../freeciv/ai/default/daicity.c:884
#8  0x000055fc01561d3f in dai_do_last_activities (ait=0x55fc01ba4640 <ai_types>,
    pplayer=<optimized out>) at ../../../freeciv/ai/default/aihand.c:772
#9  0x000055fc01424800 in end_phase () at ../../freeciv/server/srv_main.c:1531
#10 srv_running () at ../../freeciv/server/srv_main.c:3046


-- 
Ticket information of Freeciv project
Freeciv Project is hosted on OSDN

Project URL: https://osdn.net/projects/freeciv/
OSDN: https://osdn.net

URL for this Ticket:
    https://osdn.net/projects/freeciv/ticket/46176
RSS feed for this Ticket:
    https://osdn.net/ticket/ticket_rss.php?group_id=12505&tid=46176



More information about the Freeciv-tickets mailing list
Zurück zum Archiv-Index