[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.

http://bugzilla.ximian.com/show_bug.cgi?id=52811

--- 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: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Wishlist
+Component: Sys.Drawing.
+AssignedTo: rkumar@novell.com                            
+ReportedBy: rkumar@novell.com               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+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? 
+Always.
+
+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)
+System.Drawing.GDIPlus:GdipGetPenTransform
+(intptr,System.Drawing.Drawing2D.Matrix&)
+in [0x00008] (at
+/home/ravi/MONO/src/mcs/class/System.Drawing/System.Drawing/Pen.cs:328)
+System.Drawing.Pen:get_Transform ()
+in <0x00050> (wrapper remoting-invoke-with-check)
+System.Drawing.Pen:get_Transform ()
+in [0x00095] (at
+/home/ravi/MONO/src/mcs/class/System.Drawing/Test/System.Drawing/T.cs:8)
+.T:Main ()
+[ravi@ravi System.Drawing]$