Hello list,
currently I am trying to get serialization to work.
It worked well when I was using boost 1.32, but since I upgraded to 1.33 I'm having some problems.
In short;
I have an abstract base class and a derived class. I try to serialize/deserialize the derived class
through a pointer to the base class.
This worked well when I was using 1.32.
When I upgraded to 1.33 I got the static assert which trapped the 'saving non const error' (I hope this makes sense ..).
So I fixed it by following instructions from other posts dealing with the same problem
(basically just by changing 'base *b' to 'const base * const b').
The fix resolved the compile error, only now I'm getting a segfault at runtime.
The segfault happens during deserialization (when trying to 'reconstruct' the original object).
The funny thing is, I've tested it on a system (suse enterprise system 9, gcc 3.3.3) and it chrashes.
On another system (gcc version 4.0.3 (Ubuntu 4.0.3-1ubuntu5)) it works fine.
I reproduced the problem in a very small program located at the end of this post. Maybe someone
can have a look at the code and tell me whether there are obvious problems with my code or not.
If I know for sure that my code should run correctly, I'll just move on to an other linux distro ..
Thanks in advance,
Oscar
#include