-
-
Notifications
You must be signed in to change notification settings - Fork 386
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Most savegames can not be loaded and crash the game #6064
Comments
Perhaps #6047 is related. I can't play like that and I reverted to previous official version. |
So, when loading the game, an exception is thrown here: pioneer/src/lua/LuaSerializer.cpp Lines 292 to 293 in 89d503a
when the serializer reads this element from savegame "utility_s1_1",
{
"lua_class": "Equipment.BodyScannerType",
"ref": 93950602298560
}, Since this is an empty ref, the object was supposed to be defined earlier, but this did not happen. This object is defined in the Thus, the necessary "FIFO" condition is violated somewhere while serializing such objects. Perhaps the unordered nature of the Lua tables is involved there. It fired when the component became 3 - I think there are 2 solutions - either restore "FIFO", or remove the "FIFO" requirement. @DynV Yes, the savegame "tmp13" from #6047 does not work for the same reason.
stacktrace on exception:
|
In the serialization of the Lua objects there is a system of "one definition", when all subsequent mention of the object only refer to it. It is vital that the full definition meets before the rest of the refs to the object, otherwise an error occurs. The same objects can now meet in different lua components, and this means that we must ensure the order of processing procedure during saving and loading. fixes pioneerspacesim#6064
Confirmed that I can "fix" my own corrupt saves by running What's interesting is that swapping the order of the ScanManager and EquipSet sections doesn't work, even though that also corrects the FIFO issue in the save itself. It's as though the game re-sorts the keys alphabetically after reading the save file. |
Yes, apparently this is due to the implementation of the JSON library used Lines 11543 to 11546 in 89d503a
|
alice_wu_020.zip as mentioned in this comment on the PR bug fix:
attaching the zipped savefiles for further testing |
Based on Markdascher's remarks above, I realized my load crashes started happening when I fitted a surface scanner (not the orbital one). So as a test, I sold my surface scanner, and now my savegames appear to be working fine. Not a fix, but at least it might be a temporary workaround. |
In the serialization of the Lua objects there is a system of "one definition", when all subsequent mention of the object only refer to it. It is vital that the full definition meets before the rest of the refs to the object, otherwise an error occurs. The same objects can now meet in different lua components, and this means that we must ensure the order of processing procedure during saving and loading. fixes pioneerspacesim#6064
In the serialization of the Lua objects there is a system of "one definition", when all subsequent mention of the object only refer to it. It is vital that the full definition meets before the rest of the refs to the object, otherwise an error occurs. The same objects can now meet in different lua components, and this means that we must ensure the order of processing procedure during saving and loading. fixes #6064
With the latest release (from source) this applies to a good 80% of the saves I have made. To reproduce:
Observed:
After a few moments, a message appears in the lower right corner "This saved game cannot be loaded because it contains errors" for a split second, then the game closes with a message "Info: Pi shutting down"
Additionally (maybe a separate bug?), to reproduce:
Observed:
The game segfaults.
Additional information: There is a clock skew in the system time (CMOS battery dead), I don't expect this to be related.
savefiles.zip
The text was updated successfully, but these errors were encountered: