System.Drawing.SafeNativeMethods.Gdip.GdipFillRectangleI 1.有可能是加载这个DLL的问题   
 2.控件权限问题

解决方案 »

  1.   

    google不到结果,相关问题http://www.developmentnow.com/g/20_2006_4_0_0_744613/AccessViolationException.htmhttp://stackoverflow.com/questions/4585909/vs2008-crashes-when-switched-to-design-mode-on-very-large-solution
      

  2.   

    1、我不清楚System.Drawing.SafeNativeMethods.Gdip.GdipFillRectangleI 加载的是哪个dll
    2、控制权限问题?不懂,如果是权限问题,那为什么这个错误不是一直出现,而是有时出现有时不出现。
      

  3.   


    应该是.net framework中的private函数。
      

  4.   

    如果是private函数,我直接应该无法访问的,编译的是就会报错,可是我却编译成功了,而且还运行了
      

  5.   

    我的程序在运行时也遇到这样的报错,估计是加载什么dll遇到问题了,但是还未解决,继续寻找问题中。
      

  6.   

    2013-05-08 11:46:08
    出现应用程序未处理的异常/n异常类型:AccessViolationException/n异常消息:尝试读取或写入受保护的内存。这通常指示其他内存已损坏。/n异常位置:   在 System.Drawing.SafeNativeMethods.Gdip.GdipFillRectangleI(HandleRef graphics, HandleRef brush, Int32 x, Int32 y, Int32 width, Int32 height)
       在 System.Drawing.Graphics.FillRectangle(Brush brush, Int32 x, Int32 y, Int32 width, Int32 height)
       在 System.Drawing.Graphics.FillRectangle(Brush brush, Rectangle rect)
       在 System.Windows.Forms.ControlPaint.DrawBackgroundImage(Graphics g, Image backgroundImage, Color backColor, ImageLayout backgroundImageLayout, Rectangle bounds, Rectangle clipRect, Point scrollOffset, RightToLeft rightToLeft)
       在 System.Windows.Forms.Control.PaintBackground(PaintEventArgs e, Rectangle rectangle, Color backColor, Point scrollOffset)
       在 System.Windows.Forms.Control.PaintBackground(PaintEventArgs e, Rectangle rectangle)
       在 System.Windows.Forms.Control.OnPaintBackground(PaintEventArgs pevent)
       在 System.Windows.Forms.ScrollableControl.OnPaintBackground(PaintEventArgs e)
       在 System.Windows.Forms.Control.PaintWithErrorHandling(PaintEventArgs e, Int16 layer, Boolean disposeEventArgs)
       在 System.Windows.Forms.Control.WmEraseBkgnd(Message& m)
       在 System.Windows.Forms.Control.WndProc(Message& m)
       在 System.Windows.Forms.ScrollableControl.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)/n
    又出现这个问题了,还是没有解决办法,求高人