If there is a leading space in the module name, then when you SAVE a game and reload it (using same version of module), VASSAL claims there is a “version mismatch” between the saved game and the module.
It’s a small bug, but worth noting as it’s easy to miss and caused a lot of head scratching…
What’s the text of the message? I’m having trouble locating it.
Never mind, I found it. This is a rather annoying problem to fix. The metadata in saved games is stored as XML, and the module name therein is the text content of an XML element, for which leading and trailing whitespace isn’t preserved.
I’ve added this bug to the tracker:
Leading or trailing whitespace in a module name is best avoided.
Yep, it’s easy to fix in the module once you realize the problem, by deleting the leading whitespace. It’s also easy enough to simply over-ride the spurious mismatch warning and load the saved game anyway.
If possible, I would recommend having the editor simply remove any leading whitespace in the module name when saving the module…
YES and NO.
YES - The editor correctly removed leading and trailing white-space from the Game Name (ModuleName).
BUT - The same problem exists for Version number (ModuleVersion), where leading white-space causes a mismatch warning on loading a saved game. And looking in the editor, the leading/trailing white-space was not removed for this field.
I didn’t test to see if the same problem occurs with other fields:
Additional module Info 1 (ModuleOther1)
Additional module Info 2 (ModuleOther2)
BTW and maybe a silly question, but wouldn’t storing a module checksum in the saved game and comparing that to the running module checksum be a more rigorous & accurate test?
Maybe as a second tier test after the initial Name/Version check… Would pick up changes to a module where someone didn’t do proper configuration control to update version #…
Try VASSAL-3.6.6-SNAPSHOT-0fb3634-strip_whitespace. That should strip leading and trailing whitespace from module versions as well.
Those fields don’t participate in mismatch checking, so I’m inclined to leave them alone.
Yes, it would. We may do that in V4.
This snapshot deleted leading/trailing whitespace in both fields.
The fix will be out in 3.6.6 by the end of the month.