[Freeciv-Dev] Re: (PR#7009) Segfault in first turn
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
<URL: http://rt.freeciv.org/Ticket/Display.html?id=7009 >
On Mon, Dec 01, 2003 at 12:32:32AM -0800, Raimar Falke wrote:
>
> <URL: http://rt.freeciv.org/Ticket/Display.html?id=7009 >
>
> On Sun, Nov 30, 2003 at 11:30:20PM -0800, Guest wrote:
> >
> > <URL: http://rt.freeciv.org/Ticket/Display.html?id=7009 >
> >
> > Using CVS (HEAD) updated a few minutes ago, although this issue has been
> > present for a few days:
> > On ending the first turn, in civserver:
> > Program received signal SIGSEGV, Segmentation fault.
> > 0x080b2a5d in build_landarea_map_turn_0 (pcmap=0x817d904) at score.c:214
> > 214 pcmap->player_landarea[owner]++;
> > (gdb) bt full
> > #0 0x080b2a5d in build_landarea_map_turn_0 (pcmap=0x817d904) at score.c:214
> > i = 3
> > x = 3
> > y = 0
> > WMI_index = 3
> > turn = 0
>
> > owner = 1075843300
>
> That is the problem. The ptile->city field is probably garbage.
>
> I can't reproduce this. Valgrind doesn't find any invalid memory
> reads.
>
> How can this problem be reproduces?
>
> Raimar
>
I'm just compiling on a fairly standard debian x86 box here, gcc 3.3,
CFLAGS="-g", no fancy optimisations. cvs diff showed no local changes to the
source, and yet I can reproduce this every time I try & start a game, and also
with a savegame which I saved during the first turn. I generally play with the
mapsize at the limits (x=200, y=100), however this also occurs with the default
settings here :)
Running with valgrind, and hitting end turn:
> ==14359==
==14359== Conditional jump or move depends on uninitialised value(s)
==14359== at 0x80B2988: build_landarea_map_turn_0 (score.c:193)
==14359== by 0x80B3033: build_landarea_map (score.c:312)
==14359== by 0x80B349A: civ_score (score.c:433)
==14359== by 0x809A7E7: make_history_report (report.c:1050)
==14359==
==14359== Conditional jump or move depends on uninitialised value(s)
==14359== at 0x80B29A1: build_landarea_map_turn_0 (score.c:197)
==14359== by 0x80B3033: build_landarea_map (score.c:312)
==14359== by 0x80B349A: civ_score (score.c:433)
==14359== by 0x809A7E7: make_history_report (report.c:1050)
==14359==
==14359== Use of uninitialised value of size 4
==14359== at 0x80B29A9: build_landarea_map_turn_0 (score.c:198)
==14359== by 0x80B3033: build_landarea_map (score.c:312)
==14359== by 0x80B349A: civ_score (score.c:433)
==14359== by 0x809A7E7: make_history_report (report.c:1050)
==14359==
==14359== Invalid read of size 4
==14359== at 0x80B29A9: build_landarea_map_turn_0 (score.c:198)
==14359== by 0x80B3033: build_landarea_map (score.c:312)
==14359== by 0x80B349A: civ_score (score.c:433)
==14359== by 0x809A7E7: make_history_report (report.c:1050)
==14359== Address 0x20656D65 is not stack'd, malloc'd or free'd
Segmentation fault
--
Andrew Mitchell
Email: ajmitch@xxxxxxx
JID: ajmitch@xxxxxxxxxx
|
|