相关疑难解决方法(0)

当.NET应用程序因System.AccessViolation异常而崩溃时,它意味着什么?

应用程序本身长度为2000行,因此在此处粘贴代码是没有意义的,特别是因为其中一个用户收到的异常没有给出关于我的代码的哪个部分导致问题的任何提示.

顺便说一句,该应用程序只是一个带有datagridview的Windows窗体,通常显示的行数不超过几百行,还有一些其他控件.在它崩溃之前,它正在非常缓慢地加载datagridview的每一行的单元格.(但没有其他用户遇到过同样的问题.)

例外文本如下.有人可以查看它并告诉我它是由我的代码出错的东西引起的,还是可能与遇到此异常的用户的特定设置不兼容?

我注意到下面的描述说内存已损坏.这是否意味着用户的计算机有坏RAM?

  ************** Exception Text **************
  System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
     at System.Drawing.SafeNativeMethods.Gdip.GdipDrawRectangleI(HandleRef graphics, HandleRef pen, Int32 x, Int32 y, Int32 width, Int32 height)
     at System.Drawing.Graphics.DrawRectangle(Pen pen, Int32 x, Int32 y, Int32 width, Int32 height)
     at System.Windows.Forms.ControlPaint.DrawFlatCheckBox(Graphics graphics, Rectangle rectangle, Color foreground, Brush background, ButtonState state)
     at System.Windows.Forms.ControlPaint.DrawFlatCheckBox(Graphics graphics, Rectangle rectangle, ButtonState state)
     at System.Windows.Forms.ControlPaint.DrawCheckBox(Graphics graphics, Int32 x, Int32 y, Int32 width, Int32 height, ButtonState …
Run Code Online (Sandbox Code Playgroud)

.net c# forms exception

4
推荐指数
1
解决办法
2156
查看次数

标签 统计

.net ×1

c# ×1

exception ×1

forms ×1