I recently encountered OverflowException in GDI + with a third-party tool that causes me several problems. I am trying to find out the cause of this and then decide if there is any solution to the problem.
The error occurs in SafeNativeMethods.Gdip.GdipFillPath (), returning an error code of 11, which is equal to GpStatus.ValueOverflow. I have no idea what this means or what could be causing this. The consequences are quite large, because I have a large screen area that cannot be drawn.
Stack trace for this error:
System.OverflowException Error: Overflow Error. in System.Drawing.Graphics.CheckErrorStatus (status Int32) in System.Drawing.Graphics.FillPath (brush, GraphicsPath path) in Northwoods.GoShape.DrawPath (g graphics, GoView, Pen, brush, GraphicsPath) Northwoods.GoRoundedRectangle.Paint (Graphics g, GoView) in Northwoods.GoLayer.Paint (Graphics g, GoView, RectangleF clipRect) in Northwoods.GoView.PaintObjects (Boolean doc, Boolean view, Graphics g, RectangleF clipRect) in Northwoods. GoView.PaintView (Graphics g, RectangleF clipRect) in Northwoods.GoView.onPaintCanvas (PaintEventArgs evt) in Northwoods.GoView.OnPaint (PaintEventArgs evt) in System.Windows.Forms.Control.PaintWithErrorHandling (PaintEventArgs e, IntAranEventsBlayer, ) in System.Windows.Forms.Control.WmPaint (Message & m) in System.Windows.Forms.Control.WndProc (Message & m) in System.Windows.Forms.Control.ControlNativeWindow.OnMessage (Message & m) in System.Windows.Forms.Control.ControlNativeWindow.WndProc (Message & m) in System.Windows.Forms.NativeWindow.Callback (IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
, , 2 , . , , . , , Disposed, Brush propety, , . , , .
public Brush
{
get {
return MappingLinearGradient(this.Bounds).Clone();
}
}