[Mono-bugs] [Bug 52811][Wis] New - Pen.Transform property does not work.

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Tue, 13 Jan 2004 01:29:22 -0500 (EST)

Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by rkumar@novell.com.


--- shadow/52811	2004-01-13 01:29:22.000000000 -0500
+++ shadow/52811.tmp.32368	2004-01-13 01:29:22.000000000 -0500
@@ -0,0 +1,78 @@
+Bug#: 52811
+Product: Mono/Class Libraries
+Version: unspecified
+OS Details: 
+Status: NEW   
+Priority: Wishlist
+Component: Sys.Drawing.
+AssignedTo: rkumar@novell.com                            
+ReportedBy: rkumar@novell.com               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+Summary: Pen.Transform property does not work.
+Description of Problem:
+When I try to set Pen.Transform my program does not terminate, and when I
+try to get the Pen.Transform value, I get NullReferenceException.
+Steps to reproduce the problem:
+1. Compile and run the following program with/without following correction
+2. Comment pen.Transform = new Matrix(); statement. and uncomment Matrix m
+= pen.Transform; statement.
+using System;
+using System.Drawing;
+using System.Drawing.Drawing2D;
+public class T {
+       public static void Main() {
+           Pen pen = new Pen(Color.Red);
+      //Matrix m = pen.Transform; // throws exception
+      pen.Transform = new Matrix(1,0,0,1,0,0); // does not terminate
+  }
+Actual Results:
+1. Program does not terminate and hangs.
+2. NullRef exception is thrown.
+Expected Results:
+Property must be readable and writable.
+How often does this happen? 
+Additional Information:
+/************** Exception stack trace for setting the property ********/
+[ravi@ravi System.Drawing]$ mono --debug T.exe
+Unhandled Exception: System.NullReferenceException: A null value was found
+where an object instance was required
+in (unmanaged) (wrapper managed-to-native)
+System.Object:__icall_wrapper_helper_memcpy (intptr,intptr,int)
+in <0x00004> (wrapper managed-to-native)
+System.Object:__icall_wrapper_helper_memcpy (intptr,intptr,int)
+in <0x00078> (wrapper managed-to-native)
+in [0x00008] (at
+System.Drawing.Pen:get_Transform ()
+in <0x00050> (wrapper remoting-invoke-with-check)
+System.Drawing.Pen:get_Transform ()
+in [0x00095] (at
+.T:Main ()
+[ravi@ravi System.Drawing]$