[Mono-bugs] [Bug 581400] New: reading via stream on non square resource icons causes gdplus to emit [GDI+ status: InvalidParameter]

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Fri Feb 19 14:15:42 EST 2010


http://bugzilla.novell.com/show_bug.cgi?id=581400

http://bugzilla.novell.com/show_bug.cgi?id=581400#c0


           Summary: reading via stream on non square resource icons causes
                    gdplus to emit [GDI+ status: InvalidParameter]
    Classification: Mono
           Product: Mono: Class Libraries
           Version: SVN
          Platform: Other
        OS/Version: Ubuntu
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: libgdiplus
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: tom_hindle at sil.org
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---
           Blocker: ---


Created an attachment (id=343575)
 --> (http://bugzilla.novell.com/attachment.cgi?id=343575)
Zip up project, showing bug

User-Agent:       Mozilla/5.0 (X11; U; Linux x86_64; en-US) AppleWebKit/532.5
(KHTML, like Gecko) Chrome/4.0.249.43 Safari/532.5

This isn't a problem for ico files opened via gdiplus only ico streams.

IE. doing something like this: 

Properties.Resources.Grip2003.ToBitmap();

where Grip2003 is a non square ico resources.
throws: Unhandled Exception: System.ArgumentException: A null reference or
invalid value was found [GDI+ status: InvalidParameter]

Reproducible: Always

Steps to Reproduce:
1. Compile and run attached project

Actual Results:  
Unhandled Exception: System.ArgumentException: A null reference or invalid
value was found [GDI+ status: InvalidParameter]
  at System.Drawing.GDIPlus.CheckStatus (Status status) [0x00000] 
  at System.Drawing.Image.InitFromStream (System.IO.Stream stream) [0x00000] 
  at System.Drawing.Image.LoadFromStream (System.IO.Stream stream, Boolean
keepAlive) [0x00000] 
  at System.Drawing.Icon.GetInternalBitmap () [0x00000] 
  at System.Drawing.Icon.ToBitmap () [0x00000] 
  at (wrapper remoting-invoke-with-check) System.Drawing.Icon:ToBitmap ()
  at TestIcoResources.MainClass..ctor () [0x00006] in
/home/hindlet/Projects/TestIcoResources/TestIcoResources/Main.cs:71 
  at TestIcoResources.MainClass.Main (System.String[] args) [0x00000] in
/home/hindlet/Projects/TestIcoResources/TestIcoResources/Main.cs:1

Expected Results:  
no gdiplus error.

-- 
Configure bugmail: http://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