Boost logo

Boost Users :

Subject: [Boost-users] [Serialization] Confusing problem serializing a vector of pointers to a base class
From: Martin Weinberg (weinberg_at_[hidden])
Date: 2008-12-12 12:48:20


I'm struggling debugging a problem with recent versions >1.35.

I have a huge code with a boost-serializaton-based persistence system.
In short, all "persistent" classes derive from a base class. The code
keeps track of the instances by a vector to pointers to the base
class. Starting with version 1.36, saving the archive results in the
following run-time message:

/usr/local/boost_1_37_0/include/boost-1_37/boost/archive/impl/archive_pointer_oserializer.ipp:64: static const boost::archive::detail::basic_pointer_oserializer* boost::archive::detail::archive_pointer_oserializer<Archive>::find(const boost::serialization::extended_type_info&) [with Archive = boost::archive::polymorphic_oarchive]: Assertion `it != boost::serialization::singleton< oserializer_map<Archive> >::get_const_instance().end()' failed.

I would be good, I know, to post a snippet that produces the error.
Unfortunately, I've tried unsuccessfully for some time to make this
occur in a simple test code with similar features to the main code.

Can someone give me any pointers that would help me debug this? After
a >3 days of struggle, I'm at a loss. Again, there are no problems
with 1.35. I'm not suggesting that the error is not of my own making
but maybe this is a clue.

TIA!


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net