[serialization] exception in text_iarchive constructor
Hello, I get exception from text_iarchive constructor when I try to read a previously saved(serialized) file. This doesn't happen every time. It only happens when I try to run the test case through regression tcl script(I am not sure if this piece of information is of any help). I get either stream error or St9bad_alloc( bad_alloc ?). When I get exception If I try to read the file using getline, it fails too. ifstream::good() returns true before calling text_iarchive/getline though. If I use file command on that 'saved' file, I get following: "ASCII text, with very long lines, with no line terminators" As you can understand I can't reproduce this in a small testcase. I have no clue what's going wrong here. Any sort of help will be helpful. Thanks, Krishanu
Most likely load/save are not symetrical. Try using xml_archive and examining the xml_archive which results. Robert Ramey Krishanu Debnath wrote:
Hello,
I get exception from text_iarchive constructor when I try to read a previously saved(serialized) file. This doesn't happen every time. It only happens when I try to run the test case through regression tcl script(I am not sure if this piece of information is of any help).
I get either stream error or St9bad_alloc( bad_alloc ?). When I get exception If I try to read the file using getline, it fails too. ifstream::good() returns true before calling text_iarchive/getline though.
If I use file command on that 'saved' file, I get following:
"ASCII text, with very long lines, with no line terminators"
As you can understand I can't reproduce this in a small testcase.
I have no clue what's going wrong here. Any sort of help will be helpful.
Thanks, Krishanu
participants (2)
-
Krishanu Debnath
-
Robert Ramey