Complete.Org:
Mailing Lists:
Archives:
freeciv-dev:
March 2002: [Freeciv-Dev] Re: civclient: cma_core.c:1198: add_combination: Zusicher |
[Freeciv-Dev] Re: civclient: cma_core.c:1198: add_combination: Zusicher[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Raimar Falke wrote: On Fri, Mar 01, 2002 at 01:37:05PM -0800, martin@xxxxxxxxxx wrote:Full_Name: Martin Schröder Version: 1.12.1-devel (freeciv-cvs-Feb-28.tar.bz2) Distribution: Built from source Client: Gtk+ OS: Linux 2.2.10 Submission from: (NULL) (134.102.7.161) civclient stops with civclient: cma_core.c:1198: add_combination: Zusicherung »invalid_slot_for_insert != ((void *)0)« nicht erfüllt. Problem is reproducible; savegame available on request.Patch which fixes the problem attached. I know very little about the CMA (in fact, I can't figure out what add_combination does even after reading the comment on it), but it sure seems like this doesn't "fix" the problem at all. It just changes things from an assert (or random segfault under NDEBUG) to a freelog+exit. A proper fix would either dynamically expand MAX_COMBINATIONS (obviously it could not then be a #define, but should be a static value of some sort), or return without adding the combination at all (possibly with an error return value). The latter is easier, assuming the calling code can deal with it with minimal fuss. The former is better almost all of the time - it can only really fail if the number of combinations ever grows without bound. jason
|