The memory could not be written error - gHacks Tech News

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:

  1. attrib -r -h -s boot.ini
  2. edit boot.ini
  3. Look for /NoExecute Optin or /NoExecute Optout and change that to /NoExecute AlwaysOff
  4. Save the edited file
  5. type attrib +h +r +s boot.ini
  6. 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.

We need your help

Advertising revenue is falling fast across the Internet, and independently-run sites like Ghacks are hit hardest by it. The advertising model in its current form is coming to an end, and we have to find other ways to continue operating this site.

We are committed to keeping our content free and independent, which means no paywalls, no sponsored posts, no annoying ad formats or subscription fees.

If you like our content, and would like to help, please consider making a contribution:

Comments

  1. Tobey said on May 10, 2007 at 3:44 pm
    Reply

    2. edit boot.ini

  2. Iain Cheyne said on May 10, 2007 at 5:03 pm
    Reply

    Were you getting this in all video players? It only happens if the video player is badly coded and is breaking Microsoft security guidelines. You might be better off switching video players, rather than disabling DEP. Which player are you using?

    You might be better off enabling DEP on everything. It stops a lot of serious security vulnerabilities.

  3. Martin said on May 10, 2007 at 5:08 pm
    Reply

    I’m using VLC

  4. Iain Cheyne said on May 11, 2007 at 8:48 am
    Reply

    That’s weird. I alway thought of VLC as a well coded application and I could not find any mention of problems like this on the VLC forums.

    It might be better to exclude VLC from DEP, rather than disabling it completely:

    http://support.microsoft.com/kb/875351

  5. Iain Cheyne said on May 14, 2007 at 2:01 pm
    Reply

    This is probably a problem with a codec, maybe an old version of DivX.

    http://www.theinquirer.net/default.aspx?article=17862
    http://www.theinquirer.net/default.aspx?article=17782

  6. coonanuk said on June 17, 2007 at 9:48 am
    Reply

    ive tryed 2 get rid ov the memory carnt be written error by your way and i carnt find the 3rd command ov trying to find the noexecute option can u help me

  7. Martin said on June 17, 2007 at 10:20 am
    Reply

    coonanuk you can’t find the boot.ini or a command there ? please explain in more detail

  8. divyesh said on January 29, 2008 at 6:18 am
    Reply

    I am having same issue with windows media player 9 (Win XP sp2). It was already /noexecute=AlwaysOff and still having this problem.

    I think it may have some problem with direct x and all that.

    Help me out. Thank you.

  9. thecerealpoet said on February 10, 2008 at 7:31 am
    Reply

    Generally speaking, if you don’t know why you’re getting an error message, you shouldn’t start undoing security features trying to make it go away.

    To fix this error you need to uninstall the codec that is causing the problem (perhaps K-Lite, Pinnacle, or Angel).

    Then install the VLC player, so that you don’t have to futz with codecs anymore.

    Simple and secure. I hope this helps.

  10. Ed said on February 10, 2008 at 7:46 am
    Reply

    When you edit boot.ini, scroll allll the way to the right.

  11. Asian Virus said on March 23, 2008 at 4:32 pm
    Reply

    i get this problem but the message appears when i try to open my itunes folder.

    My downloads automatically save in this folder but when i try to get to them the message appears and all the windows close. I am left back on the desktop. Icould try again but then im just left brought back again!

    Pleaaaaz help!!!!!

  12. Basel said on May 29, 2008 at 4:42 pm
    Reply

    I have facing the same problem

    even i play a .wmv file not only .avi file..

    How can i fix this?
    I have tried all the solutions available… but nothing help…

    Can you help me please…!!

  13. Jitesh Sojitra said on June 25, 2008 at 8:22 am
    Reply

    Hi,

    I was getting this error continuously but after doing above changes, it worked for me.

    Thanks a lot!

    Jitesh Sojitra

  14. Nicholas said on August 22, 2008 at 9:44 am
    Reply

    Hi there,

    I faced the memory could not be written problem when i want to do disk clean-up. What are the steps that i should take?

    I have tried

    1. start > run
    2. type cmd
    3. type cd
    4. type attrib -r -h -s boot.ini

    Unfortunately the file boot.ini does not exist.

    Please guide.

  15. p1tagora said on November 22, 2008 at 8:15 pm
    Reply

    I have this problem too on a Windows XP SP2 operating system but it occurs when i log in windows. I don’t get the chance to do anything, it just says “The instruction at ‘0x0106d57c’ referenced memory at ‘0x0106d57c’. The memory could not be ‘written’. Cancel to debug the program. Ok to continue the program”. But no matter what i choose the system restarts…and so on..
    And I use bsplayer as my video player..do you think it’s related to that?

  16. Nikolai said on November 26, 2008 at 9:44 am
    Reply

    I tried that before I understood that I should be absolutely sure that this is the problem. With me the problem looks more like the problem of p1tagora, because when I open Windows Explorer for any reason, it just gets me out, writing this message with “0x00000000” at the second part. Is it possible to be connected to lack of enough space on my HDD? I tried to do the above, but it didn’t help. with me the file was “boot.ini.backup” and I changed it to AlwaysOff, but it didn’t help! Please, help me!

    Nikolai

  17. Mark said on December 29, 2008 at 11:33 am
    Reply

    After installing and using an audio editing (Celemony Melodyne) program last week I was greeted with the same problem 2 nights ago when I went back to work with it again. “The instruction at “0x052964ca” referenced memory at “0x00000000″, The memory could not be written.” I first “Excepted” Melodyne from DEP within the “System Properties” without success, then I performed the above DEP disable routine, but the same fault persists. Next? (Windows XP HE)

  18. Craig said on February 6, 2009 at 3:33 am
    Reply

    This application has encountered a critical error:

    ERROR #132 (0x85100084) Fatal Exception
    Program: C:Program FilesWorld of WarcraftWoW.exe
    Exception: 0xC0000005 (ACCESS_VIOLATION) at 001B:007937D6

    The instruction at “0x007937D6” referenced memory at “0x41B66B60”.
    The memory could not be “written”

    I am getting the same sort of issue after about 30 minutes of playing any computer game on my PC. I have removed one stick of ram at a time, yet the problem persists. Unless both sticks are faulty, i’d rule that out as being the cause. Does anyone have any ideas?

    cheers,

  19. adel said on February 20, 2009 at 8:09 am
    Reply

    Thanks a lot
    I was facing this problem
    I exactely applied what you mentioned
    It works fine
    Thanks again
    Adel

  20. V for Vendetta said on April 19, 2009 at 8:06 am
    Reply

    I was getting this error with a lot of applications. Now everything is solved by this. Thanks a lot.

  21. Fran said on April 24, 2009 at 12:52 pm
    Reply

    Hi,

    I did a clone copy of my hard drive onto a new hard drive and ive been getting these memory problems since then with the new hdd. It never happened on the old hard drive but it happens all the time on the new hard drive with most applications, usually when i exit out of them but sometimes the programs cause very high cpu usage, dont know why though, its supposed to be a clone copy so nothing is different other than the size of my new hdd which is 250GB, the old one was 100GB.

    The clone copy was done with Acronis Disk Imager.

    Just wondering what could have caused these errors to begin appearing in the first place? Very strange, i’ll try your fix anyway but i’d be a little worried about disabling DEP altogether!

  22. Prashant Wagh said on April 29, 2009 at 10:33 am
    Reply

    I was facing this problem,
    Previously our h/w eng. suggest to format the System.
    I did as you mentioned.
    It works.

    Thanks a lot

  23. Edwin R. said on June 11, 2009 at 3:40 am
    Reply

    It worked like a charm 2 years later! :) thanks!

  24. sam said on July 9, 2009 at 9:02 pm
    Reply

    oh, i wanted to make it clear that to navigate to “C:\”, you type “cd” and then your directory. cd means “Change Directory”.

  25. Eduardo said on July 17, 2009 at 1:43 am
    Reply

    This worked for me. Thanks a lot!

  26. Jethro said on August 3, 2009 at 11:56 am
    Reply

    Ja, I Tried All That, Still Doesn’t Work.

    Is There Anything Else I Can Do? Please Help

  27. Richard Owen said on August 4, 2009 at 12:08 pm
    Reply

    worked fine for me – thankyou very much

  28. hop3r said on August 8, 2009 at 12:45 am
    Reply

    so its already noexcute=alwaysoff on my pc

  29. Sinem said on August 18, 2009 at 12:31 pm
    Reply

    i really need help with my computer, because i can’t really use it right
    now.. every time i try to log in, i get this error message : Explorer.EXE –
    Application Error. The application failed to initialize properly
    (0xc0000033). Click on OK to terminate the application. And then, when i
    clicked on OK, nothing happened. Windows doesn’t load anything anymore. So,
    there is no taskbar, no desktop icons, nothing. I basicly cannot use my
    computer. The only thing that works is Ctrl+Alt+Del combination keys, which
    let me shut down the computer again. Can anyone help me with this? i would
    really appreciate for your help..

  30. Sinem said on August 18, 2009 at 12:33 pm
    Reply

    and it also says: the memory could not be written. i need your help. please.

  31. nagesh said on October 8, 2009 at 10:08 am
    Reply

    i cannot able to install mcafee antivirus. if i click on setup file “the instruction at “0x008b2bc0” referenced memory at “0x008b2bc0”. the memory could not be “written”.like this it is showing.what to do?

  32. Gena said on October 10, 2009 at 1:08 pm
    Reply

    The same problem I have with any of browsers, I can not use nor Firefox, nor Google chrome, all the time this fatal error with memory. So I hope this will helps, now will restart computer and see ))))

  33. Mayur Agrawal said on October 12, 2009 at 2:23 pm
    Reply

    Hii..i am also facing a similar problem in which a memory location cannot be referenced.. please advice what should i do ??

  34. Daniel said on October 17, 2009 at 7:00 am
    Reply

    my girlfriends computer was doing this every time she opened a web browser. i followed your directions and its cured, thanks so much.

    for the people that cant get it to work, make sure you type exactly what he says… i was having trouble because i was typing “cd” and not “cd..” (third step) you have to type it a few times too.

  35. Jonathon said on January 15, 2011 at 5:07 pm
    Reply

    Do I keep typing cd and then hit enter or hit cd multiple times until boot.ini pops up?

    I have done both and neither seem to work.

    1. Martin said on January 15, 2011 at 5:25 pm
      Reply

      You type cd.. and hit enter, look at the path, if it is not c:\ you need to repeat the step.

  36. Jonathon said on January 16, 2011 at 3:45 am
    Reply

    Do you have to hit enter after entering attrib -r -h -s boot.ini? Because when I do, it says that the file can’t be found.

    1. Martin said on January 16, 2011 at 10:52 am
      Reply

      Yes you have to. If the file cannot be found you are not in the right location.

  37. David said on June 15, 2011 at 3:44 pm
    Reply

    I have done attrib -r -h -s boot.ini and it says the file is not found. I have also changed the directory so I am in C:\ yet it still is not working. Would it be listed in a different location on Windows 7?

  38. Pelle said on March 14, 2012 at 11:49 pm
    Reply

    It worked. We had this problem on all our Terminal Servers.

  39. Baldguy said on September 6, 2012 at 7:26 pm
    Reply

    Finally able top update my XP Virtualbox machine! Thanks…

Leave a Reply

Check the box to consent to your data being stored in line with the guidelines set out in our privacy policy

Please note that your comment may not appear immediately after you post it.