Thanks for replying.
On 1/7/07, Robert Ramey
A couple of observations:
a) you might try using xml_?archives for debugging. The consume more space are are easier to interpret.
I've used xml_?archives now. The output looks satisfactory.
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE boost_serialization>
b) Could it be that you are doing something like:
ar << lm ; // pointer to LogMessage ... ar >> m; // pointer to Message
I'm saving and loading using a pointer to Message.
If this doesn't help, make a small test which just serializes and de-serializes and we can take a look at it.
I did a small test loading the resultant XML from a file. It uses code copy & pasted from the program. The test works perfectly. I would expect that if I did something obviously wrong I would've gotten one of boost's exceptions (like unregistered_class) and I could fix my error. I however don't know why bad_cast gets thrown. For now I'll have to rip apart this program and try to reconstruct it piece by piece in a test program until the error pops up again.
Robert Ramey
sadrok wrote:
My application saves message classes derived from a Message base class (it has a virtual deconstructor) and sends this serialized data over a UNIX socket for IPC between interconnected processes.
-- sadrok@gmail.com Yahoo! IM: sadrok_za Jabber ID: sadrok@jabber.obsidian.co.za