Complete.Org: Mailing Lists: Archives: freeciv-dev: September 2003:
[Freeciv-Dev] (PR#6216) Assertion `punit->transported_by != -1' failed
Home

[Freeciv-Dev] (PR#6216) Assertion `punit->transported_by != -1' failed

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: undisclosed-recipients: ;
Subject: [Freeciv-Dev] (PR#6216) Assertion `punit->transported_by != -1' failed
From: "John Wheeler" <jdwheeler42@xxxxxxxxx>
Date: Sat, 20 Sep 2003 16:16:34 -0700
Reply-to: rt@xxxxxxxxxxxxxx

When I load and start the attached savegame and end the turn, I get the
following error message:

civserver: sanitycheck.c:273: check_units: Assertion
`punit->transported_by != -1' failed.

Doing a little digging, I found the offending unit was Settlers ID#427,
on  a transport at 44, 46, which is southeast of Boise.  The problem
appears to be that after the settlers' home city is disbanded and
support of the unit is transferred to another city, the transported_by
field gets reset -- unloading the settlers onto the adjacent island
prevents the error, and none of those units are disbanded.

I suspect this occurs because the transfer is actually done by creating
a new unit with create_unit_full, which does not appear to take
transport into account.

I'll try seeing if I can reproduce this with a minimal savegame (with
the default ruleset).


On a related note, is there a philosophical reason why there are so many
'assert's used, instead of using freelog(LOG_FATAL, ... ); or is it just
a matter of not enough programmer time?

-- 

++JohnWheeler

Attachment: BadTransport.gz
Description: BadTransport.gz


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