Complete.Org: Mailing Lists: Archives: freeciv-dev: November 2001:
[Freeciv-Dev] Re: Reproducable core dump (PR#1051)
Home

[Freeciv-Dev] Re: Reproducable core dump (PR#1051)

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv-dev@xxxxxxxxxxx
Cc: bugs@xxxxxxxxxxxxxxxxxxx
Subject: [Freeciv-Dev] Re: Reproducable core dump (PR#1051)
From: jdorje@xxxxxxxxxxxxxxxxxxxxx
Date: Sun, 11 Nov 2001 20:04:24 -0800 (PST)

Raimar Falke wrote:
> 
> On Fri, Nov 02, 2001 at 12:20:02PM -0800, jdorje@xxxxxxxxxxxxxxxxxxxxx wrote:
> > "Pieter J. Kersten" wrote:
> > >
> > > L.S.,
> > >
> > > I've found a reproducable core dump in the latest CVS version. Attached is
> > > a savegame file. Login with 'pieter'. The crash happens when you try to
> > > send the stealth bomber in Lisboa to Alcochete with a Goto. It exits with
> > > an assert error:  map_is_real or something similar.
> >
> > The air goto code does not check the realness of the position or
> > normalize it; it counts on map_get_tile to do this.  map_get_tile no
> > longer does this.
> >
> > Attached is a possible fix.
> 
> I made another patch based on your patch. Mostly cosmetics.

Looks fine to me.  I'd recommend getting a third opinion.

> I also enabled the freelogs and got 8848 calls of air_can_move_between
> for two calls of find_air_first_destination. This is no suprise
> because:
> 
>   while (!reached_goal && (no_new_nodes<fullfuel)) {
>     ...
>     for (i=start_turn; i<turns; i++) {
>       ...
>       for (j=turn_index[i]; j<turn_index[i+1]; j++) {
>         ...
>         for (k=0; k<refuellist_size; k++) {
>           ...
>           moves_left = air_can_move_between(max_moves,
>               pfrom->x, pfrom->y, pto->x, pto->y, pplayer);
> 
> Very ugly. Doing a plain Dijkstra here will probably faster.

Ouch.

jason



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