Complete.Org: Mailing Lists: Archives: freeciv-dev: November 2001:
[Freeciv-Dev] Re: buglet in normalization in init_new_game() (PR#1063)
Home

[Freeciv-Dev] Re: buglet in normalization in init_new_game() (PR#1063)

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: "freeciv-dev@xxxxxxxxxxx" <freeciv-dev@xxxxxxxxxxx>
Subject: [Freeciv-Dev] Re: buglet in normalization in init_new_game() (PR#1063)
From: vze2zq63@xxxxxxxxxxx
Date: Mon, 19 Nov 2001 14:51:06 -0500
Reply-to: jdorje@xxxxxxxxxxxx

Christian Knoke wrote:
> 
> Am Montag, 19. November 2001 14:58 schrieb Raimar Falke:
> > On Fri, Nov 16, 2001 at 10:39:38PM +0100, Christian Knoke wrote:
> > > Am Montag, 12. November 2001 22:09 schrieb
> > >
> > > jdorje@xxxxxxxxxxxxxxxxxxxxx:
> > > > This causes the assertion in CHECK_MAP_POS to fail on many
> > > > games.
> > >
> > > Same thing, other code line?
> > >
> > > civserver: map.c:1166: map_get_continent: Zusicherung
> > > »is_normal_map_pos(((x)),(( y)))« nicht erfüllt.
> > > Abgebrochen
> >
> > Please provide the full backtrace or a savegame.
> 
> Sorry, not reproducible, no core file :-(
> I've got it several times, it vanished after
> configure --enable-debug=no ; make clean ; make

Obviously with debugging disabled the assertion won't be done.  In some
cases, this will work out okay because the coordinates will be
normalized before they are used.  In the case of this one, though,
that's not true - the wrong tile is being checked, so the wrong
continent value may be returned.

So disabling debug mode is not sufficient to get normal gameplay.  To do
that, you'd want change CHECK_MAP_POS to

#define CHECK_MAP_POS(x, y) (assert(is_real_tile((x),(y))), \
                             normalize_map_pos(&(x), &(y)))

except that I think that won't compile in a few places (since l-values
aren't being passed to CHECK_MAP_POS).

jason


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