Complete.Org: Mailing Lists: Archives: freeciv-dev: February 2003:
[Freeciv-Dev] (PR#3380) Popup city button for captured city causes crash
Home

[Freeciv-Dev] (PR#3380) Popup city button for captured city causes crash

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: kenn@xxxxxxxxxxxxxx
Subject: [Freeciv-Dev] (PR#3380) Popup city button for captured city causes crash
From: "Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx>
Date: Sun, 16 Feb 2003 19:14:17 -0800
Reply-to: rt@xxxxxxxxxxxxxx

[guest - Tue Feb 11 04:13:30 2003]:

> If one of your cities is captured, and you select the "... conquered ...
> and looted ..." in the message box, then press the Popup City button,
> you'll get something like:
> 
> civclient: citydlg_common.c:319: get_city_citizen_types: Assertion `i ==
> pcity->size' failed.
> Aborted (core dumped)
> 
> Feb 7 cvs, gtk2 client on Red Hat 8.  Savegame attached; join as kenn.

Obviously the problem is that you don't know anything about the citizens
of this city.  So although you know that pcity->size == 2 (or whatever),
the values for happy/content/unhappy citizens are all 0.

What should the behavior here be?

I see two options:

1. The city dialog does popup; no citizens (or better: an unknown
citizen graphic, which we don't have) are displayed.
2. The city dialog does not popup.

Note that freeciv 1.14 is no help here; in the release the dialog will
popup and bogus citizens will be displayed (not sure why; maybe we can
fix that too).

My preferene would be for #2.  A one-line change to messagewin_common.c
prevents non-owned cities from popping up.  But this is probably wrong:
what about allied cities, or enemy cities we have spy information on? 
Is there a function is_city_information_known()?  Can one be written?

In the longer term, the GUI code should disable the popup-city button in
these cases.

jason



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