我在一个全新的未触动项目中遇到了“访问冲突”错误。我该如何解决? [英] I got an 'Access violation' error on a brand new untouched project. How do I fix this?

查看:89
本文介绍了我在一个全新的未触动项目中遇到了“访问冲突”错误。我该如何解决?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我安装了Visual Studio 2013。我也安装了XNA 4.0,但这并没有引起问题,因为我尝试在不使用XNA模板或XNA代码的情况下创建项目,我也遇到了同样的错误。我在Windows 7 64位上运行它。我创建了一个名为俄罗斯方块攻击的项目。我对代码一无所知,所以它只是模板中给出的所有内容。应该发生的是代码应该运行,我应该得到一个窗口,其内容只是蓝色。我尝试在调试模式下运行它(在发布模式下也是如此),我在输出窗口中得到了这个:



I have Visual Studio 2013 installed. I also have XNA 4.0 installed, but that's not causing the problem since I tried creating a project without using an XNA template or XNA code, and I got this same error. I'm running this on Windows 7 64 bit. I created a project called "Tetris Attack". I did absolutely nothing with the code, so it's just simply everything given in the template. What should happen is the code should run, and I should get a window whose contents are simply the color blue. I tried to run it in debug mode (the same thing happens in release mode), and I got this in the output window:

The program '[5916] Tetris Attack.exe: Program Trace' has exited with code 0 (0x0).

The program '[5916] Tetris Attack.exe' has exited with code -1073741819 (0xc0000005) 'Access violation'.





它没有运行程序。无论我尝试运行什么项目,我都会遇到同样的问题。它给了我一些与输出中的这个问题无关的东西,然后它给了我上面的内容。我该如何解决?如果我在没有调试的情况下启动,代码运行就好了,所以代码一定不会有任何问题。如果你想在输出窗口看到给我的所有东西,你可以在这里找到它: http://stackoverflow.com/questions/22626646/i-got-an-access-violation-error-on-a-brand-new-untouched-project [ ^ ]



更新:我尝试在另一台计算机上安装Visual Studio 2013,并尝试在其上调试各种类型的项目,以及我没有以任何方式遇到过这个问题。它必须与我的电脑有关。有什么人认为的?



It didn't run the program. I get the same problem no matter what project I try to run. It gives me some stuff not relevant to this problem in the output, then it gives me what I have above. How do I fix this? The code runs just fine if I "start without debugging", so there must not be anything wrong with the code. If you want to see everything given to me in the output window, you can find it here: http://stackoverflow.com/questions/22626646/i-got-an-access-violation-error-on-a-brand-new-untouched-project[^]

Update: I tried installing Visual Studio 2013 on a separate computer and tried debugging various types of projects on that, and I have not experienced this problem in any way. It must have something to do with my computer. What does anyone think it is?

推荐答案

我有解决问题的方法。确保以管理员身份运行Visual Studio。



使Visual Studio始终以管理员身份运行:

- 右键单击​​导致Visual的快捷方式工作室。

- 单击属性。

- 转到兼容性选项卡。

- 选中运行此程序为管理员。

- 单击确定。



以管理员身份运行Visual Studio一次:

- 右键单击​​指向Visual Studio的快捷方式。

- 单击以管理员身份运行。
I have the solution to my problem. Make sure you are running Visual studio as an administrator.

To make Visual Studio always run as an administrator:
-Right click the shortcut that leads to Visual Studio.
-Click "Properties".
-Go to the "Compatibility" tab.
-Check the box "Run this program as an administrator".
-Click "OK".

To run Visual Studio as an administrator once:
-Right click the shortcut that leads to Visual Studio.
-Click "Run as administrator".


1 )从应用程序消息看来,你的应用程序将使用一些它不应该使用或不提供访问的内存位置(visual studio具有较少特权模式或应用程序(俄罗斯方块)运行较少特权模式。)



因此可以尝试在管理员模式下运行visual studio。





2)可能是您的应用程序使用的物理位置ome问题。所以我的建议是,如果你在上面的场景中无法重建,你可以尝试重启Visual Studio和机器......
1) It looks like from the application message is that your application is going to use some memory location that it should not going to use or not provided access(visual studio has less privileged mode or application (Tetris) is runnning in less privileged mode.)

so can try with running visual studio in administrator mode.


2)Might be physical location which were used by your application having some problem.So my suggestion is that if u failed to regenerate above scenario u can try with Restarting Visual studio and Machine as well...


这篇关于我在一个全新的未触动项目中遇到了“访问冲突”错误。我该如何解决?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