[Mono-bugs] [Bug 80756][Wis] Changed - OutOfMemoryException in System.Drawing.Graphics.ClipBounds

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Thu Feb 8 10:09:05 EST 2007


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.

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

--- shadow/80756	2007-02-07 21:09:37.000000000 -0500
+++ shadow/80756.tmp.12964	2007-02-08 10:09:05.000000000 -0500
@@ -1,23 +1,23 @@
 Bug#: 80756
 Product: Mono: Class Libraries
-Version: unspecified
-OS: 
-OS Details: 
+Version: 1.2
+OS: All
+OS Details: non-windows
 Status: NEW   
 Resolution: 
-Severity: 
-Priority: Normal
-Component: Sys.Drawing.
+Severity: Unknown
+Priority: Wishlist
+Component: libgdiplus
 AssignedTo: mono-bugs at ximian.com                            
 ReportedBy: vlad.dimitrov at gmail.com               
 QAContact: mono-bugs at ximian.com
 TargetMilestone: ---
 URL: 
 Cc: 
-Summary: Crash in System.Drawing.Graphics.ClipBounds
+Summary: OutOfMemoryException in System.Drawing.Graphics.ClipBounds
 
 Please fill in this template when reporting a bug, unless you know what you
 are doing.
 Description of Problem:
 I finally reproduced that bug and figured out the reason for it.
 
@@ -76,6 +76,70 @@
 large as the region but failes.
 
 ------- Additional Comments From vlad.dimitrov at gmail.com  2007-02-07 21:09 -------
 Created an attachment (id=18645)
 Test case to reproduce the problem. Works every time with me.
 
+
+------- Additional Comments From sebastien at ximian.com  2007-02-08 10:09 -------
+It's not a "crash", it an (catchable) exception.
+
+> mono ConsoleApplication.exe
+>>>OnPrintPage called
+>>>matrix element #0 = 2
+>>>matrix element #1 = 0
+>>>matrix element #2 = 0
+>>>matrix element #3 = 2
+>>>matrix element #4 = 0
+>>>matrix element #5 = 0
+
+** (<unknown>:28994): WARNING **: Path conversion requested 0 bytes
+(4194304 x 4194304). Maximum size is 8388608 bytes.
+
+Unhandled Exception: System.OutOfMemoryException: Out of memory.
+  at System.Drawing.GDIPlus.CheckStatus (Status status) [0x00000]
+  at System.Drawing.Graphics.get_ClipBounds () [0x00000]
+  at (wrapper remoting-invoke-with-check)
+System.Drawing.Graphics:get_ClipBounds ()
+  at ConsoleApplication.MyPrintDocument.OnPrintPage
+(System.Drawing.Printing.PrintPageEventArgs e) [0x00000]
+  at System.Drawing.Printing.PrintDocument.Print () [0x00000]
+  at (wrapper remoting-invoke-with-check)
+System.Drawing.Printing.PrintDocument:Print ()
+  at ConsoleApplication.Window1.button1_Clicked (System.Object sender,
+System.EventArgs e) [0x00000]
+  at (wrapper delegate-invoke)
+System.MulticastDelegate:invoke_void_object_EventArgs
+(object,System.EventArgs)
+  at GLib.Signal.voidObjectCallback (IntPtr handle, IntPtr gch) [0x00000]
+  at (wrapper native-to-managed) GLib.Signal:voidObjectCallback
+(intptr,intptr)
+  at <0x00000> <unknown method>
+  at (wrapper managed-to-native) Gtk.Application:gtk_main ()
+  at Gtk.Application.Run () [0x00000]
+  at ConsoleApplication.Program.Main (System.String[] args) [0x00000]
+
+Please always include exception (or crash) log when filling bugs.
+
+This is, like we discussed on IRC, two problems. Filling a single bug
+for multiple issues is a good way to get it only half-solved
+(generally the part not included in the summary doesn't get noticed).
+Please fill a separate issue for steps 1-3 as Mono (matrix) result
+differs from the MS one.
+
+Part 4-6 isn't a bug, it's a design limitation. Our region code is
+either math based (if all region parts are rectangle) or bitmap based
+(when non-rectangular parts are present). Bitmap based region can be
+quite large, possibly too large to fit in memory (e.g. operations done
+on infinity). Applying a matrix to a region will change it's shape to
+a (potentially) non-rectangular one (and transform any
+rectangular-based region to a bitmap-based region).
+
+In some cases, like an empty (identity) matrix or a translation-only
+matrix, the existing code won't convert the region to a bitmap (this
+is what happens in step #4). This isn't, currently, the case for a
+scaling matrix (the result of step #3) but this case could be, like
+the previous one, optimized not to require a convertion. This
+optimization, while not a general solution, would solve your
+particular problem.
+
+Setting the bug priority to wishlist.


More information about the mono-bugs mailing list