Complete.Org: Mailing Lists: Archives: freeciv-dev: February 2000:
[Freeciv-Dev] Re: Coredump with latest CVS
Home

[Freeciv-Dev] Re: Coredump with latest CVS

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: Coredump with latest CVS
From: Jeff Mallatt <jjm@xxxxxxxxxxxx>
Date: Thu, 03 Feb 2000 16:32:25 -0500

I couldn't reproduce the following, but I ran my own all-AI game, and a
core dump did happen.  It was somewhere below ai_manage_units().

So, I was poking around, and while looking at ai_manage_unit(), I noticed
that after each sub-call (e.g., ai_manage_diplomat(), ai_manage_settler(),
&c.) the code falls through to another branch of the if/else if/else
if/else, which tests punit->type for something -- *but* punit may
potentially be invalid upon return from any of the sub-calls, right?  So, I
think we need to add 'return;'s after each ai_manage_xxx() call.

Does this make sense to those who know the AI better than I?

At 2000/02/03 08:07 , Robert Brady wrote:
>I got the following :
>
>(gdb) where
>#0  genlist_size (pgenlist=0x830fc64) at genlist.c:39
>#1  0x808caeb in unit_list_size (this=0x830fc64) at speclist_c.h:49
>#2  0x805068c in city_incite_cost (pcity=0x8230823) at cityturn.c:1428
>#3  0x8050b0f in update_city_activity (pplayer=0x821add0, pcity=0x823ef58)
>    at cityturn.c:1536
>#4  0x804edc9 in update_city_activities (pplayer=0x821add0) at
>cityturn.c:729
>#5  0x8061a42 in update_player_activities (pplayer=0x821add0) at
>plrhand.c:1341
>#6  0x8052421 in end_turn () at civserver.c:765
>#7  0x8051bfc in main (argc=1, argv=0xbffff7d4) at civserver.c:478
>#8  0x4002bcb3 in __libc_start_main (main=0x8050dc0 <main>, argc=1, 
>    argv=0xbffff7d4, init=0x8048d30 <_init>, fini=0x809e83c <_fini>, 
>    rtld_fini=0x4000a350 <_dl_fini>, stack_end=0xbffff7cc)
>    at ../sysdeps/generic/libc-start.c:78
>(gdb) print *pgenlist
>Cannot access memory at address 0x830fc64.
>
>Sitatuation:
>  started a game with default parameters and 14 AIs and watched.
>  Eventually it dumped core. (Can give a recentish save file if needed).
>
>-- 
>Robert
> 
jjm


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