-
-
Notifications
You must be signed in to change notification settings - Fork 398
Description
Observed behaviour
Attempt to load a savegame created with the current AppImage release (https://github.com/pioneerspacesim/pioneer/releases/download/20240710/Pioneer-x86_64.AppImage) with the current master build crashes.
pioneer: /home/micha/Source/Pioneer/contrib/json/json.hpp:14412: const nlohmann::basic_json<ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer>::value_type& nlohmann::basic_json<ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer>::operator[](T*) const [with T = const char; ObjectType = std::map; ArrayType = std::vector; StringType = std::__cxx11::basic_string<char>; BooleanType = bool; NumberIntegerType = long int; NumberUnsignedType = long unsigned int; NumberFloatType = double; AllocatorType = std::allocator; JSONSerializer = nlohmann::adl_serializer; const_reference = const nlohmann::basic_json<>&]: Assertion `m_value.object->find(key) != m_value.object->end()' failed.
Aborted (core dumped)
This appears to have been broken by #5840
Despite the description stating that there would be a bump in the savefile version, both the old and the new savefile (attached below) are version 90.
A new save created with the current master build ("Micha_test_new.json") shows that the "Shields" entry of the player ship ("MW72") has moved location from the "model_body" to the "ship". There is no fall-back if the "shields" entry under "ship" does not exist and the above assertion in the JSON parser is triggered and the game crashes.
Expected behaviour
Game successfully loads older savegame.
Steps to reproduce
- Create a savefile using the current AppImage release
- Compile current "master" from GitHub
- Attempt to load savefile -> assertion failure and game crashes.
My pioneer version (and OS):
OS: Debian GNU/Linux 12
Pioneer Version: as described above
My output.txt (required) and game save (optional, but recommended)
Save 1: "Micha_test.json" : created using AppImage version
Save 2: "Micha_test_new.json" : created using current "master" build