I sometimes got some AccessViolationException from System.Drawing.dll. It
doesn't happen everytime but it happens like once a day. Is it a known issue
in .NET 2.0? I've never got this kind of exception in .NET 1.1 (even NullReferenceException)
System.AccessViolationException: Attempted to read or write protected memory.
This is often an indication that other memory is corrupt.
at System.Drawing.SafeNativeMethods.Gdip.GdipDrawImagePointsRectI(HandleRef
graphics, HandleRef image, HandleRef points, Int32 count, Int32 srcx, Int32
srcy, Int32 srcwidth, Int32 srcheight, Int32 srcunit, HandleRef imageAttributes,
DrawImageAbort callback, HandleRef callbackdata)
at System.Drawing.Graphics.DrawImage(Image image, Point[] destPoints,
Rectangle srcRect, GraphicsUnit srcUnit, ImageAttributes imageAttr, DrawImageAbort
callback, Int32 callbackData)
at System.Drawing.Graphics.DrawImage(Image image, Point[] destPoints,
Rectangle srcRect, GraphicsUnit srcUnit, ImageAttributes imageAttr)
at DevExpress.XtraBars.Painters.PaintHelper.DrawImageCore(Graphics g,
Image image, Int32 x, Int32 y, Int32 width, Int32 height, Rectangle srcRect,
ImageAttributes attr)
at DevExpress.XtraBars.Painters.PrimitivesPainter.DrawLinkImage(BarLinkPaintArgs
e, Rectangle r, ImageAttributes attr, Image image, BarLinkState state)
at DevExpress.XtraBars.Painters.BarLinkPainter.DrawLinkImageCore(BarLinkPaintArgs
e, Rectangle r, BarLinkState state, ImageAttributes attr)
at DevExpress.XtraBars.Painters.BarLinkPainter.DrawLinkNormalGlyph(BarLinkPaintArgs
e, Boolean lighter)
at DevExpress.XtraBars.Painters.BarLinkPainter.DrawLinkNormal(BarLinkPaintArgs
e)
at DevExpress.XtraBars.Painters.BarLinkPainter.DrawLinkHorizontal(BarLinkPaintArgs
e)
at DevExpress.XtraBars.Painters.BarLinkPainter.DrawLink(BarLinkPaintArgs
e)
at DevExpress.XtraBars.Painters.BarLinkPainter.Draw(GraphicsInfoArgs e,
CustomViewInfo info, Object sourceInfo)
at DevExpress.XtraBars.Painters.BarPainter.DrawLink(GraphicsInfoArgs e,
BarLinkViewInfo item)
at DevExpress.XtraBars.Painters.BarPainter.Draw(GraphicsInfoArgs e, CustomViewInfo
info, Object sourceInfo)
at DevExpress.XtraBars.Controls.CustomControl.DirectDraw(PaintEventArgs e)
at DevExpress.XtraBars.Controls.CustomControl.OnPaint(PaintEventArgs e)
at System.Windows.Forms.Control.PaintWithErrorHandling(PaintEventArgs
e, Int16 layer, Boolean disposeEventArgs)
at System.Windows.Forms.Control.WmPaint(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at DevExpress.XtraBars.Controls.DockedBarControl.WndProc(Message& msg)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg,
IntPtr wparam, IntPtr lparam)
System.AccessViolationException: Attempted to read or write protected memory.
This is often an indication that other memory is corrupt.
at System.Drawing.SafeNativeMethods.Gdip.GdipCreateImageAttributes(IntPtr&
imageattr)
at System.Drawing.Imaging.ImageAttributes..ctor()
at System.Windows.Forms.ControlPaint.DrawImageDisabled(Graphics graphics,
Image image, Rectangle imageBounds, Color background, Boolean unscaledImage)
at System.Windows.Forms.ButtonInternal.ButtonBaseAdapter.DrawImageCore(Graphics
graphics, Image image, Rectangle imageBounds, Point imageStart, LayoutData
layout)
at System.Windows.Forms.ButtonInternal.ButtonBaseAdapter.DrawImage(Graphics
graphics, LayoutData layout)
at System.Windows.Forms.ButtonInternal.ButtonStandardAdapter.PaintWorker(PaintEventArgs
e, Boolean up, CheckState state)
at System.Windows.Forms.ButtonInternal.ButtonStandardAdapter.PaintUp(PaintEventArgs
e, CheckState state)
at System.Windows.Forms.ButtonInternal.ButtonBaseAdapter.Paint(PaintEventArgs
pevent)
at System.Windows.Forms.ButtonBase.OnPaint(PaintEventArgs pevent)
at System.Windows.Forms.Control.PaintWithErrorHandling(PaintEventArgs
e, Int16 layer, Boolean disposeEventArgs)
at System.Windows.Forms.Control.WmPaint(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.Button.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg,
IntPtr wparam, IntPtr lparam)
System.AccessViolationException: Attempted to read or write protected memory.
This is often an indication that other memory is corrupt.
at System.Drawing.SafeNativeMethods.Gdip.GdipFillRectangleI(HandleRef
graphics, HandleRef brush, Int32 x, Int32 y, Int32 width, Int32 height)
at System.Drawing.Graphics.FillRectangle(Brush brush, Int32 x, Int32 y,
Int32 width, Int32 height)
at System.Drawing.Graphics.FillRectangle(Brush brush, Rectangle rect)
at DevExpress.Utils.Win.Shadow.OnPaint(PaintEventArgs e)
at System.Windows.Forms.Control.PaintWithErrorHandling(PaintEventArgs
e, Int16 layer, Boolean disposeEventArgs)
at System.Windows.Forms.Control.WmPaint(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at System.Windows.Forms.ContainerControl.WndProc(Message& m)
at System.Windows.Forms.Form.WndProc(Message& m)
at DevExpress.Utils.Win.TopFormBase.WndProc(Message& m)
at DevExpress.Utils.Win.Shadow.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg,
IntPtr wparam, IntPtr lparam)