Complete.Org: Mailing Lists: Archives: freeciv-dev: August 2005:
[Freeciv-Dev] (PR#13624) AI caught with pants down by overzealous assert
Home

[Freeciv-Dev] (PR#13624) AI caught with pants down by overzealous assert

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Subject: [Freeciv-Dev] (PR#13624) AI caught with pants down by overzealous assert
From: "Per I. Mathisen" <per@xxxxxxxxxxx>
Date: Sat, 6 Aug 2005 15:59:40 -0700
Reply-to: bugs@xxxxxxxxxxx

<URL: http://bugs.freeciv.org/Ticket/Display.html?id=13624 >

Program received signal SIGABRT, Aborted.
[Switching to Thread -1208141056 (LWP 25302)]
0x004e5402 in __kernel_vsyscall ()
(gdb) bt
#0  0x004e5402 in __kernel_vsyscall ()
#1  0x003d71f8 in raise () from /lib/libc.so.6
#2  0x003d8948 in abort () from /lib/libc.so.6
#3  0x003d038e in __assert_fail () from /lib/libc.so.6
#4  0x0807f3c9 in handle_player_change_government (pplayer=0x8277d48,
government=2)
    at plrhand.c:298
#5  0x0810a906 in ai_government_change (pplayer=0x8277d48, gov=2) at
aitools.c:1071
#6  0x081044cc in ai_do_last_activities (pplayer=0x8277d48) at
aihand.c:389
#7  0x08051581 in main_loop () at srv_main.c:628
#8  0x08051f61 in srv_main () at srv_main.c:1896
#9  0x0804aa01 in main (argc=3, argv=0xbfbe9a24) at civserver.c:242

(gdb) p pplayer->revolution_finishes
$2 = 145

(gdb) p game.info.turn
$3 = 145

The thing is, this is an easy AI, and it expects that it can change
government at any time, instantly, but I removed that possibility. It
optimistically keeps trying anyway, but since someone added an assert
against trying a revolution in the middle of a revolution, it crashes.

Patch later...

  - Per





[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] (PR#13624) AI caught with pants down by overzealous assert, Per I. Mathisen <=