ERROR: memory cannot be "read" 
Author Message
 ERROR: memory cannot be "read"

I am getting the following error when running using VC++ 6.0/

The instruction at <address> referenced memory at <address>.
The memory could not be "read".

This occurs after the entire program has executed successfully and the
ifstream destructor is called.  I have search the Microsoft support pages
and found the same error but under different circumstances that do not seem
to apply to my app.  I am reading in info from a text file, storing the info
in a structure, doing a bunch of calculations using the info from the
structure as parameters into my methods, then trying to cout the information
to a DOS window.  I was working fine until yeterday when I added a few more
calculations and then began getting this error.

The call stack in the de{*filter*}s shows it aborting on the last line of the
main() when it tried to destruct the ifstream.  When I tried destructing the
ifstream myself using

~input();

Where input is the name of the ifstream object it gave me an error.  Could
there be something wrong with my ifstream class definition.  I am so stuck
on this!  Oh, one more piece of info, I compiled the exact code on a Linux
machine and got no errors and everything worked great.

Any ideas?

Thanks,
Kristen



Tue, 05 Jun 2001 03:00:00 GMT  
 ERROR: memory cannot be "read"
hi Kristen.

sounds like a memory overwrite corrupts your ifstream. you can test against
such things with stuff like afxcheckmemory() and related functions.

WM_HOPETHISHELPS
thomas woelfer
die software



Fri, 08 Jun 2001 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Problem getting "memory cannot be read"

2. "Memory cannot be read"?

3. Error "free"-ing "malloc"-ed memory

4. memory "read" error

5. ERROR: memory could not be "read"

6. Error "Cannot Load ActiveX component"

7. "Cannot save file" error message

8. "Cannot save file" error message

9. Cannot compile--"error spanning cl.exe"

10. Memory could not be "read"

11. The memory could not be "read"

12. The memory could not be "read"

 

 
Powered by phpBB® Forum Software