[Freeciv-Dev] Re: Assertion fails in get_role_unit() (PR#1365)
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
On Sun, Apr 07, 2002 at 06:34:56PM +0200, Petr Baudis wrote:
> Hello,
>
> I just wanted to test my cleanup patches, so I happily set up autogame..
>
> Option: seed has been set to 16.
> Option: randseed has been set to 16.
> Option: huts has been set to 0.
> Option: aifill has been set to 4.
> Option: timeout has been set to -1.
> Created new AI player: Caesar.
> Caesar is now hard.
> Setting game.skill_level to 7.
>
> ..and started it - but after very short delay..
>
> Game saved as civgame-3000.sav
> > civserver: ../../freeciv-/common/unittype.c:543: get_role_unit: Assertion
> > `index>=0 && index<n_with_role[role]' failed.
> Aborted (core dumped)
>
> *POOF* Oh well, I said to myself, and tried with official CVS version. And
> same result. So I debugged this a bit, and the values before assert are..
>
> index 0 - role 1 - nwr 0
>
> Thus, n_with_role[1] is zero, which is not larger than index. Assertion
> fails. Simple fix would be to change the assertion so that it won't fail if
> index==n_with_role[role], however I'm not sure if the problem doesn't lie a
> bit
> deeper. After all, how comes that all units disappeared suddenly from one
> role?
>
> Reproducible with the autogame settings above. For the reference, backtrace:
If you don't know Trade yet you don't know a unit which have the
F_HELP_WONDER flag set. I have no clue why it worked in the past. The
correct fix is to test with num_role_units first.
> Maybe this's also cause of those cores on civserver.freeciv.org..?
I would also guess so.
Raimar
--
email: rf13@xxxxxxxxxxxxxxxxx
"I heard if you play the NT-4.0-CD backwards, you get a satanic message."
"That's nothing, if you play it forward, it installs NT-4.0"
- [Freeciv-Dev] Re: Assertion fails in get_role_unit() (PR#1365),
rf13 <=
|
|