c++ - Upgrade Compatibility of Boost Serialization with binary archives armv7 to arm64 -


the company work releases on ios , android, , apple requiring update of our apps run on arm64 architecture (previously released armv7). unfortunately have been using boost::archive::binary_iarchive's (and binary_oarchive's) store lot of user data (saved games, preferences, etc).

while testing, loading of these archives saved armv7 binary, fails spectacularly on arm64 devices running "universal binary" version of our games.

template<typename t> static t deserialize(std::vector<char> buffer) {     boost::iostreams::basic_array_source<char> source(&buffer[0], buffer.size());     boost::iostreams::stream<boost::iostreams::basic_array_source<char>> input_stream(source);     boost::archive::binary_iarchive ia(input_stream); // crashes here     t value;     ia >> boost_serialization_nvp(value);     return value; } 

the buffer pass in reasonable size. based on fact crashing during constructor of boost::archive::binary_iarchive guessing failing read header properly.

this error logged:

(2005,0x19a1c0310) malloc: *** mach_vm_map(size=7598247065923108864) failed (error code=3) *** error: can't allocate region 

is there way can upgrade, and keep users' saved data?

if need keep user's data you're gonna have reverse engineer way out of hell. maybe cheat having old data sent server transformation.

for portable archives can try oes portable archive implementation.

it supposed drop-in replacement standard binary archives , aims portable. of course results not binary compatible old format, it's solution going forward.


Comments

Popular posts from this blog

python - TypeError: start must be a integer -

c# - DevExpress RepositoryItemComboBox BackColor property ignored -

django - Creating multiple model instances in DRF3 -