Boost logo

Boost Users :

Subject: Re: [Boost-users] [Serialization] Sometimes Fails Reading Binary File
From: Robert McCullough (rob_at_[hidden])
Date: 2010-06-17 08:54:13


Steven,

Does the Serialization library support multi-thread application.
My application uses boost::archive::binary_iarchive and
boost::archive::binary_oarchive to serialize data to/from files in several
different threads.
I believe this might be happing at the same time.
Could this be causing my problem?

Thanks,
Robert

> -----Original Message-----
> From: boost-users-bounces_at_[hidden] [mailto:boost-users-
> bounces_at_[hidden]] On Behalf Of Steven Watanabe
> Sent: Wednesday, June 16, 2010 11:36 AM
> To: boost-users_at_[hidden]
> 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_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users


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