[Mono-bugs] [Bug 81709][Min] Changed - [WIN32] OutOfMemoryException resizing form a lot

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Tue May 22 17:39:17 EDT 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.


--- shadow/81709	2007-05-22 17:09:54.000000000 -0400
+++ shadow/81709.tmp.18697	2007-05-22 17:39:17.000000000 -0400
@@ -4,19 +4,18 @@
 OS: unknown
 OS Details: Windows XP SP2
 Status: NEW   
 Severity: Unknown
 Priority: Minor
-Component: Sys.Drawing.
+Component: Windows.Forms
 AssignedTo: mono-bugs at ximian.com                            
 ReportedBy: gert.driesen at pandora.be               
 QAContact: mono-bugs at ximian.com
 TargetMilestone: ---
 Summary: [WIN32] OutOfMemoryException resizing form a lot
 When rapidly resizing a form for while (by dragging the sizing grip to all 
 corners of the screen), the following exception is reported:
 System.OutOfMemoryException: Not enough memory to complete operation [GDI+ 
@@ -46,6 +45,20 @@
 after that.
 I was only able to reproduce it with the "smaller" repro attached to bug 
 Have fun ;-)
+------- Additional Comments From sebastien at ximian.com  2007-05-22 17:39 -------
+Graphics.FromHdc is a simple call/check on top of GdipCreateFromHDC. 
+On Win32 it means MS GDI+ return an OutOfMemory error code. This can
+occurs if a GpGraphics cannot be allocated (well I guess ;-) or if the
+HDC is NULL (unit tested, to be committed and fixed in libgdiplus). 
+My guess is the later... so I'm moving this to the caller, MWF ;-)
+Anyway it would be useful to run mono with --debug and with
+--trace=M:System.Drawing.GDIPlus:GdipCreateFromHDC to see if I'm right
+about the HDC being NULL.

More information about the mono-bugs mailing list