This looks useful. May we presume that you're trying to read this with boost 1.37 and the exception is thrown? Note that the the 1.35 version has archive library version #4 while 1.37 has archive library version #5 in the top row. The archive library version is changed every time we make a change which might mean that older archive have to be handled differently. A example where this has happened is where we change the type of the integer which indicates how may items there are in a collection. In this case, 1.37 (library version # 5) is expecting data which 1.35 (library version #4) didn't put there. That is, 1.37 is missing some code which looks like: if(library_version >4) ar >> i ... Of course the rub is to figure out where that is. The key line differs in that: 1.35 1 12 ... 1.37 1 0 12 ... // extr 0 With your test case I would do the following: Generate the same two files with the xml_archive. This should reveal what the extra "0" corresponds to. With the debugger, trap the program where the exception is thrown. This might reveal the part of code which is throwing this extra "0". This is where the mistake might lie. Robert Ramey David Graf wrote:
Hello Robert
Attached, please find two text archive outputs. The first is generated using boost version 1.35. The second is generated using boost version 1.37. Additionally, I attached the diff between these archives.
In this diff, you can safely ignore the second and the last difference. Those are due to random generated data. We assume that the exception (see attached stacktrace.txt) is caused by the third difference.
Do you have any idea why this exception is thrown?
David
On Apr 9, 2009, at 6:38 PM, Robert Ramey wrote:
This version is declared at the beginning of a serialized archive. E.g.:
The following beginning of a text archive is serialized with boost 1.37: 22 serialization::archive 5 0 35 ...
Serialized with boost 1.35 it looks like this: 22 serialization::archive 4 0 35 ...
Otherwise, the archives are in my case completely identical.
Somehow, if this version number does not match to the serialized or archive version of the used boost library, boost throws an exception.
**** where does this exception get thrown?
Robert Ramey
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users