Heya...
Here's a snippet of code:
Any assignments to a CString inside that if (!in.eof()) loop, including inside function calls like app.takeScreenShot(imagename);, result in a long stream of
First-chance exception at 0x00000000 in Flocking.exe: 0xC0000005: Access violation reading location 0x00000000.
errors.
Further testing has shown it's not just limited to CString - it will also crash on this trivial assignment:
Uhhh...any suggestions?
Catfish
Here's a snippet of code:
code:<HR>Code:<P>ifstream in;<P>int renderFrame() { static bool firstTime=TRUE; if (firstTime) { in.open(filename, ios::in | ios::binary); firstTime = FALSE; };<P> // Check that the file loaded OK if (!in) return 0;<P> CString imagename = "c://black betty"; imagename.AppendFormat(".%d.raw", frameCount);<P> if (!in.eof()) { in.read((char*)&flockWeights, sizeof(flockWeights)*2); in.read((char*)&boidModifier, sizeof(boidModifier)*2); in.read((char*)&normalisedVolume, sizeof(normalisedVolume)*2); in.read((char*)&filteredSpectrum, sizeof(filteredSpectrum)*630); app.takeScreenShot(imagename); } }
Any assignments to a CString inside that if (!in.eof()) loop, including inside function calls like app.takeScreenShot(imagename);, result in a long stream of
First-chance exception at 0x00000000 in Flocking.exe: 0xC0000005: Access violation reading location 0x00000000.
errors.
Further testing has shown it's not just limited to CString - it will also crash on this trivial assignment:
code:<HR>Code:FILE *out; out = fopen(FileName, "a");
Uhhh...any suggestions?
Catfish