[Freeciv-Dev] Re: (PR#6216) Assertion `punit->transported_by != -1' fail
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
On Sat, 20 Sep 2003, John Wheeler wrote:
>
> 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.
Well done! Please submit a patch.
In the future, please refrain from sending savegames so big. You can
always upload it directly to RT via "Comment" command.
> 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?
In some parts of the code assert checks something which is assumed later
and if not fulfilled would lead to a crash anyway. But in some parts it's
just a bad tradition, I think.
G.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Freeciv-Dev] Re: (PR#6216) Assertion `punit->transported_by != -1' failed,
Gregory Berkolaiko <=
|
|