Boost logo

Boost Users :

From: Robert Ramey (ramey_at_[hidden])
Date: 2006-04-05 11:15:20


The "version" facility is provided for maintaining the ability to read old
archives. It doesn't sound like you're using this and its sounds like you
should be.

Robert Ramey

"RIVASSEAU Jean Noel" <JN.RIVASSEAU_at_[hidden]> wrote in message
news:87F60F7FA02FF749AFB02BD9FCAA6B0401074928_at_naserv31.nanterre.oberthurcs.com...
Hello,

My program crashes at launch (not even a exit(0) as the first line of
main(int argc, char *argv[]) will stop it from crashing), due to the BSL.

What I am trying to do is: I have a class, whose serialization is split (eg,
save and load functions are provided, and they are different). Now this
class had a parent class, so I used to call
boost::serialization::base_object<MObject>() on the base class MObject.

However I want to change the parent of my class to a different class. I also
want to update my old archives, so I decided to leave the load function of
my class untouched, while I would change the save function, to update the
call to base_object to the new parent class (not MObject anymore). I thought
it would work, since it would load the old archive using the same method,
but save it using the new, so I would have ran only one time the program and
the archive would be updated (then, of course, before running it again I
would have to recompile it one more time with the correct changes to the
load function).

But it does not work as expected, since it seems the BSL does not like the
fact that save and load functions calls to boost::serialization::base_object
do not specify the same base class. It does not complain at compile time but
crashes at run time before even entering main and certainly before loading
any archive. The crash is due to a NULL pointer, I have tried to debug with
gdb but the crash apparently occurs on the _libkernel32_a_iname () so I do
not not know where it is (too low level for me).

Robert, do you have an idea what is going on? I suspect a bug - however if
it is "normal" behaviour (I think it should then throw an exception rather
than crash),

***
Tell that to the author of _libkernel32_a_iname ()

do you have an idea how could I update my archives? I need to change the
parent of this class, but need to be able to read my old archives - and
changing them "by hand" by looking into the XML archive code is tool hard.

Thank you, regards

Jean-Noël Rivasseau

_______________________________________________
Boost-users mailing list
Boost-users_at_[hidden]
http://lists.boost.org/mailman/listinfo.cgi/boost-users


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