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,