Complete.Org: Mailing Lists: Archives: freeciv-dev: January 2002:
[Freeciv-Dev] Re: civserver segfault: generalized improvements
Home

[Freeciv-Dev] Re: civserver segfault: generalized improvements

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: jdorje@xxxxxxxxxxxx
Cc: freeciv-dev <freeciv-dev@xxxxxxxxxxx>
Subject: [Freeciv-Dev] Re: civserver segfault: generalized improvements
From: Vasco Alexandre Da Silva Costa <vasc@xxxxxxxxxxxxxx>
Date: Sun, 13 Jan 2002 05:40:04 +0000 (WET)

On Sat, 12 Jan 2002, Jason Short wrote:

> I still get the following segfault in the server:
> 
>  > civserver: improvement.c:312: fill_ranges_improv_lists: Assertion 
> `pplayer->island_improv' failed.
> 
> 
> (gdb) bt
> #0  0x400828d1 in __kill () from /lib/libc.so.6
> #1  0x4008264d in raise (sig=6) at ../sysdeps/posix/raise.c:27
> #2  0x40083cb8 in abort () at ../sysdeps/generic/abort.c:88
> #3  0x4007bd71 in __assert_fail (assertion=0x80d1639 
> "pplayer->island_improv", file=0x80d162b "improvement.c", line=312,
>      function=0x80d1612 "fill_ranges_improv_lists") at assert.c:74
> #4  0x08093649 in fill_ranges_improv_lists (implist=0xbffff6d0, 
> pcity=0x82a9d98, pplayer=0x812c1e8) at improvement.c:312
> #5  0x08093936 in mark_improvement (pcity=0x82a9d98, id=21, status=1) at 
> improvement.c:477
> #6  0x0808eeb8 in city_add_improvement (pcity=0x82a9d98, impr=21) at 
> city.c:2169
> #7  0x0805fa8e in create_city (pplayer=0x812c1e8, x=16, y=17, 
> name=0xbffff820 "Portus Namnetum") at citytools.c:943
> #8  0x08054161 in city_build (pplayer=0x812c1e8, punit=0x81ce610, 
> name=0xbffff820 "Portus Namnetum") at unithand.c:556
> #9  0x080541b0 in handle_unit_build_city (pplayer=0x812c1e8, 
> req=0xbffff810) at unithand.c:576
> #10 0x08087522 in ai_do_build_city (pplayer=0x812c1e8, punit=0x81ce610) 
> at settlers.c:63
> #11 0x0808a46f in auto_settler_findwork (pplayer=0x812c1e8, 
> punit=0x81ce610) at settlers.c:1358
> #12 0x0808a706 in auto_settlers_player (pplayer=0x812c1e8) at 
> settlers.c:1417
> #13 0x0808ab86 in auto_settlers () at settlers.c:1528
> #14 0x0804e968 in main_loop () at srv_main.c:1720
> #15 0x0804ef78 in srv_main () at srv_main.c:1971
> #16 0x08049bd9 in main (argc=5, argv=0xbffff9e4) at civserver.c:147
> #17 0x40070306 in __libc_start_main (main=0x80496c0 <main>, argc=5, 
> ubp_av=0xbffff9e4, init=0x80490b8 <_init>, fini=0x80b6240 <_fini>,
>      rtld_fini=0x4000d2dc <_dl_fini>, stack_end=0xbffff9dc) at 
> ../sysdeps/generic/libc-start.c:129

You triggered an assert, so i assume the memory corruption is gone (yay!).

The if line above used to be "if (cont >= 0 && pplayer->island_improv)".
You may try changing it into that and remove the assert for the meanwhile.
I will look into this tomorrow, i think i will sleep now...

Just to make sure, could you please check if pplayer->island_improv is
indeed NULL in #4?

Thanks.

---
Vasco Alexandre da Silva Costa @ Instituto Superior Tecnico, Lisboa



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