VS 2012/2013年AccessViolationException [英] VS 2012 / 2013 AccessViolationException

查看:112
本文介绍了VS 2012/2013年AccessViolationException的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

运行项目(F5)时,在IDE中收到以下异常:

When I run the project (F5) I receive the following exception in IDE:

An unhandled exception of type 'System.AccessViolationException' occurred in System.Windows.Forms.dll
Additional information: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.

堆栈跟踪报告

at System.Windows.Forms.UnsafeNativeMethods.SendMessage(HandleRef hWnd, Int32 msg, IntPtr wParam, IntPtr lParam)
at System.Windows.Forms.Control.SendMessage(Int32 msg, Int32 wparam, IntPtr lparam)
at System.Windows.Forms.Form.UpdateWindowIcon(Boolean redrawFrame)
at System.Windows.Forms.Form.CreateHandle()
at System.Windows.Forms.Control.get_Handle()
at Microsoft.VisualStudio.HostingProcess.HostProc.RunParkingWindowThread()
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()

我从未注意到在没有调试器(CTRL + F5)的情况下运行时会收到相同的异常.这是一个WPF项目,但是在执行App_ctor之前会发生异常,因此这是外部代码,并且我的应用程序代码未开始执行.这种情况偶尔会发生,有时只会发生一次,有时我会运行该项目,并多次获得此消息.然后它不会弹出5-6次运行,然后重新开始.

I have never noticed receiving the same exception when running without debugger (CTRL+F5). This is a WPF project, but exception occurs before the App_ctor is executed, so this is external code, and my application code did not start to execute. This happens sporadically, sometimes it happens only once, and sometimes I run the project and get this message for several times in a roll. Then it does not pop up for 5-6 runs, and then starts again.

任何人都知道为什么会这样吗?我刚刚安装了干净的W8.1 64位VS2013和TFS 2013(尽管我在W8和VS2012上遇到了相同的问题,但并不常见).

Anyone knows why is this happening? I have just installed clean W8.1 64 bit, VS2013 and TFS 2013 (although I had the same problem with W8 and VS2012, but not as often).

推荐答案

此问题似乎已在点网框架更新(4.5.2)中修复. https://connect.microsoft.com/VisualStudio/feedback/details/819552/visual-studio-debugger-throws-accessviolationexception

This issue appears to be fixed in a dot net framework update (4.5.2). https://connect.microsoft.com/VisualStudio/feedback/details/819552/visual-studio-debugger-throws-accessviolationexception

这篇关于VS 2012/2013年AccessViolationException的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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