Complete.Org: Mailing Lists: Archives: freeciv-dev: June 2006:
[Freeciv-Dev] Re: (PR#18113) caravan with no homecity crashes server
Home

[Freeciv-Dev] Re: (PR#18113) caravan with no homecity crashes server

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Subject: [Freeciv-Dev] Re: (PR#18113) caravan with no homecity crashes server
From: "Egor Vyscrebentsov" <evyscr@xxxxxxxxx>
Date: Mon, 26 Jun 2006 15:58:57 -0700
Reply-to: bugs@xxxxxxxxxxx

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

On Mon, 26 Jun 2006 15:34:11 -0700
Mike Kaufman wrote:
> On Mon, Jun 26, 2006 at 03:23:30PM -0700, Egor Vyscrebentsov wrote:
> > If one load a .sav file which contain caravan with no homecity,
> > server will crash next turn. Problem is that aicore caravan code
> > assume that caravan always has homecity, and server does not check
> > for this when load a game.
<skip/>
> > There are several ways to fix this behavior, so I want to listen
> > which is better [before try to make a patch]:
> > 1. Disallow caravans with no homecity, reject a game if it has them.
> > 2. Allow caravan with no homecity to change it once. Until changing
> > caravan could not provide caravan bonuses/help building wonders.
> > 3. Something else? (Removing caravans totally is not a way for me.)
>
> choose option 1. Change the game loading code to find the nearest
> owned city and change the homecity to that and spit out a
> LOG_VERBOSE/LOG_ERROR message that the loading code is doing such a
> thing.

We don't know which units to check until loading rulesets [starting a
game?]. Now I can suggest to check units with HelpWonder and/or
TradeRoute flags. Or it is better to have a special flag,
say NeedHomecity?

What should be done if player has no one city? Removing unit from a
game?

Do we need an assert in problematic functions in aicore caravan code?

-- 
Thanks, evyscr





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