Complete.Org: Mailing Lists: Archives: freeciv-dev: December 1998:
Re: [Freeciv-Dev] Segmentation fault when diplomat investigates city
Home

Re: [Freeciv-Dev] Segmentation fault when diplomat investigates city

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv-dev@xxxxxxxxxxx
Subject: Re: [Freeciv-Dev] Segmentation fault when diplomat investigates city
From: David Pfitzner <dwp@xxxxxxxxxxxxxx>
Date: Sat, 12 Dec 1998 14:41:22 +1100

Patrick Smith wrote:
> 
> The client recently crashed on me, with a segmentation fault.
> 
> This happened when I sent a diplomat into an enemy city.  The popup
> dialog appeared, I asked to investigate the city, and then the client 
> crashed.

This has been reported be a number of people recently.  Thanks to the
various hints people game, I was finally able to guess the problem and 
deliberately reproduce it, and then fix it.  Should be fixed now in CVS.

The problem was that when a unit moves outside the known area, the
client forgets about it (and the unit data is freed), but a pointer
was left dangling in the home city supported units list.

Now, with the fix, any units outside the known area are not shown in 
the supported units area when you investigate an enemy city.  
An alternative could be to not show _any_ supported units when 
investigating, but I thought the above was preferable.  
A third alternative of correctly showing _all_ supported units is I think
not easy to implement with the current framework.

-- David


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