System.AccessViolationException: 尝试读取或写入受保护的内存。这通常指示其他内存已损坏。

huanhuantong 2013-02-19 05:08:28
有关调用实时(JIT)调试而不是此对话框的详细信息,
请参见此消息的结尾。

************** 异常文本 **************
System.AccessViolationException: 尝试读取或写入受保护的内存。这通常指示其他内存已损坏。
在 System.Drawing.SafeNativeMethods.Gdip.GdipDrawLineI(HandleRef graphics, HandleRef pen, Int32 x1, Int32 y1, Int32 x2, Int32 y2)
在 System.Drawing.Graphics.DrawLine(Pen pen, Int32 x1, Int32 y1, Int32 x2, Int32 y2)
在 Microsoft.VisualStudio.WebServer.UIComponents.MxMenuItem.OnDrawItem(DrawItemEventArgs e)
在 System.Windows.Forms.MenuItem.WmDrawItem(Message& m)
在 System.Windows.Forms.Control.WmDrawItemMenuItem(Message& m)
在 System.Windows.Forms.Control.WmDrawItem(Message& m)
在 System.Windows.Forms.Control.WndProc(Message& m)
在 System.Windows.Forms.ScrollableControl.WndProc(Message& m)
在 System.Windows.Forms.ContainerControl.WndProc(Message& m)
在 System.Windows.Forms.Form.WndProc(Message& m)
在 Microsoft.VisualStudio.WebServer.UIComponents.MxForm.WndProc(Message& m)
在 Microsoft.VisualStudio.WebServer.WebServerForm_DAL.WndProc(Message& m)
在 System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
在 System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
在 System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


