Adrian Grigore
2007-02-02 22:14:23 UTC
Hi,
I'm experiencing occasional problems with boost::serialization when
trying to write then read two simple classes, to a file. I am using
boost 1.33.1
Most of the time everything's working fine, but sometimes the serialized
data seems to be corrupt and boost::archive throws an exception when I
try to load it back into the program. The error occurs about about 1 in
10 times I try this, and seems to depend on the exact values of the
variables being saved.
Here's a call stack of the thrown application:
WxNonogram.exe!_CxxThrowException(void * pExceptionObject=0x00129680,
const _s__ThrowInfo * pThrowInfo=0x00ff4954) + 0x50 bytes C++
WxNonogram.exe!boost::throw_exception<boost::archive::archive_exception>(const
boost::archive::archive_exception & e={...}) + 0x40 bytes C++
WxNonogram.exe!boost::archive::basic_binary_iprimitive<boost::archive::binary_iarchive,std::basic_istream<char,std::char_traits<char>
WxNonogram.exe!boost::archive::basic_binary_iprimitive<boost::archive::binary_iarchive,std::basic_istream<char,std::char_traits<char>
& ar={...}, int & t=-858993460) + 0x2d bytes C++
WxNonogram.exe!boost::archive::detail::load_non_pointer_type<boost::archive::binary_iarchive,int>::load_primitive::invoke(boost::archive::binary_iarchive
& ar={...}, int & t=-858993460) + 0x2b bytes C++
WxNonogram.exe!boost::archive::detail::load_non_pointer_type<boost::archive::binary_iarchive,int>::invoke(boost::archive::binary_iarchive
& ar={...}, int & t=-858993460) + 0x2b bytes C++
WxNonogram.exe!boost::archive::load<boost::archive::binary_iarchive,int>(boost::archive::binary_iarchive
& ar={...}, int & t=-858993460) + 0x2b bytes C++
WxNonogram.exe!boost::archive::basic_binary_iarchive<boost::archive::binary_iarchive>::load_override<int>(int
& t=-858993460, int __formal=0) + 0x38 bytes C++
WxNonogram.exe!boost::archive::binary_iarchive_impl<boost::archive::binary_iarchive>::load_override<int>(int
& t=-858993460, int __formal=0) + 0x31 bytes C++
WxNonogram.exe!boost::archive::detail::interface_iarchive<boost::archive::binary_iarchive>::operator>><int>(int
& t=-858993460) + 0x38 bytes C++
WxNonogram.exe!boost::archive::detail::interface_iarchive<boost::archive::binary_iarchive>::operator&<int>(int
& t=-858993460) + 0x39 bytes C++
WxNonogram.exe!NoNo::TGameProgress::TProfileState::serialize<boost::archive::binary_iarchive>(boost::archive::binary_iarchive
& ar={...}, const unsigned int Version=4) + 0x7a bytes C++
Please help! I'm at a loss on how to proceed.
Thanks for your time,
Adrian
I'm experiencing occasional problems with boost::serialization when
trying to write then read two simple classes, to a file. I am using
boost 1.33.1
Most of the time everything's working fine, but sometimes the serialized
data seems to be corrupt and boost::archive throws an exception when I
try to load it back into the program. The error occurs about about 1 in
10 times I try this, and seems to depend on the exact values of the
variables being saved.
Here's a call stack of the thrown application:
WxNonogram.exe!_CxxThrowException(void * pExceptionObject=0x00129680,
const _s__ThrowInfo * pThrowInfo=0x00ff4954) + 0x50 bytes C++
WxNonogram.exe!boost::throw_exception<boost::archive::archive_exception>(const
boost::archive::archive_exception & e={...}) + 0x40 bytes C++
WxNonogram.exe!boost::archive::basic_binary_iprimitive<boost::archive::binary_iarchive,std::basic_istream<char,std::char_traits<char>
::load_binary(void * address=0x0012d05c, unsigned int count=4) +
0xaf bytes C++WxNonogram.exe!boost::archive::basic_binary_iprimitive<boost::archive::binary_iarchive,std::basic_istream<char,std::char_traits<char>
::load<int>(int & t=-858993460) + 0x31 bytes C++
WxNonogram.exe!boost::archive::load_access::load_primitive<boost::archive::binary_iarchive,int>(boost::archive::binary_iarchive& ar={...}, int & t=-858993460) + 0x2d bytes C++
WxNonogram.exe!boost::archive::detail::load_non_pointer_type<boost::archive::binary_iarchive,int>::load_primitive::invoke(boost::archive::binary_iarchive
& ar={...}, int & t=-858993460) + 0x2b bytes C++
WxNonogram.exe!boost::archive::detail::load_non_pointer_type<boost::archive::binary_iarchive,int>::invoke(boost::archive::binary_iarchive
& ar={...}, int & t=-858993460) + 0x2b bytes C++
WxNonogram.exe!boost::archive::load<boost::archive::binary_iarchive,int>(boost::archive::binary_iarchive
& ar={...}, int & t=-858993460) + 0x2b bytes C++
WxNonogram.exe!boost::archive::basic_binary_iarchive<boost::archive::binary_iarchive>::load_override<int>(int
& t=-858993460, int __formal=0) + 0x38 bytes C++
WxNonogram.exe!boost::archive::binary_iarchive_impl<boost::archive::binary_iarchive>::load_override<int>(int
& t=-858993460, int __formal=0) + 0x31 bytes C++
WxNonogram.exe!boost::archive::detail::interface_iarchive<boost::archive::binary_iarchive>::operator>><int>(int
& t=-858993460) + 0x38 bytes C++
WxNonogram.exe!boost::archive::detail::interface_iarchive<boost::archive::binary_iarchive>::operator&<int>(int
& t=-858993460) + 0x39 bytes C++
WxNonogram.exe!NoNo::TGameProgress::TProfileState::serialize<boost::archive::binary_iarchive>(boost::archive::binary_iarchive
& ar={...}, const unsigned int Version=4) + 0x7a bytes C++
Please help! I'm at a loss on how to proceed.
Thanks for your time,
Adrian
--
Adrian Grigore
adrian (AT) lobstersoft.com
Adrian Grigore
adrian (AT) lobstersoft.com