Boost logo

Boost Users :

Subject: [Boost-users] Serialization assert fail and unregistered class
From: Jari (jaristr_at_[hidden])
Date: 2011-05-13 22:27:22


Hi

 i get assert fail and "unregistered class - derived class not
registered or exported" when serializing.

I have many classes being saved already in the code but i ran to a
problem saving certain std::list with derived classes. (I also have
similar classes and list being serialized before)

i think its the same issue as in here:
http://boost.2283326.n4.nabble.com/serialization-polymorphic-archives-runtime-failure-was-polymorphic-archives-generates-linker-errors-td2636844.html

i have boost version 1.46.1

heres the call stack:

>       msvcr100d.dll!_wassert(const wchar_t * expr, const wchar_t * filename, unsigned int lineno)  Line 325   C
       gamevc10dbg.exe!boost::archive::detail::basic_serializer_map::find(const
boost::serialization::extended_type_info & eti)  Line 102 + 0x16
bytes   C++
       gamevc10dbg.exe!boost::archive::detail::archive_serializer_map<boost::archive::binary_oarchive>::find(const
boost::serialization::extended_type_info & eti)  Line 67        C++
       gamevc10dbg.exe!boost::archive::detail::save_pointer_type<boost::archive::binary_oarchive>::polymorphic::save<BasePlayer>(boost::archive::binary_oarchive
& ar, BasePlayer & t)  Line 435 + 0xe bytes     C++
       gamevc10dbg.exe!boost::archive::detail::save_pointer_type<boost::archive::binary_oarchive>::save<BasePlayer>(boost::archive::binary_oarchive
& ar, const BasePlayer & t)  Line 460 + 0xd bytes       C++
       gamevc10dbg.exe!boost::archive::detail::save_pointer_type<boost::archive::binary_oarchive>::invoke<BasePlayer
*>(boost::archive::binary_oarchive & ar, BasePlayer * const t)  Line
473 + 0xd bytes C++
       gamevc10dbg.exe!boost::archive::save<boost::archive::binary_oarchive,BasePlayer
* const>(boost::archive::binary_oarchive & ar, BasePlayer * const & t)
 Line 525 + 0xf bytes   C++
       gamevc10dbg.exe!boost::archive::detail::common_oarchive<boost::archive::binary_oarchive>::save_override<BasePlayer
* const>(BasePlayer * const & t, int __formal)  Line 69 + 0x15
bytes   C++
       gamevc10dbg.exe!boost::archive::basic_binary_oarchive<boost::archive::binary_oarchive>::save_override<BasePlayer
*>(BasePlayer * const & t, int version)  Line 76        C++
       gamevc10dbg.exe!boost::archive::binary_oarchive_impl<boost::archive::binary_oarchive,char,std::char_traits<char>
>::save_override<BasePlayer *>(BasePlayer * & t, int __formal)  Line
52      C++
       gamevc10dbg.exe!boost::archive::detail::interface_oarchive<boost::archive::binary_oarchive>::operator<<<BasePlayer
*>(BasePlayer * & t)  Line 64   C++
       gamevc10dbg.exe!saveGame()  Line 63 + 0x12 bytes        C++
       gamevc10dbg.exe!SDL_main(int argc, char * * argv)  Line 1517 +
0x5 bytes        C++
       gamevc10dbg.exe!_main()  + 0xfd bytes   C
       gamevc10dbg.exe!_WinMain_at_16()  + 0x1cd bytes    C
       gamevc10dbg.exe!__tmainCRTStartup()  Line 547 + 0x2c bytes      C
       gamevc10dbg.exe!WinMainCRTStartup()  Line 371   C
       kernel32.dll!75451194()
       [Frames below may be incorrect and/or missing, no symbols loaded for
kernel32.dll]
       ntdll.dll!76fbb429()
       ntdll.dll!76fbb3fc()
       gamevc10dbg.exe!__CT??_R0?AVbad_cast_at_std@@@8??0bad_cast_at_std@@QAE_at_ABV01@@Z12()
 + 0xd2ce bytes C++
       003426e2()

does any one know whats wrong?

i should have all BOOST_CLASS_EXPORT_GUID in place.

thx


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