[Mono-bugs] [Bug 335739] New: Closing an image Stream causes GDI fault

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Mon Oct 22 12:44:46 EDT 2007


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

           Summary: Closing an image Stream causes GDI fault
           Product: Mono: Class Libraries
           Version: 1.2
          Platform: x86
        OS/Version: Windows XP
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: Windows.Forms
        AssignedTo: mono-bugs at ximian.com
        ReportedBy: cummings.michael at gmail.com
         QAContact: mono-bugs at ximian.com
          Found By: Other


Created an attachment (id=179739)
 --> (https://bugzilla.novell.com/attachment.cgi?id=179739)
Test Program + Image

If you open a stream from an image and use the Image.FromStream to assign it to
a GUI element, like a PictureBox, then close the stream, GDI will fault. If you
don't close the stream, it remains open and locked. Below is the stack trace
and I've attached a sample test program that shows the problem.

Unhandled Exception: System.InvalidOperationException: The operation is invalid
[GDI+ status: Win32Error]
at System.Drawing.GDIPlus.CheckStatus (System.Drawing.Status) <0x006d9>
at System.Drawing.Graphics.DrawImage (System.Drawing.Image,int,int,int,int)
<0x0
0093>
at (wrapper remoting-invoke-with-check) System.Drawing.Graphics.DrawImage
(Syste
m.Drawing.Image,int,int,int,int) <0x0009f>
at System.Windows.Forms.ThemeWin32Classic.DrawPictureBox
(System.Drawing.Graphic
s,System.Drawing.Rectangle,System.Windows.Forms.PictureBox) <0x001bb>
at System.Windows.Forms.PictureBox.OnPaint
(System.Windows.Forms.PaintEventArgs)
 <0x00063>
at System.Windows.Forms.Control.WmPaint (System.Windows.Forms.Message&)
<0x00118
>
at System.Windows.Forms.Control.WndProc (System.Windows.Forms.Message&)
<0x00165
>
at ControlWindowTarget.OnMessage (System.Windows.Forms.Message&) <0x00014>
at ControlNativeWindow.WndProc (System.Windows.Forms.Message&) <0x00022>
at System.Windows.Forms.NativeWindow.WndProc
(intptr,System.Windows.Forms.Msg,in
tptr,intptr) <0x0015c>
at System.Windows.Forms.XplatUIWin32.InternalWndProc
(intptr,System.Windows.Form
s.Msg,intptr,intptr) <0x00046>
at (wrapper native-to-managed)
System.Windows.Forms.XplatUIWin32.InternalWndProc
 (intptr,System.Windows.Forms.Msg,intptr,intptr) <0x0004d>
in (unmanaged) 7E418733
at (wrapper managed-to-native)
System.Windows.Forms.XplatUIWin32.Win32DispatchMe
ssage (System.Windows.Forms.MSG&) <0x00004>
at System.Windows.Forms.XplatUIWin32.DispatchMessage
(System.Windows.Forms.MSG&)
 <0x0000a>
at System.Windows.Forms.XplatUI.DispatchMessage (System.Windows.Forms.MSG&)
<0x0
0015>
at System.Windows.Forms.Application.RunLoop
(bool,System.Windows.Forms.Applicati
onContext) <0x008f8>
at System.Windows.Forms.Application.Run (System.Windows.Forms.Form) <0x00024>
at BugCheck.TestWin.Main (string[]) <0x0002c>


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