URL:
<http://gna.org/bugs/?21019>
Summary: Segmentation fault in tile_get_known at tile.c:480
Project: Freeciv
Submitted by: andreasr
Submitted on: Mon 12 Aug 2013 06:25:05 AM GMT
Category: freeciv-web
Severity: 3 - Normal
Priority: 5 - Normal
Status: None
Assigned to: None
Originator Email:
Open/Closed: Open
Release:
Discussion Lock: Any
Operating System: GNU/Linux
Planned Release:
_______________________________________________________
Details:
I get a Segmentation fault in the Freeciv server sometimes, on the Freeciv-web
servers running on http://play.freeciv.org/
The segmentation fault happens while the AI is moving one of their units, in a
part of the code which isn't modified to be Freeciv-web specific in any way. I
therefore think this is a bug which is general to all Freeciv servers of this
revision. As can be seen from the backtrace, the pplayer parameter is null. I
also have a core dump if you need more info. Any help fixing it?
This is on Freeciv trunk revision 23091.
Program terminated with signal 11, Segmentation fault.
#0 dbv_isset (pdbv=pdbv@entry=0xaa4, bit=3217) at bitvector.c:120
bt full
#0 dbv_isset (pdbv=pdbv@entry=0xaa4, bit=3217) at bitvector.c:120
No locals.
#1 0x0819d537 in tile_get_known (ptile=ptile@entry=0x8e21e90,
pplayer=pplayer@entry=0x0) at tile.c:480
No locals.
#2 0x08193157 in can_player_see_unit_at (pplayer=pplayer@entry=0x0,
punit=punit@entry=0x8f9fe48, ptile=ptile@entry=0x8e21e90) at player.c:857
pcity = <optimized out>
#3 0x0806514b in remove_unit_gone_out_of_sight (punit=punit@entry=0x8f9fe48,
old_tile=old_tile@entry=0x8e21e90, dest=<optimized out>)
at unittools.c:2381
pplayer = 0x0
pconn_iter = 0x0
pconn = 0x8287b38 <connections+1720>
#4 0x0806871f in unit_move (punit=punit@entry=0x8f9fe48,
pdesttile=pdesttile@entry=0x8e22d60, move_cost=3) at unittools.c:3475
pplayer = 0x8caa820
psrctile = 0x8e21e90
pcity = <optimized out>
ptransporter = <optimized out>
old_vision = <optimized out>
new_vision = <optimized out>
pcargo_units = 0x8f9ff00
saved_id = 131
unit_lives = true
adj = <optimized out>
facing = DIR8_SOUTHEAST
bowner = <optimized out>
radius_sq = {2, 2}
#5 0x080dcc5e in unit_move_handling (punit=punit@entry=0x8f9fe48,
pdesttile=pdesttile@entry=0x8e22d60, igzoc=igzoc@entry=false,
move_diplomat_city=move_diplomat_city@entry=false) at unithand.c:1762
move_cost = <optimized out>
pplayer = 0x8caa820
pcity = <optimized out>
__FUNCTION__ = "unit_move_handling"
#6 0x0811a954 in dai_unit_attack (ait=0x82f30c0 <ai_types>, punit=0x8f9fe48,
ptile=0x8e22d60) at aitools.c:914
bodyguard = 0x0
sanity = 131
alive = <optimized out>
#7 0x0811aa06 in dai_unit_move_or_attack (ait=0x82f30c0 <ai_types>,
punit=punit@entry=0x8f9fe48, ptile=ptile@entry=0x8e22d60,
path=path@entry=0x9f8a498, step=step@entry=1) at aitools.c:934
No locals.
#8 0x080df810 in cai_unit_move_or_attack (punit=0x8f9fe48, ptile=0x8e22d60,
path=0x9f8a498, step=1) at classicai.c:284
No locals.
#9 0x08070d86 in adv_unit_execute_path (punit=punit@entry=0x8f9fe48,
path=path@entry=0x9f8a498) at advgoto.c:102
_plr_ = <optimized out>
ptile = 0x8e22d60
id = 131
is_ai = true
i = <optimized out>
__FUNCTION__ = "adv_unit_execute_path"
#10 0x0807114c in adv_follow_path (punit=punit@entry=0x8f9fe48,
path=path@entry=0x9f8a498, ptile=ptile@entry=0x8e22d60) at advgoto.c:59
old_tile = 0x0
activity = ACTIVITY_IDLE
alive = <optimized out>
#11 0x08074913 in auto_settler_setup_work (completion_time=1,
best_target=0xbfb575c8, best_act=ACTIVITY_GEN_ROAD, best_tile=0x8e22d60,
path=0x9f8a498, recursion=0, state=0x912de48, punit=0x8f9fe48,
pplayer=0x8caa820) at autosettlers.c:845
alive = <optimized out>
pfm = <optimized out>
parameter = {start_tile = 0x81b6c37 <timer_stop+39>,
moves_left_initially = 3, fuel_left_initially = 1, move_rate = 3,
fuel = 1, owner = 0x8caa820, uclass = 0x8432b88 <unit_classes+136>,
unit_flags = {vec = "\b\004\000\004\020\000\000"},
omniscience = true, get_MC = 0x81c1c80 <normal_move_unit>,
unknown_MC = 6, get_TB = 0x0, get_EC = 0x0,
can_invade_tile = 0x80722b0 <autosettler_enter_territory>,
get_zoc = 0x81a0a10 <is_my_zoc>, is_pos_dangerous = 0x0,
get_moves_left_req = 0x0, get_costs = 0x0, data = 0x0}
displaced = 0x0
#12 auto_settler_setup_work (pplayer=pplayer@entry=0x8caa820,
punit=punit@entry=0x8f9fe48, state=state@entry=0x912de48, recursion=0,
recursion@entry=1, path=0x9f8a498, best_tile=0x8e22d60,
best_act=ACTIVITY_GEN_ROAD, best_target=best_target@entry=0xbfb575c8,
completion_time=completion_time@entry=1) at autosettlers.c:762
No locals.
#13 0x08115e0e in dai_auto_settler_run (ait=0x82f30c0 <ai_types>,
pplayer=pplayer@entry=0x8caa820, punit=punit@entry=0x8f9fe48,
state=state@entry=0x912de48) at aisettler.c:1128
best_impr = 12
best_act = ACTIVITY_GEN_ROAD
best_target = 0x82f59a8 <extras+4360>
best_tile = 0x8e22d60
path = 0x9f8a498
completion_time = 1
__FUNCTION__ = "dai_auto_settler_run"
#14 0x080df708 in cai_auto_settler_run (pplayer=0x8caa820, punit=0x8f9fe48,
state=0x912de48) at classicai.c:338
No locals.
#15 0x08073fd5 in auto_settlers_player (pplayer=0x8caa820)
at autosettlers.c:965
_plr_ = 0x8caa820
punit = 0x8f9fe48
punit_numbers = 0xbfb57644
punit_index = <optimized out>
punit_size = 2
t = 0x8f9f9e8
state = <optimized out>
__FUNCTION__ = "auto_settlers_player"
#16 0x08052583 in end_phase () at srv_main.c:1015
MY_i = 49
pplayer = 0x8caa820
#17 srv_running () at srv_main.c:2340
save_counter = 1
i = <optimized out>
is_new_turn = true
skip_mapimg = false
eot_timer = 0x8f9ce00
punit_size = 2
t = 0x8f9f9e8
state = <optimized out>
__FUNCTION__ = "auto_settlers_player"
#16 0x08052583 in end_phase () at srv_main.c:1015
MY_i = 49
pplayer = 0x8caa820
#17 srv_running () at srv_main.c:2340
save_counter = 1
i = <optimized out>
is_new_turn = true
skip_mapimg = false
eot_timer = 0x8f9ce00
---Type <return> to continue, or q <return> to quit---
need_send_pending_events = false
#18 srv_main () at srv_main.c:2791
__FUNCTION__ = "srv_main"
#19 0x0804c132 in main (argc=17, argv=0xbfb57834) at civserver.c:458
inx = 17
showhelp = <optimized out>
showvers = <optimized out>
option = <optimized out>
__FUNCTION__ = "main"
_______________________________________________________
Reply to this item at:
<http://gna.org/bugs/?21019>
_______________________________________________
Message sent via/by Gna!
http://gna.org/
_______________________________________________
Freeciv-dev mailing list
[email protected]
https://mail.gna.org/listinfo/freeciv-dev