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: undisclosed-recipients: ;
Subject: [Freeciv-Dev] Re: (PR#10415) segfault in map_distance_vector() called from ... ai_hunter_manage()
From: "Marko Lindqvist" <marko.lindqvist@xxxxxxxxxxx>
Date: Wed, 6 Oct 2004 03:01:16 -0700
Reply-to: rt@xxxxxxxxxxx

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

Mike Kaufman wrote:
> <URL: http://rt.freeciv.org/Ticket/Display.html?id=10415 >
> 
> On Sun, Oct 03, 2004 at 11:22:20PM -0700, Jason Short wrote:
> 
>>>From the backtrace I don't see how this could happen without memory
>>corruption.  In the call to real_map_distance tile0 and tile1 are equal,
>>however in the call to map_distance_vector tile1 is changed to "2".
> 
>  
> what does the backtrace look like with CFLAGS="-g -O0" ?
> 

  I finally managed to reproduce this with "-g -O0". Seems like name of 
autogame rc -file (path part?) affects reproducibility too...


  Program received signal SIGSEGV, Segmentation fault.
0x00474a80 in map_distance_vector (dx=0x22e704, dy=0x22e700, 
tile0=0x10272b90, tile1=0x2)
     at ../../freeciv-src/common/map.c:1541
1541      base_map_distance_vector(dx, dy,
(gdb) bt full
#0  0x00474a80 in map_distance_vector (dx=0x22e704, dy=0x22e700, 
tile0=0x10272b90, tile1=0x2)
     at ../../freeciv-src/common/map.c:1541
No locals.
#1  0x00472c79 in real_map_distance (tile0=0x10272b90, tile1=0x2)
     at ../../freeciv-src/common/map.c:649
         dx = 0
         dy = 292288456
#2  0x0047424c in is_tiles_adjacent (tile0=0x10272b90, tile1=0x2)
     at ../../freeciv-src/common/map.c:1277
No locals.
#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
#5  0x004e3a78 in ai_manage_unit (pplayer=0x5c72b0, punit=0x116bf7c8)
     at ../../freeciv-src/ai/aiunit.c:2182
         bodyguard = (struct unit *) 0x0
#6  0x004e3bc5 in ai_manage_units (pplayer=0x5c72b0) at 
../../freeciv-src/ai/aiunit.c:2203
         punit = (struct unit *) 0x116bf7c8
         _ids = (int (*)[0]) 0x22e7a8
         _i = 12
         _size = 449
         _size = 292288456
#7  0x004cff8b in ai_do_first_activities (pplayer=0x5c72b0) at 
../../freeciv-src/ai/aihand.c:368
No locals.
#8  0x00405f44 in ai_start_turn () at 
../../freeciv-src/server/srv_main.c:469
         pplayer = (struct player *) 0x5c72b0
         i = 8
#9  0x004061ca in begin_phase (is_new_phase=true) at 
../../freeciv-src/server/srv_main.c:542
         is_new_phase = true
         pplayer = (struct player *) 0x5e66b0
         PI_p_itr = 13
         pplayer = (struct player *) 0x5e66b0
         PI_p_itr = 13
         pplayer = (struct player *) 0x5e66b0
         i = 13
         pplayer = (struct player *) 0x5e66b0
         PI_p_itr = 13
#10 0x00407f82 in main_loop () at ../../freeciv-src/server/srv_main.c:1509
         eot_timer = (struct timer *) 0x10513840
         save_counter = 445
         is_new_turn = true
#11 0x004088b5 in srv_loop () at ../../freeciv-src/server/srv_main.c:1877
         i = 82
         start_nations = false
#12 0x004081fa in srv_main () at ../../freeciv-src/server/srv_main.c:1628
No locals.
#13 0x004018c2 in main (argc=3, argv=0x10101bd8) at 
../../freeciv-src/server/civserver.c:170
         inx = 3
         showhelp = false
         showvers = false
         option = 0x22f062 "../autogames/huntersegf.rc"



  - Caz




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