Boost logo

Boost Users :

From: Adrian Grigore (adrian_at_[hidden])
Date: 2007-02-03 09:10:30


In the meantime I was able to provoke the exception in a more
deterministic manner. Merely incrementing the value of an unsigned int
and saving the player profile leads to the exception I mentioned:

for (int i=0;i<100;i++)
{
        //this is just a regular size_t variable
        CURRENT_PROFILE.NextLevel=i;
        g_GameProgress.SaveToFile();
        //this always trows an exception when i==26
        g_GameProgress.LoadFromFile();
}

The problem does not seem to be related to side-effects in previous file
save / reload attempts. If I merely do this, it leads to the same exception:

//this is just a regular size_t variable
CURRENT_PROFILE.NextLevel=26;
g_GameProgress.SaveToFile();
//same exception here!
g_GameProgress.LoadFromFile();

the exception is thrown in line 114 basic_binar_iprimitive:

if(is.fail())
boost::throw_exception(archive_exception(archive_exception::stream_error));

Thanks for your help,

Adrian Grigore


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