Kinect SDK corrupt memory error

霸气de小男生 提交于 2019-12-29 07:53:16

问题


I have made a program in XNA using Kinect SDK. The program is running perfectly fine in my pc, and many of other PC's, but in one system when I open this program it gives me the following error:

 Attempted to read or write protected memory. This is often an indication that other memory is corrupt. 

The program stops and it gives me the error message in spritebatch.End().

I am unable to understand why its giving me this error message.

The system I am using has 4GB Ram, and the system which is creating the problem has 2GB RAM. Both systems are CORE2 Duo. Is the memory the issue or is it something else?


回答1:


Yes this could be a memory issue. Take a look at the answer in http://social.msdn.microsoft.com/Forums/en-US/71f134bd-d665-43b5-8c67-52c4d6ed4ed9/kinect-driver-problem?forum=kinectsdknuiapi. Restart the system, stop all unnecessary processes (to minimize memory usage) then try running the program again.




回答2:


I had this exact issue. Hopefully this helps someone in the future. My membership project (which contains classes only) was built for 32bit and my app consuming them for 64bit. Made sure both are 32bit and issue resolved.




回答3:


Worked like a charm for me.

Anyway, the solution was to enable JIT optimization. In other words, in Visual Studio 2008 choose “Tools” and then “Options”. Select “Debugging” and “General” and find the line that says “Suppress JIT optimization on module load”. This kind of makes sure that the debugger and the JIT compiled code aren’t running out of sync because the JIT compiler is such a super duper optimizer of your code. This did the trick.

http://dennis.bloggingabout.net/2009/06/08/attempted-to-read-or-write-protected-memory-in-a-net-application/




回答4:


In my case, I was using a Virtual Machine (VM). After googling I figured that the VM does not have enough RAM available. Increasing the available RAM for the VM fixed it.



来源:https://stackoverflow.com/questions/22293032/kinect-sdk-corrupt-memory-error

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!