[Mono-bugs] [Bug 368492] New: OutOfMemoryException when using ToolStrip with Icons

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Sun Mar 9 06:48:02 EDT 2008


https://bugzilla.novell.com/show_bug.cgi?id=368492


           Summary: OutOfMemoryException when using ToolStrip with Icons
           Product: Mono: Class Libraries
           Version: SVN
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: Sys.Drawing.
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: andyhume32 at yahoo.co.uk
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---


Created an attachment (id=199684)
 --> (https://bugzilla.novell.com/attachment.cgi?id=199684)
Repro binary

Occurs in SVN, but not in 1.9 or 1.2.6.

The following exception occurs when using Icons on a ToolStrip in a WinForms
app.

[[
Unhandled Exception: System.OutOfMemoryException: Not enough memory to complete
operation [GDI+ status: OutOfMemory]

at System.Drawing.GDIPlus.CheckStatus (System.Drawing.Status) [0x000be] in
System.Drawing\System.Drawing\gdipFunctions.cs:222
at System.Drawing.Graphics.DrawImage
(System.Drawing.Image,System.Drawing.Rectangle,int,int,int,int,System.Drawing.GraphicsUnit,System.Drawing.Imaging.ImageAttributes)
[0x00066] in System.Drawing\System.Drawing\Graphics.cs:884
at (wrapper remoting-invoke-with-check) System.Drawing.Graphics.DrawImage
(System.Drawing.Image,System.Drawing.Rectangle,int,int,int,int,System.Drawing.GraphicsUnit,System.Drawing.Imaging.ImageAttributes)
<0x0027d>
at System.Windows.Forms.ToolStripRenderer.OnRenderItemImage
(System.Windows.Forms.ToolStripItemImageRenderEventArgs) [0x0006f] in
Managed.Windows.Forms\System.Windows.Forms\ToolStripRenderer.cs:233
at System.Windows.Forms.ToolStripProfessionalRenderer.OnRenderItemImage
(System.Windows.Forms.ToolStripItemImageRenderEventArgs) [0x00000] in
Managed.Windows.Forms\System.Windows.Forms\ToolStripProfessionalRenderer.cs:217
at System.Windows.Forms.ToolStripRenderer.DrawItemImage
(System.Windows.Forms.ToolStripItemImageRenderEventArgs) [0x00000] in
Managed.Windows.Forms\System.Windows.Forms\ToolStripRenderer.cs:97
at System.Windows.Forms.ToolStripButton.OnPaint
(System.Windows.Forms.PaintEventArgs) [0x000c6] in
Managed.Windows.Forms\System.Windows.Forms\ToolStripButton.cs:202
at System.Windows.Forms.ToolStripItem.FireEvent
(System.EventArgs,System.Windows.Forms.ToolStripItemEventType) [0x000a0] in
Managed.Windows.Forms\System.Windows.Forms\ToolStripItem.cs:1738
at (wrapper remoting-invoke-with-check)
System.Windows.Forms.ToolStripItem.FireEvent
(System.EventArgs,System.Windows.Forms.ToolStripItemEventType) <0x0005a>
..
..
]]

The app was created in VS2005: new WinForms app, drag ToolStrip control onto
Form, right-click it and select "Insert Standard items".  Occurs on running the
app.

The problem was first seen in ./ch02_Forms/MDIApplicationSample from the sample
code for the book "Windows Forms 2.0 Programming," by Chris Sells and Michael 
Weinhardt, sources available from http://www.sellsbrothers.com/writing/wfbook/ 
In that case one has to highlight icons eight times before the problem occurs. 
Either move the mouse onto and off-of one of the icons repeatedly, on the
eighth time the exception occurs; or move the mouse along the toolstrip from
side to side, there it seems to take about 12 highlights for the exception to
occur.


-- 
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the mono-bugs mailing list