[Freeciv-Dev] Re: civserver segfault with new research system (PR#1221)
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
On Fri, Jan 11, 2002 at 03:00:54PM -0800, jdorje@xxxxxxxxxxxxxxxxxxxxx wrote:
>
> > civserver: tech.c:349: base_total_bulbs_required: Assertion
> `!is_barbarian(pplayer)' failed.
> Aborted (core dumped)
>
>
> (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=0x80d2ea3
> "!is_barbarian(pplayer)", file=0x80d2e6a "tech.c", line=349,
> function=0x80d2e89 "base_total_bulbs_required")
> at assert.c:74
> #4 0x080a2159 in base_total_bulbs_required (pplayer=0x8132528, tech=1)
> at tech.c:349
> #5 0x080a1d30 in build_required_techs (pplayer=0x8132528, goal=1) at
> tech.c:129
> #6 0x080a1e5e in update_research (pplayer=0x8132528) at tech.c:179
> #7 0x08073430 in init_tech (plr=0x8132528, tech=3) at plrhand.c:519
> #8 0x0805d1f9 in create_barbarian_player (land=0) at barbarian.c:135
> #9 0x0805da9e in try_summon_barbarians () at barbarian.c:375
> #10 0x0805dc85 in summon_barbarians () at barbarian.c:425
> #11 0x0804e9bf in main_loop () at srv_main.c:1717
> #12 0x0804efd4 in srv_main () at srv_main.c:1971
> #13 0x08049c19 in main (argc=1, argv=0xbffffa04) at civserver.c:147
> #14 0x40070306 in __libc_start_main (main=0x8049700 <main>, argc=1,
> ubp_av=0xbffffa04, init=0x80490dc <_init>, fini=0x80b6380 <_fini>,
> rtld_fini=0x4000d2dc <_dl_fini>, stack_end=0xbffff9fc) at
> ../sysdeps/generic/libc-start.c:129
I'm not sure about the correct way to solve this. "How much" tech do
barbarians need?
A robust solution IMHO is:
+ if(!is_barbarian(pplayer)) {
if (game.rgame.tech_leakage == 0) {
...
exit(1);
}
+ }
Raimar
--
email: rf13@xxxxxxxxxxxxxxxxx
checking for the vaidity of the Maxwell laws on this machine... ok
checking if e=mc^2... ok
checking if we can safely swap on /dev/fd0... yes
-- kvirc 2.0.0's configure
|
|