Complete.Org: Mailing Lists: Archives: freeciv-dev: October 2004:
[Freeciv-Dev] Re: (PR#10415) segfault in map_distance_vector() called f
Home

[Freeciv-Dev] Re: (PR#10415) segfault in map_distance_vector() called f

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: marko.lindqvist@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: (PR#10415) segfault in map_distance_vector() called from ... ai_hunter_manage()
From: "Mike Kaufman" <kaufman@xxxxxxxxxxxxxxxxxxxxxx>
Date: Wed, 6 Oct 2004 05:48:54 -0700
Reply-to: rt@xxxxxxxxxxx

<URL: http://rt.freeciv.org/Ticket/Display.html?id=10415 >

On Wed, Oct 06, 2004 at 03:01:16AM -0700, Marko Lindqvist wrote:
> 
>   I finally managed to reproduce this with "-g -O0". Seems like name of 
> autogame rc -file (path part?) affects reproducibility too...


> #3  0x004e8f00 in ai_hunter_manage (pplayer=0x5c72b0, punit=0x116bf7c8)
>      at ../../freeciv-src/ai/aihunt.c:468
>          target = (struct unit *) 0x1165eb58
>          sanity_own = 4996
>          sanity_target = 4993
> #4  0x004e3518 in ai_manage_military (pplayer=0x5c72b0, punit=0x116bf7c8)
>      at ../../freeciv-src/ai/aiunit.c:2063
>          id = 4996

It appears target is NULL but we use it anyway. Could you verify this? But
there is a check above that should bail us out. So target may be good, but
target->tile certainly looks bad.

Do

p target
p target->tile
p punit->ai.target  # and try to find this guy in a savegame

-mike




[Prev in Thread] Current Thread [Next in Thread]