Boost logo

Boost :

Subject: Re: [boost] [Serialization] Need help with binary archivedeserialization error
From: Robert Ramey (ramey_at_[hidden])
Date: 2009-02-04 00:13:33

double check that the stream is opened with ios::binary

Robert Ramey

George van Venrooij wrote:
> Hi,
> I just ran into an issue with serialization which is very peculiar.
> When serializing a complex class structure to an archive all goes well
> without errors.
> However, when trying to read back the data it works with all xml and
> text archive types, but when using binary archives I get an archive
> exception while loading.
> The exception occurs while loading an array of 3 doubles. From what
> I can make up out of the code, the archive says there are 20 bytes to
> load, while the library expects 24.
> Apparently I'm doing something that has no effect for text-based
> serialization, but does for binary. Since I didn't find any posts or
> tickets for this issue I assume I have made a mistake somewhere, only
> I have been looking for hours and cannot seem to find it. So any
> suggestions on where to look would be welcome, even the obvious ones
> ;-)
> Regards,
> George van Venrooij
> _______________________________________________
> Unsubscribe & other changes:

Boost list run by bdawes at, gregod at, cpdaniel at, john at