App crash on Paint

We have a custom grid system. Each grid element is made of 4
GoStrokes and a GoRectangle that fills the inside. We use the
GoRectangle to help us with things like MouseOver. We create the
GoRectangle as followed

        _CellBackground = new GoRectangle();
        _CellBackground.Size = this._GridStructure.Size;
        _CellBackground.Position = this._GridStructure.Position;
        _CellBackground.Brush = Brushes.Transparent;
        _CellBackground.Pen = new Pen(Color.Transparent);
        this.InsertBefore(_GridStructure, _CellBackground);

Our app would crash with this stack dump

OnPaint: System.ArgumentException: Invalid parameter used.
at System.Drawing.Graphics.CheckErrorStatus(Int32 status)
at System.Drawing.Graphics.FillRectangle(Brush brush, Single x, Single y, Single width, Single height)
at Northwoods.Go.GoShape.DrawRectangle(Graphics g, GoView
view, Pen pen, Brush brush, Single x, Single y, Single width, Single
height)
at Northwoods.Go.GoRectangle.Paint(Graphics g, GoView view)
at Northwoods.Go.GoGroup.Paint(Graphics g, GoView view)
at Northwoods.Go.GoLayer.Paint(Graphics g, GoView view, RectangleF clipRect)
at Northwoods.Go.GoView.PaintObjects(Boolean doc, Boolean view, Graphics g, RectangleF clipRect)
at Northwoods.Go.GoView.PaintView(Graphics g, RectangleF clipRect)
at Northwoods.Go.GoView.onPaintCanvas(PaintEventArgs evt)
at Northwoods.Go.GoView.OnPaint(PaintEventArgs evt)

This typically happen when we re-activate the GoView ; ie bring it to
the front. We do not override any of the Paint method so
what could cause this “System.ArgumentException: Invalid parameter
used” error?

Odd, when I try this, everything works just fine. There aren't any other GoRectangles in your app? Do you ever modify a Pen or Brush after it has been assigned to such a property on a GoObject? That would be a no-no, since System.Drawing and GDI+ don't allow dynamically modifying pens or brushes.