Complete.Org: Mailing Lists: Archives: freeciv-dev: January 2006:
[Freeciv-Dev] assert(0) doesn't tell me enough
Home

[Freeciv-Dev] assert(0) doesn't tell me enough

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] assert(0) doesn't tell me enough
From: banjo <banjo@xxxxxxxxxx>
Date: Wed, 25 Jan 2006 02:02:39 +1300

Hey

With some of my rndCiv rulesets, the server dies with this message...

civserver: requirements.c:298: req_source_get_values: Assertion `0' failed.
Aborted

ok, i can read the code there.  But i need to know what caused the
failure. This would also be useful information for other ruleset writers.

The trouble is don't know c  well enough to add the necessary diagnostics.

Each of the 'assert(0);' lines needs to be able to report on what caused the failure. Or at least where the failure came from, where to start looking.

Note: the rulesets that cause this failure use the effects requirements in complex ways. In rndCiv you can generate a ruleset that'll cause this
failure with the command...

 ./rndCiv.pl 6 dwarf


So there's an error in the dwarf rulesets, but where?

Is this a valid building reqs?

reqs =
    { "type", "name", "range"
      "Tech", "Currency", "Player"
      "Building", "The Dwarves", "Player"
      "Building", "Mountain Hall", "City"
      "Terrain", "Mountains", "Adjacent"
      "Special", "Mine", "Adjacent"
    }

nearly there
-billy



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