[Freeciv-Dev] Re: two bugs (PR#259)
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Jeff Mallatt wrote:
> (BTW, this bug pertains to the GTK+ client.)
>
> I can't reproduce the crash, either, but when I popup the city that is in
> disorder, the city report refreshes into total garbage! Strange columns,
> filled with funny characters -- it's easy to see that a crash could happen.
I found something similar to Jeff, but with the following
further information:
I get the same generally with other savegames, and sorting
by other columns, with the main constant being to sort
on something, and then select the top entry after sorting,
and click Popup (popup by double-click does _not_ trigger
the bug).
But, it went away after doing "make ; make clean".
But, it came back again (with core dumps instead of garbage)
when _not_ using '--enable-debug' with configure.
Hmm, nasty.
> There's also something funny happening when you refresh with one city
> selected and are sorted on Size or State -- the selected city moves to as
> close to the top of the list as it's size/state allows.
To be precise, whenever the sorting is ambiguous for the
chosen column (ie, multiple entries the same in that column),
hitting "Popup" moves it up the list as far as possible.
The reaon is that when a city dialog is popped up, it
automatically calls city_report_dialog_update_city()
-- ie, update the city report in case the city has changed.
(That is, create_city_dialog() calls refresh_city_dialog()
to "populate" the new city dialog, but because
refresh_city_dialog() is also called when something has
changed, it is convenient to call city_report_dialog_update_city()
from refresh_city_dialog()...)
For the Xaw client this often does nothing or almost nothing,
but for the Gtk+ client it always (? or mostly) removes
the entry and then adds it back. (Hence the comment in
gui-gtk/cityrep.c#city_popup_callback() about popup_city_dialog()
destroying the data.) This has probably got something to do
with the garbage/core-dump bug too, but I don't know enough
Gtk+ to work out why (or could it be a Gtk+ bug?)
Maybe somehow avoiding calling city_report_dialog_update_city()
for new dialogs would help...
-- David
|
|