Update of bug #17678 (project freeciv):
Status: None => Ready For Test
Assigned to: None => syntron
_______________________________________________________
Follow-up Comment #1:
> "City size and number of citizens does not match (8 != 0)!
> Repairing ..."
> After some thought, I understand this: citizen nationality was
> enabled in the experimental ruleset on trunk in patch #2360,
> but of course my savegame doesn't have any nationality info,
> so the server has to invent something.
This is easily be fixed if the savegame version handling is done correctly
...
> "assertion 'city_from_great_wonder(pimprove) == pcity'
> failed."
> I think these all come from the following call tree:
Good analysis! I moved the loading of the citizens information after the city
is registered - thus citizens_update() can be called without problems.
> More generally, is the second point something the new
> backward-compatibility stuff in savegame2.c should be dealing
> with? We know we're loading a 2.3.0 savegame, so we know it
> can't possibly have any nationality info, so we could quietly
> invent some in the relevant function dispatched by
> sg_load_compat().
It is doing exactly that now ;-) I did added some code to remove the citizens
information if an old savegame should be saved but nothing to add it to old
savegames ...
> (Off-topic but: have I missed the point of
> sg_load/save_compat()? At this stage of trunk development, I'd
> expect compat_load/save_020400() to still be empty stubs, and
> compat_load/save_020300() to be accruing backward
> compatibility code, but the opposite is true. Doesn't that
> mean that new features won't be being saved by trunk servers
> by default?)
The naming should be read as:
compat_load_020400() - load _pre_ 2.4.0 savegame
compat_save_020400() - save _pre_ 2.4.0 savegame
So perhaps the functions should be renamed and the original 2.3 version can
be removed (set to NULL in the compat array).
patch attached:
fix savegame citizens handling
* fix error message "City size and number of citizens does not match (8 !=
0)! Repairing ..." by creating dummy citizens information for 2.3.0 savegames
* fix assert "assertion 'city_from_great_wonder(pimprove) == pcity' failed."
by moving the loading of citizens data after the city was registered
see gna bug #17678
reported by Jacob Nevins <jtn>
(file #12363)
_______________________________________________________
Additional Item Attachment:
File name: 20110209-fix-savegame-citizens-handling.patch Size:4 KB
_______________________________________________________
Reply to this item at:
<http://gna.org/bugs/?17678>
_______________________________________________
Nachricht geschickt von/durch Gna!
http://gna.org/
_______________________________________________
Freeciv-dev mailing list
[email protected]
https://mail.gna.org/listinfo/freeciv-dev