[serialization] deserialized instance empty even though proper serialize methods called
I'm using Boost.Serialization (v 1.55) on a 64 bit Win7 machine using VS 2012. I'm building the library containing all the classes to be serialized as a DLL. None of the classes have manually defined constructors (so I'm getting the compiler created constructors). All serialization is done through pointers. Most of the classes for a single class hierarchy of up to 5 inheritance levels, although there is a second class hierarchy with only 2 levels and a number of classes that do not use inheritance. When running tests where the same EXE serializes then deserializes everything works (I'm serializing to/from XML, text and binary). When running tests where I serialize in one EXE then deserialize in another EXE, (using text archives on both sides) the serialization works fine and the deserialization appears to work fine (all the appropriate deserialize methods are called), but the resulting object contains none of the data. The data is arriving at the receiving/deserializing application as a string which is then placed in a stringstream and that is used to initialize a text_iarchive. The serialize methods use BOOST_SERIALIZATION_NVP since this is set up to handle XML as well. After each line such as this: ar & BOOST_SERIALIZATION_NVP(valid); I would expect the referent member variable to be set, but it does not change. Nor has anything changed when examining the created instance after deserialization has completed. What is could be causing this/ how do I fix it? Steve Hickman System Architect, Flight Deck of the Future 480-236-8367
participants (1)
-
Hickman, Steve (AdvTech)