【发布时间】:2010-09-15 18:53:08
【问题描述】:
我有一个使用内置网络浏览器控件的程序。在使用它的某个时候,我不确定在什么时候,但它似乎是随机的,我收到以下错误:
System.AccessViolationException
FullText = System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.Run(Form mainForm)
有没有人知道我为什么会得到这个以及如何预防它?
【问题讨论】:
-
如果有人为此找到一致的解决方案,请告诉我,我会接受的。我通过在应用程序之外打开浏览器而不是浏览器控件来解决它。
-
有没有办法将问题的所有权转让给其他人?我不再在这个系统上工作,因此永远不会在这里接受答案......