id,summary,reporter,owner,description,type,status,milestone,component,version,severity,resolution,keywords,cc 5299,Serialization throws an exception for loading binary archive on windows,Wang Peng ,Robert Ramey,"Serialization throws an exception for loading binary archive on windows. THere is no error when using text or xml archive. No error on Ubuntu when using binary, text or xml archive. I have tested the cpp file on both Window XP-x86 and Window 7-x64. The errors are the same. A minimal and complete example is the following: (in s11n_bug.cpp): {{{ #include #include #include #include #include #include typedef std::vector B; class A; typedef boost::shared_ptr a_ptr; typedef boost::shared_ptr b_ptr; class A{ public: A(){} A(b_ptr b) : b_(b){} virtual ~A(){} b_ptr b_; friend class boost::serialization::access; template void serialize(Archive & ar, const unsigned int version){ ar & BOOST_SERIALIZATION_NVP(b_); } }; class DA : public A{ public: DA(){} DA(b_ptr b) : A(b){} template void serialize(Archive & ar, const unsigned int version){ ar & boost::serialization::make_nvp(""base"", boost::serialization::base_object(*this)); } }; typedef std::vector VA; typedef boost::shared_ptr va_ptr; typedef std::vector VVA; typedef boost::shared_ptr vva_ptr; template void register_types(Archive& ar){ ar.template register_type(); } b_ptr make_b(){ return b_ptr(new B); } a_ptr make_a(){ return a_ptr(new DA(make_b())); } va_ptr make_va(){ VA va; va.push_back(make_a()); va.push_back(make_a()); return va_ptr(new VA(va)); } vva_ptr make_vva(){ VVA vva; vva.push_back(make_va()); vva.push_back(make_va()); return vva_ptr(new VVA(vva)); } int main(){ std::string filename = ""tmp""; std::vector thing; thing.push_back(make_vva()); thing.push_back(make_vva()); { std::ofstream ofs(filename.c_str()); boost::archive::binary_oarchive oa(ofs); register_types(oa); oa << BOOST_SERIALIZATION_NVP(thing); } { std::ifstream ifs(filename.c_str()); boost::archive::binary_iarchive ia(ifs); register_types(ia); ia >> BOOST_SERIALIZATION_NVP(thing); } return 0; } }}}",Bugs,new,To Be Determined,serialization,Boost 1.46.0,Problem,,serialization windows binary load,