************** 已加载的程序集 **************
mscorlib
程序集版本: 2.0.0.0
Win32 版本: 2.0.50727.3643 (GDR.050727-3600)
基本代码: file:///c:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------
WebDev.WebServer
程序集版本: 9.0.0.0
Win32 版本: 9.0.21022.8
基本代码: file:///C:/Program%20Files/Common%20Files/Microsoft%20Shared/DevServer/9.0/WebDev.WebServer.exe
----------------------------------------
WebDev.WebHost
程序集版本: 9.0.0.0
Win32 版本: 9.0.21022.8
基本代码: file:///C:/WINDOWS/assembly/GAC_32/WebDev.WebHost/9.0.0.0__b03f5f7f11d50a3a/WebDev.WebHost.dll
----------------------------------------
System.Windows.Forms
程序集版本: 2.0.0.0
Win32 版本: 2.0.50727.3645 (GDR.050727-3600)
基本代码: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System
程序集版本: 2.0.0.0
Win32 版本: 2.0.50727.3644 (GDR.050727-3600)
基本代码: file:///C:/WINDOWS/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Drawing
程序集版本: 2.0.0.0
Win32 版本: 2.0.50727.3644 (GDR.050727-3600)
基本代码: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
System.Web
程序集版本: 2.0.0.0
Win32 版本: 2.0.50727.3634 (GDR.050727-3600)
基本代码: file:///C:/WINDOWS/assembly/GAC_32/System.Web/2.0.0.0__b03f5f7f11d50a3a/System.Web.dll
----------------------------------------
System.Configuration
程序集版本: 2.0.0.0
Win32 版本: 2.0.50727.3053 (netfxsp.050727-3000)
基本代码: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Configuration/2.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
System.Xml
程序集版本: 2.0.0.0
Win32 版本: 2.0.50727.3053 (netfxsp.050727-3000)
基本代码: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
WebDev.WebServer.resources
程序集版本: 9.0.0.0
Win32 版本: 9.0.21022.8
基本代码: file:///C:/Program%20Files/Common%20Files/Microsoft%20Shared/DevServer/9.0/zh-CHS/WebDev.WebServer.resources.DLL
----------------------------------------
WebDev.WebHost.resources
程序集版本: 9.0.0.0
Win32 版本: 9.0.21022.8
基本代码: file:///C:/WINDOWS/assembly/GAC_MSIL/WebDev.WebHost.resources/9.0.0.0_zh-CHS_b03f5f7f11d50a3a/WebDev.WebHost.resources.dll
----------------------------------------
System.Web.resources
程序集版本: 2.0.0.0
Win32 版本: 2.0.50727.3053 (netfxsp.050727-3000)
基本代码: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Web.resources/2.0.0.0_zh-CHS_b03f5f7f11d50a3a/System.Web.resources.dll
----------------------------------------
System.Web.RegularExpressions
程序集版本: 2.0.0.0
Win32 版本: 2.0.50727.3053 (netfxsp.050727-3000)
基本代码: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Web.RegularExpressions/2.0.0.0__b03f5f7f11d50a3a/System.Web.RegularExpressions.dll
----------------------------------------
System.Design
程序集版本: 2.0.0.0
Win32 版本: 2.0.50727.3645 (GDR.050727-3600)
基本代码: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Design/2.0.0.0__b03f5f7f11d50a3a/System.Design.dll
----------------------------------------
mscorlib.resources
程序集版本: 2.0.0.0
Win32 版本: 2.0.50727.3643 (GDR.050727-3600)
基本代码: file:///c:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------
System.Data
程序集版本: 2.0.0.0
Win32 版本: 2.0.50727.3053 (netfxsp.050727-3000)
基本代码: file:///C:/WINDOWS/assembly/GAC_32/System.Data/2.0.0.0__b77a5c561934e089/System.Data.dll
----------------------------------------
System.Transactions
程序集版本: 2.0.0.0
Win32 版本: 2.0.50727.3053 (netfxsp.050727-3000)
基本代码: file:///C:/WINDOWS/assembly/GAC_32/System.Transactions/2.0.0.0__b77a5c561934e089/System.Transactions.dll
----------------------------------------
System.EnterpriseServices
程序集版本: 2.0.0.0
Win32 版本: 2.0.50727.3053 (netfxsp.050727-3000)
基本代码: file:///C:/WINDOWS/assembly/GAC_32/System.EnterpriseServices/2.0.0.0__b03f5f7f11d50a3a/System.EnterpriseServices.dll
----------------------------------------
System.Windows.Forms.resources
程序集版本: 2.0.0.0
Win32 版本: 2.0.50727.3053 (netfxsp.050727-3000)
基本代码: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Windows.Forms.resources/2.0.0.0_zh-CHS_b77a5c561934e089/System.Windows.Forms.resources.dll
----------------------------------------

************** JIT 调试 **************
要启用实时(JIT)调试,
该应用程序或计算机的 .config 文件(machine.config)的 system.windows.forms 节中必须设置
jitDebugging 值。
编译应用程序时还必须启用
调试。

例如:

<configuration>
<system.windows.forms jitDebugging="true" />
</configuration>

启用 JIT 调试后,任何无法处理的异常
都将被发送到在此计算机上注册的 JIT 调试器,
而不是由此对话框处理。






****************
谁知道怎么解决吗
...全文
413 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
  • 打赏
  • 举报
回复
在哪里画线的时候出错的。debug下吧。
huanhuantong 2013-02-19
  • 打赏
  • 举报
回复
可是这边根本看不出来哪里出现错误呀 突然就出来了呀
真相重于对错 2013-02-19
  • 打赏
  • 举报
回复
引用 2 楼 huanhuantong 的回复:
那要怎么解决呢
无代码无真相
huanhuantong 2013-02-19
  • 打赏
  • 举报
回复
那要怎么解决呢
真相重于对错 2013-02-19
  • 打赏
  • 举报
回复
Graphics 应该有问题了

110,566

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 C#
社区管理员
  • C#
  • Web++
  • by_封爱
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

让您成为最强悍的C#开发者

试试用AI创作助手写篇文章吧