
Steven, I modified basic_binary_iarchive.ipp with some cout lines for debugging. See attached file. I executed the LoadPersistentData() in the LoadPersistentData.cpp to serialize in my data from the file. The output.txt file shows the output for one Good and two Bad results of executing this function. You can see from the Bad results that the basic_binary_iarchive<Archive>::init() is failing on line : if(l == std::strlen(BOOST_ARCHIVE_SIGNATURE())) { and line if(file_signature != BOOST_ARCHIVE_SIGNATURE()) Do you have any ideas why I would be getting these large numbers for " l "? What does the " input_library_version " indicate? What does input_library_version == 5 mean ? What does input_library_version == 7 mean ? Thanks, Robert
-----Original Message----- From: boost-users-bounces@lists.boost.org [mailto:boost-users- bounces@lists.boost.org] On Behalf Of Steven Watanabe Sent: Wednesday, June 16, 2010 11:36 AM To: boost-users@lists.boost.org Subject: Re: [Boost-users] [Serialization] Sometimes Fails Reading Binary File
AMDG
Robert McCullough wrote:
I was able to compile and run my app on Windows 7. Debugging using Visual Studio 2008 and using Boost 1.43.0 with the patch from https://svn.boost.org/trac/boost/ticket/4257
The value of l at line 56 of boost/archive/impl/basic_binary_archive.ipp is I = 369098752;
= 0x16000000
indicating that you're trying to read the archive on a little endian machine, when it was written on a big endian machine.
file_signature = "" Line 56: if(l == std::strlen(BOOST_ARCHIVE_SIGNATURE())) { Fails! Line 70: if(file_signature != BOOST_ARCHIVE_SIGNATURE()) is true so, the archive_exception::invalid_signature is thrown on line 73.
On my Window 7 PC, sizeof(size_t) == 4 sizeof(library_version_type) could not find definition of library_version_type
It's boost::archive::library_version_type defined in boost/archive/basic_archive.hpp
sizeof(int) == 4 sizeof(long) == 4 sizeof(float) == 4 sizeof(double) == 8
In Christ, Steven Watanabe
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users