Visual studio 2010 从Visual Studio内部运行应用程序时的AccessViolationException(或SehexException或ExecutionEngineeException)
从最近开始,我现在从VisualStudio2010内部获得了WinForms应用程序大多数初创公司的Visual studio 2010 从Visual Studio内部运行应用程序时的AccessViolationException(或SehexException或ExecutionEngineeException),visual-studio-2010,virtualbox,access-violation,Visual Studio 2010,Virtualbox,Access Violation,从最近开始,我现在从VisualStudio2010内部获得了WinForms应用程序大多数初创公司的AccessViolationExceptions,导致它中止 但是做一个Ctrl-F5而不是通常的F5可以解决我的问题,也就是说,这与 下面是这样一个异常的示例,但它们也附带了各种其他堆栈跟踪,而不仅仅是这一个: System.AccessViolationException: Attempted to read or write protected memory. This is often
AccessViolationException
s,导致它中止
但是做一个Ctrl-F5而不是通常的F5可以解决我的问题,也就是说,这与
下面是这样一个异常的示例,但它们也附带了各种其他堆栈跟踪,而不仅仅是这一个:
System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
at System.Environment.get_TickCount()
at System.EventHandler.Invoke(Object sender, EventArgs e)
at System.Windows.Forms.Form.OnLoad(EventArgs e)
at System.Windows.Forms.Form.OnCreateControl()
at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
at System.Windows.Forms.Control.CreateControl()
at System.Windows.Forms.Control.WmShowWindow(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at System.Windows.Forms.ContainerControl.WndProc(Message& m)
at System.Windows.Forms.Form.WmShowWindow(Message& m)
at System.Windows.Forms.Form.WndProc(Message& m)
at OurApp.BaseForm.WndProc(Message& m)
at OurApp.OtherForm.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
顺便说一句,再次启动时,我有一个完全相同的堆栈跟踪,但有一个
System.Runtime.InteropServices.SEHException: External component has thrown an exception.
而不是AccessViolationException。但是总的来说,AccessViolationException比sehexException更频繁
更新同时,我有时会得到ExecutionEngineeException
s而不是上面的
我正在运行64位Windows 7(在VirtualBox中)。安装所有Windows更新,包括Visual Studio 2010 SP1,以防万一,并没有解决此问题
有没有关于这可能是什么或者如何深入研究的想法?这是VirtualBox的一个问题。本机运行应用程序是可以的,在VMWare Player中运行应用程序也是可以的。在VirtualBox中:问题中列出的3个例外之一
我无法让VirtualBox(最新版本,4.1.12,在64位linux下的i5主机上运行)正常工作,尝试了上建议的各种设置。现在,VMWare Player也是如此。我的问题也是VirtualBox造成的。根据Eugene Beresovksy的显著答案,有几件事提到:
- 基本操作系统:Windows 7 x64
- 虚拟化主机:VirtualBox 4.2.6 r82870
- 来宾操作系统:Windows 7 Ultimate x86
- Visual Studio 2010 10.0.30319.1 RTMRel
希望这有帮助。Brr,这太糟糕了。这只是对本机Windows GetTickCount()api函数的调用。丢失虚拟箱,看看会发生什么。@HansPassant+1很好的猜测,虚拟机似乎与此问题有关。在回答中总结了我目前的发现。看起来这是一个VirtualBox bug。以上内容对我来说不起作用,但在修复VB之前,VirtualBox的测试版本是可用的: