Complete.Org: Mailing Lists: Archives: freeciv-dev: March 2002:
[Freeciv-Dev] AI floating point exceptions
Home

[Freeciv-Dev] AI floating point exceptions

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: <freeciv-dev@xxxxxxxxxxx>
Subject: [Freeciv-Dev] AI floating point exceptions
From: "Per I. Mathisen" <Per.Inge.Mathisen@xxxxxxxxxxx>
Date: Tue, 12 Mar 2002 00:07:30 +0100 (MET)

I keep getting some of these floating point exceptions in autogames:

Program received signal SIGFPE, Arithmetic exception.
0x080dc9d7 in assess_danger (pcity=0x8304850) at advmilitary.c:344
344               else ai_wants_role_unit(pplayer, pcity, F_PIKEMEN,
(gdb) bt
#0  0x080dc9d7 in assess_danger (pcity=0x8304850) at advmilitary.c:344
#1  0x080df6a6 in military_advisor_choose_build (pplayer=0x816e470,
    pcity=0x8304850, choice=0x8304efc) at advmilitary.c:954
#2  0x080e1a7a in ai_manage_cities (pplayer=0x816e470) at aicity.c:546
#3  0x080e4952 in ai_do_last_activities (pplayer=0x816e470) at
aihand.c:505
#4  0x08087dc2 in update_player_activities (pplayer=0x816e470) at
plrhand.c:164
#5  0x0804e82e in end_turn () at srv_main.c:469
#6  0x08051775 in main_loop () at srv_main.c:1786
#7  0x080520af in srv_main () at srv_main.c:2044
#8  0x0804a34c in main (argc=3, argv=0xbffffab4) at civserver.c:153
#9  0x400a06cf in __libc_start_main () from /lib/libc.so.6

Program received signal SIGFPE, Arithmetic exception.
0x080dcc91 in assess_danger (pcity=0x82fe7f0) at advmilitary.c:353
353             if (!igwall) danger2 += v * m / dist;
(gdb) bt
#0  0x080dcc91 in assess_danger (pcity=0x82fe7f0) at advmilitary.c:353
#1  0x080df8f6 in military_advisor_choose_build (pplayer=0x816e710,
pcity=0x82fe7f0,
    choice=0x82fee9c) at advmilitary.c:954
#2  0x080e1cca in ai_manage_cities (pplayer=0x816e710) at aicity.c:546
#3  0x080e4ba2 in ai_do_last_activities (pplayer=0x816e710) at
aihand.c:505
#4  0x08087dc2 in update_player_activities (pplayer=0x816e710) at
plrhand.c:164
#5  0x0804e82e in end_turn () at srv_main.c:469
#6  0x08051775 in main_loop () at srv_main.c:1786
#7  0x080520af in srv_main () at srv_main.c:2044
#8  0x0804a34c in main (argc=1, argv=0xbffffac4) at civserver.c:153
#9  0x400a06cf in __libc_start_main () from /lib/libc.so.6

But I am unable to reproduce them in any consistent way, hence no
savefile.

They were produced in autogames where I test a new version of the teams
patch, which does not touch any AI-related code. The AIs were allied, so
they would, naturally, be very confused. But still, the code shouldn't
break like this.

Any takers?

Yours,
Per

"My mother never saw the irony in calling me a son-of-a-bitch."
 -- Jack Nicholson



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