Hello all,

I'm using serialization to save an object to a file. Here's the method:

Code:
//Saver
void Table :: Serialize(CArchive &cArch1)
{
	CObject::Serialize(cArch1);

	if(cArch1.IsStoring())
		cArch1 << csName << nSerialNumber << bCreated;
	else
		cArch1 >> csName >> nSerialNumber >> bCreated;

	cArch1.Close();
}
//Done
The object is saved with no problem into the required file. However, when I try to open it, i get a fatal error message. I began debugging it to trace it to the exact line, but the compiler compiles comfortably upto the line just before the cArch1.Close() line and exits the method. It then proceed to this snippet from a "Wincore.cpp":

Code:
CATCH_ALL(e)
	{
		lResult = AfxProcessWndProcException(e, &pThreadState->m_lastSentMsg);
		TRACE(traceAppMsg, 0, "Warning: Uncaught exception in WindowProc (returning %ld).\n",
			lResult);
		DELETE_EXCEPTION(e);
	}
	END_CATCH_ALL
What is happening? Why is the saving happening but the loading not happening?