#11298 closed Bugs (wontfix)
Crash when serializing objects with tracking information
Reported by: | Owned by: | Robert Ramey | |
---|---|---|---|
Milestone: | To Be Determined | Component: | serialization |
Version: | Boost 1.44.0 | Severity: | Problem |
Keywords: | Cc: |
Description
I am puzzled by the boost serialization library behaviour. If I have tracking turned on for an object, the output contains object ids - which looks fine. However, when I serialize it back in, the code crashes.
If I comment out the tracking (Variant.h line 59) the output looks similar but without the object ids. This time serializing back in succeeds.
What I don't get, though, is that the crash seems to be because the inner object is not tracked correctly. Looking at the XML, this still has class_ids and object_ids set correctly - so why is it that the object_ids on the other objects causes this issue?
Any help gratefully received. Attached is the test code, plus the two output xml zip files.
Attachments (1)
Change History (3)
by , 7 years ago
Attachment: | CrashTest.zip added |
---|
comment:1 by , 7 years ago
Resolution: | → wontfix |
---|---|
Status: | new → closed |
comment:2 by , 7 years ago
Hi Robert,
A quick update. It appears to be a compiler bug. I tried the reproducer in VS2008 using boost 1.59 and could still reproduce the crash. I then upgraded the project to VS2013, and the crash has been resolved.
Thanks,
Chris
I took a look at this. It's way to complex and example for me to figure out without debugging through the code. And I don't have msvc available so I'd have to use something else.
If you want to do this I can give a couple of hints:
use the text archive rather than xml_archive. xml_archive is easier to see - but tracing though invokes an extra layer at each step so text_archive is easier.
Look at the documentation of reset_object_address and make sure your using it if you are loading tracked objects to the stack.
Sorry I couldn't be more helpful.
Robert Ramey