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

查看:16
本文介绍了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).

推荐答案

此问题似乎已在 dot net framework 更新 (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天全站免登陆