Update of bug #19007 (project freeciv):

                  Status:             In Progress => Ready For Test         
         Planned Release:       2.3.2,2.4.0,2.5.0 => 2.3.1,2.4.0,2.5.0      
                 Summary: fix known map in savegame2 => Player slots
miscounted when saving/loading known tiles => crashes and/or players
forgetting territory


Follow-up Comment #5:

Per bug #18776 comment 32 <http://gna.org/bugs/index.php?18776#comment32>,
I'm repurposing this bug to be just about the slot miscounting (which is what
the currently attached file, file #14565, fixes). IMO, this is a low-risk
change so I'm going to put it in 2.3.1.

The other stuff mentioned in comment #2 and comment #3 -- divisor confusion
-- is for a new bug: bug #19029.

Description copied from the other bug:

== Player slots miscounted when loading/saving known tiles ==

file #14579:  0005-basic-fix-known-map-in-savegame2.patch
(which is basically the same as file #14565)

_Bug:_ if the usage of player slots is sparse, then depending on luck and
alignment, you can see either:
* Segfaults or other misbehaviour, due to indexing off the end of a malloc'd
* The known-tiles status of higher-indexed players is not saved or loaded.
Such players will probably forget all the map they knew on reload. (I don't
know if that has knock-on effects elsewhere, since their player maps will
presumably have an opinion on what the terrain at those tiles is supposed to
be. Can't rule out segfaults/assertion failures.)

With the fix, I think loading from a savefile affected by the bug will
produce the following warning: "Saved game contains incomplete map data. This
can happen with old saved games, or it may indicate an invalid saved game
file. Proceed at your own risk." and carry on. That seems appropriate. Any
knock-on effects will be present in games loaded from these savegames.

Gaps in player slots can appear whenever /remove is used, whether in-game or
pre-game. (Thus, reverting bug #18641 won't hide this bug.)

_Risk/benefit:_ this change is simple and looks low-risk to me; can't see
that it can break things, especially if /remove is not used. It fixes an
observed segfault (bug #18776 comment 21).

*Conclusion:* Apply this "basic" patch before 2.3.1. Cross fingers.


Reply to this item at:


  Message sent via/by Gna!

Freeciv-dev mailing list

Reply via email to