[Mono-bugs] [Bug 80316][Maj] Changed - Graphics.TranslateTransform generating exception (instance disposed)

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Tue Dec 19 13:55:01 EST 2006

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 sebastien at ximian.com.


--- shadow/80316	2006-12-19 12:25:57.000000000 -0500
+++ shadow/80316.tmp.17133	2006-12-19 13:55:01.000000000 -0500
@@ -1,23 +1,23 @@
 Bug#: 80316
 Product: Mono: Class Libraries
 Version: 1.2
-OS: Windows XP
-OS Details: XP, SP2
+OS: All
+OS Details: 
 Status: NEW   
+Severity: Unknown
 Priority: Major
-Component: Sys.Drawing.
+Component: Windows.Forms
 AssignedTo: mono-bugs at ximian.com                            
 ReportedBy: bcarson at asgoth.com               
 QAContact: mono-bugs at ximian.com
 TargetMilestone: ---
-Summary: Graphics.TranslateTransform generating exception
+Summary: Graphics.TranslateTransform generating exception (instance disposed)
 Description of Problem:
 The attached sample executes correctly in .NET, but generates the 
 following stack trace in Mono:
 Unhandled Exception: System.ArgumentException: Invalid Parameter. A null 
@@ -91,6 +91,62 @@
 <see attached ZIP file>
 ------- Additional Comments From bcarson at asgoth.com  2006-12-19 12:25 -------
 Created an attachment (id=18341)
 Sample application (source and executable) in ZIP format
+------- Additional Comments From sebastien at ximian.com  2006-12-19 13:55 -------
+This also occurs under Linux (and probably any OS). Libgdiplus is
+getting called with a NULL graphic instance (so the exception itself
+is correct). This is (most probably) because the instance has been
+disposed (and the handle nulled).
+Moving to SWF.
+mono --trace=M:System.Drawing.GDIPlus:GdipTranslateWorldTransform
+EXCEPTION handling: FileNotFoundException
+EXCEPTION handling: FileNotFoundException
+EXCEPTION handling: FileNotFoundException
+ENTER: (wrapper managed-to-native)
+-60.000000, -140.000000, 0, )
+LEAVE: (wrapper managed-to-native)
+ENTER: (wrapper managed-to-native)
+60.000000, 140.000000, 1, )
+LEAVE: (wrapper managed-to-native)
+EXCEPTION handling: ArgumentException
+System.ArgumentException: Invalid Parameter. A null reference or
+invalid value was found.
+  at System.Drawing.GDIPlus.CheckStatus (Status status) [0x00000]
+  at System.Drawing.Graphics.TranslateTransform (Single dx, Single dy,
+MatrixOrder order) [0x00000]
+  at (wrapper remoting-invoke-with-check)
+  at RoundedButton.RoundedButton.PaintParentBackground
+(System.Windows.Forms.PaintEventArgs e) [0x00000]
+  at RoundedButton.RoundedButton.OnPaint
+(System.Windows.Forms.PaintEventArgs pe) [0x00000]
+  at System.Windows.Forms.Control.WndProc
+(System.Windows.Forms.Message& m) [0x00000]
+  at System.Windows.Forms.ButtonBase.WndProc
+(System.Windows.Forms.Message& m) [0x00000]
+  at System.Windows.Forms.Button.WndProc
+(System.Windows.Forms.Message& m) [0x00000]
+  at System.Windows.Forms.Control+ControlNativeWindow.WndProc
+(System.Windows.Forms.Message& m) [0x00000]
+  at System.Windows.Forms.NativeWindow.WndProc (IntPtr hWnd, Msg msg,
+IntPtr wParam, IntPtr lParam) [0x00000]
+Note: IIRC (it's been a while) Fx 2.0 has a different dispose strategy
+in PaintEventArgs (I think I did some unit tests for that). Not sure
+if that has been "implemented" in MWF.

More information about the mono-bugs mailing list