[Mono-bugs] [Bug 338233] New: When using Pen.ScaleTransform on a Pen object, the app crashes with ArgumentException

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Wed Oct 31 14:48:39 EDT 2007


           Summary: When using Pen.ScaleTransform on a Pen object, the app
                    crashes with ArgumentException
           Product: Mono: Class Libraries
           Version: 1.2
          Platform: x86
        OS/Version: Ubuntu
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: Sys.Drawing.
        AssignedTo: mono-bugs at ximian.com
        ReportedBy: dpldobrev at yahoo.com
         QAContact: mono-bugs at ximian.com
          Found By: DeveloperNet

Description of Problem:

Steps to reproduce the problem:
1. Create a Pen object using the constructor accepting a Color parameter;
2. Call ScaleTransform of the pen, passing some valid values;
3. Call Graphics.DrawLines in the OnPaint method or in the Paint event of some
control, passing the pen and a valid array of System.Drawing.PointF (at least
4. If needed, invalidate or refresh the control to invoke repainting.

Actual Results:
The application crashes with the following stack trace:
Unhandled Exception: System.ArgumentException: A null reference or invalid
value was found [GDI+ status: InvalidParameter]
  at System.Drawing.GDIPlus.CheckStatus (Status status) [0x0009d] in
  at System.Drawing.Graphics.DrawLines (System.Drawing.Pen pen,
System.Drawing.PointF[] points) [0x0003a] in
  at (wrapper remoting-invoke-with-check) System.Drawing.Graphics:DrawLines
(System.Object sender, System.Windows.Forms.PaintEventArgs e) [0x00213] in

Expected Results:
To see a set of drawn lies resembling a chart.

How often does this happen? 

Additional Information:
If ScaleTransform is not used on the object (for example, using a pen from the
System.Drawing.Pens collection), the application does not crash, but the chart,
of course, is not displayed correctly due to the lack of scaling.

Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.

More information about the mono-bugs mailing list