[Serialization] Runtime error in release but not in debug builds (Visual C++ 8)

Hi, My program is now crashing when I do a release build and try to serialize my data, but in the debug version it works just fine. Area where it is crashing appears to be: std::ofstream ofs(saveAsDialog.GetPath()); boost::archive::binary_oarchive oa(ofs); Specifically on the second line, where it attempts to create the archive on the file stream, it just crashes. At this point I have no idea what could be causing it. I am using MS Visual C++ 8. Cheers, Dieter Buys

What version of boost are you using? Note that one can set the build settings in the VC++ IDE so that debug symbols are enabled even when the code is built with full optimization. This might help determine the source of the error. Robert Ramey Dieter Buys wrote:
Hi,
My program is now crashing when I do a release build and try to serialize my data, but in the debug version it works just fine. Area where it is crashing appears to be:
std::ofstream ofs(saveAsDialog.GetPath()); boost::archive::binary_oarchive oa(ofs);
Specifically on the second line, where it attempts to create the archive on the file stream, it just crashes. At this point I have no idea what could be causing it. I am using MS Visual C++ 8.
Cheers, Dieter Buys
participants (2)
-
Dieter Buys
-
Robert Ramey