Boost logo

Boost Users :

Subject: [Boost-users] [boost][serialization] polymorphic classes - access violation
From: Christoph Heindl (christoph.heindl_at_[hidden])
Date: 2010-06-28 07:08:09


Hi,

i see an 'access violation' in 'basic_iarchive_impl::load_pointer' at

 if(! tracking){
  bpis_ptr->load_object_ptr(ar, t, co.file_version);
 }

using boost 1.43.0 / msvc 9.0 with the following polymorphic scenario

// base class for converters. contains empty serialization
class converter;

// invokes serialiazation of base through boost::serialization::base_object
class int_converter : public converter;

// invokes serialization of base and serialization of _converters
// using include <boost/serialization/vector.hpp>,
<boost/serialization/shared_ptr.hpp>
class composite_converter : public converter {
private:
  std::vector< boost::shared_ptr<converter const> > _converters;
}

Care as been taken that serialization code is generated in exactly one
translation unit (BOOST_CLASS_EXPORT_KEY,
BOOST_CLASS_EXPORT_IMPLEMENT). It seems that saving works out ok as
you can see from the attached xml. Loading is performed through a base
pointer to converter.

I think a similar issue has already been reportet [1].

Without going into more details, is this issue being worked on/ known
or resolved? Should I provide more details?

Best regards,
Christoph

[1] http://permalink.gmane.org/gmane.comp.lib.boost.user/56195




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