Boost logo

Boost Users :

Subject: Re: [Boost-users] [serialization] Reading back old archives
From: Robert Ramey (ramey_at_[hidden])
Date: 2010-07-12 16:43:23


David Raulo wrote:
> Here you suggested using the function get_library_version() in the
>
> following way:
>
> [...]
>
> I've addressed this in the trunk and merged to release. I took
> special
> care to address situations such as your's. BUT... , I
> really haven't a good way to test this. So I would be greatful
> if you could download the lastest release version and verify that
> this works as I believe it should. If not, we should be able to
> fix it.
>

> Unfortunately it does not work. The serialization library throws an
> exception before reaching my serialize() method. This happens at
> the
> following XML line:
> <MyClass class_id="11" tracking_level="1" version="20090123"
> object_id="_11">
>
>
> Here is the relevant part of the backtrace:
>
>
> #8 0x001df891 in
> boost::serialization::throw_exception<boost::archive::archive_exception>
> (e=@0xbfffe2d0) at throw_exception.hpp:36
> #9 0x001a3cee in
> boost::archive::detail::iserializer<my_xml_iarchive,
> MyClass>::load_object_data (this=0xbea698, ar=@0xbffff284,
> x=0x2a19770, file_version=36107) at iserializer.hpp:173
>
>
> Here you can see that the original version 20090123 got truncated to
> 36107 == 20090123 & 65535. This in itself might be a bug, I'm not
> sure.

I can't see this. But I do see how this assertion would be tripped. If
you comment out this assertion does this make it work?

Robert Ramey


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