This is the mail archive of the
xconq7@sources.redhat.com
mailing list for the Xconq project.
Re: Death of an advanced unit
- From: Lincoln Peters <peters2000 at mindspring dot com>
- To: Hans Ronne <hronne at pp dot sbbs dot se>
- Cc: Xconq mailing list <xconq7 at sources dot redhat dot com>
- Date: 18 Jun 2002 14:29:03 -0700
- Subject: Re: Death of an advanced unit
- References: <l03130300b93549329214@[217.115.38.105]>
As I think about it, it gets even stranger. I was looking at "Space
Civilization" (no mobile advanced units), and got the segfault when an
advanced units was destroyed by hp-to-garrison (When a Level 0
civilization builds a Level 1 civ, the Level 0 civ vanishes). However,
I don't see any segfaults if a city is destroyed in "Colonizer". I
guess I don't know what's going on.
As far as moving advanced units go, I gave up on them and re-wrote
floating cities to be non-advanced but have their production affected by
terrain using the "productivity" table. No segfaults either way.
On Tue, 2002-06-18 at 13:39, Hans Ronne wrote:
> This is weird. I checked to code, and terrain usage is always cleaned up
> for advanced units irrespective of how they die. The same code is used in
> all cases including starvation (kill_unit_aux). So this can't be the reason
> for your crashes. Was this in the game where advanced units also were
> mobile? As I mentioned earlier, the unit move code cannot yet handle
> terrain usage, so if the unit first moves and then dies, we may end up with
> NULL pointers being dereferenced.
>
> The key question is therefore if you see this only with moving advanced units.