The memory could not be written error
I have lately been getting the error message The instruction at "0x62e2cc0f" referenced memory at "0x00000000". The memory could not be "written" in Microsoft Windows XP. This happened frequently when I tried to play certain avi video files.
I first thought that I had a memory problem, maybe defective RAM or bad sectors on my hard drive but soon found out that this was not the case. It took me a while to realize what it was. Once I knew where the error came from I was able to wave goodbye to the memory could not be written and watch all the avi movies on my system without problems again.
In my case the error message could be linked to the Data Execution Prevention feature which was enabled for essential Windows programs and services. It is designed to protect the system from viruses and other threats. It should be noted that it is not possible to disable DEP that easily. You need to edit the boot.ini file which is normally located in c:\ and change a parameter in there. Here is how you could do this:
Hit Windows + R and type cmd and press enter afterwards. Navigate to c:\ by typing cd.. until you are there. Boot.ini is hidden and write protected which means that we have to change that before we are able to edit it. Type the following commands:
- attrib -r -h -s boot.ini
- edit boot.ini
- Look for /NoExecute Optin or /NoExecute Optout and change that to /NoExecute AlwaysOff
- Save the edited file
- type attrib +h +r +s boot.ini
- restart the computer
The NoExecute command defines if and how Data Execution Prevention is enabled on your computer. The AlwaysOff parameter turns it off completely. I did not experience any messages of the kind "The memory could not be written" anymore after changing this parameter. Let me know if this helped you as well.
Other possible solutions
- As always, try to scan your RAM and hard drive for errors before you do anything else. A faulty memory or hard drive block may very well cause the issue.
- If a program is mentioned in the error, check to see if an update is available for it.
- You should also make sure that all system drivers are up to date, and that the operating system itself is fully patched.