none
Help! "Memory could not be read/written" error RRS feed

  • 问题

  • have developed an application using visual c++6.0. When I test the plugin on my laptop, it works perfectly well. However, when I test it on my desktop, it usually causes an error called
    "...instruction at...referenced memory... The memory could not be read/written".

    The codes are exactly the same. I have noted that one difference between my laptop and desktop is that my laptop is using FAT32 system and desktop is using NTFS. I don't know whether it is due to file system.

    In the code itself, I have used AfxBeginThread to start two worker threads. I have tried to put the method call that causes the error to the main thread and it works fine. But when I put the method calls in the worker thread, the error always comes out. Seems like the worker thread does not have enough privilege to access??? I am not sure.
    Could anyone help me??

    2008年1月16日 10:14

答案

  • As you said, it should be memory access conflict error, I advise you should check the thread code and prevent access

    resource which main thread is using or add some event/signal to do it.

    2008年1月22日 1:40

全部回复

  • 原来是发在英文论坛的 一直没解决 我翻译一遍

    就是我的一个程序在笔记本上运行没问题 但是台式机上就出问题 老是出现

    "...instruction at...referenced memory... The memory could not be read/written". 的错误提示

     

    我测试了程序 我的程序包含线程threading 是AfxBeginThread 创造的 我如果把引起错误的那些方法呼叫放到主线程里面就没有问题 但是如果我放在子线程就要引起错误

     

    请问这是怎么回事呢 会不会是因为我笔记本用的是FAT32文件格式 台式机用的是NTFS格式呢

    但是引起问题的地方还是那个线程...

    请大家帮助我 谢谢

    2008年1月16日 10:20
  • As you said, it should be memory access conflict error, I advise you should check the thread code and prevent access

    resource which main thread is using or add some event/signal to do it.

    2008年1月22日 1:40
  •  

    用调试器调试一下看看是哪的代码错了。
    2008年2月2日 13:43
  • Possible Reasons that Cause “Memory could not be read or written” Error and How to Fix

    1. Invalid Plug-ins

    In the process of web browsing, many plug-ins can be secretly installed to the computer system, and they are usually difficult to delete. Those plug-ins can easily lead to conflicts with other applications which directly cause the memory read and write errors.

    How to Fix: Remove Invalid plug-ins. Let’s take FireFox for example, launch a firefox windows, click “Tools” , select “Add-ons”, remove unnecessary add-ons and plug-ins. It is also necessary to use a powerful security software to regularly check whether the system is installed a variety of junk software program and plug-ins, if any, clean them in a timely manner.

    2. System Service is malicious modified

    Windows Management Instrumentation service is tightly relevant to the memory read and write operation, which if mistakenly modified or stop will definitely lead to memory read/write failure.

    How to Fix: Manually repair Windows Management Instrumentation service. Here are the detailed steps:

    1) Right click “My Computer” icon on the desktop, select “Manage”, then “Computer Management Computer (local)”, then “Services and Applications”, then “Services”, on the right side area, locate Windows Management Instrumentation service, right click and pause the service.

    2) Locate C:\WINDOWS\system32\wbem\Repository directory and back up all the files in Repository folder, when the backup is completed, clean Repository folder.

    3) Restart your computer, locate Windows Management Instrumentation service as step 1) and right click and start Windows Management Instrumentation service again. This time Windows Management Instrumentation service will be working normally.

    3. Memory read/write associated system files are damaged or missing.

    If your computer is accidently infected with virus or encountered with some mistaken operation and cause the memory read/write associated system files corrupted or missing. It will not be surprised for you to get the “Memory could not be read or written” error warning.

    How to Fix: remove security threats and repair system files.

    1)       Firstly run a full scan with a powerful security software to remove potential security threats. If antivirus software is not capable to remove the infections, you can try a manual removal.

    2)       Use SFC Command to repair corrupted system files. Go to start menu, run “CMD ” without quotation marks, input sfc /scannow in the pop-up command windows and press Enter. This command will scan every corner of your system, once it find any damaged or improper system files, it will pop up a prompt to ask you insert Windows setup disk to extract the correct system files to replace the damaged ones. If the system repair operation is successful, after restart, you will see no more “Memory could not be read or written” error messages.

    4. System memory usage is too high

    We all know that running a large program or game consume considerable system memory resources, if there is not enough memory you may probably get “Memory could not be read or written” error.

    How to Fix: Firstly, restart your computer and close unnecessary applications and turn off background monitoring software. To avoid this error, it is recommended to upgrade the memory in order to expand the effective use of memory space.

    Source: http://blog.teesupport.com/how-to-guide-fix-memory-could-not-be-read-or-written-error/

    2011年8月2日 13:24