Complete.Org: Mailing Lists: Archives: freeciv-dev: July 2001:
[Freeciv-Dev] Re: Crash in 7-27-2001 CVS GTK+ client (PR#869)
Home

[Freeciv-Dev] Re: Crash in 7-27-2001 CVS GTK+ client (PR#869)

[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: Crash in 7-27-2001 CVS GTK+ client (PR#869)
From: Kevin Brown <kevin@xxxxxxxxxxxxxx>
Date: Sun, 29 Jul 2001 05:54:33 -0700 (PDT)

Gaute B Strokkenes <gs234@xxxxxxxxx> wrote:
> I don't get it.  This function calls normalize_map_pos(), which does
> (or is supposed to do, at least) precisely the same thing.

Ah...I figured out the problem.

The problem is that the call is within an assert().  On my system (and
probably most GNU/Linux systems), if NDEBUG is defined, then assert()
becomes a no-op (see /usr/include/assert.h).

NDEBUG is set by the configure script unless --enable-debug is passed
to it.  So on any non-debugging build (like the rpm install I do),
assert()s will translate to no-ops and, in this specific case,
normalize_map_pos() will never be called.

Someone should probably go through all the assert()s in the code for
both the client and server and make sure that the code that appears in
the assert()s isn't required for proper functioning of the program.
My bet is that some of the strange bug reports will magically be fixed
by this.  :-)



                                Kevin

-- 
Kevin Brown                                           kevin@xxxxxxxxxxxxxx

    It's really hard to define what "unexpected behavior" means when you're
                       talking about Windows.



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