[Mono-bugs] [Bug 406307] New: System.Drawing.Image.SetPropertyItem throws an Exception

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Thu Jul 3 16:15:50 EDT 2008


           Summary: System.Drawing.Image.SetPropertyItem throws an Exception
           Product: Mono: Class Libraries
           Version: 1.9.0
          Platform: x86-64
        OS/Version: Linux
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: Sys.Drawing.
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: rob.h at gmx.de
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---

Created an attachment (id=225896)
 --> (https://bugzilla.novell.com/attachment.cgi?id=225896)
Code to reproduce the bug

SetPropertyItem throws the following exception. Code to reproduce is attached.
The picture from <http://www.exiv2.org/include/img_2158.jpg> is used in the

Unhandled Exception: System.ArgumentNullException: Argument cannot be null.
Parameter name: src
  at (wrapper managed-to-native)
  at System.Runtime.InteropServices.Marshal.Copy (IntPtr source, System.Byte[]
destination, Int32 startIndex, Int32 length) [0x00000] 
  at System.Drawing.GdipPropertyItem.MarshalTo (GdipPropertyItem gdipProp,
System.Drawing.Imaging.PropertyItem prop) [0x00000] 
  at System.Drawing.Image.SetPropertyItem (System.Drawing.Imaging.PropertyItem
propitem) [0x00000] 
  at (wrapper remoting-invoke-with-check) System.Drawing.Image:SetPropertyItem
  at SetPropBug.MainClass.Main (System.String[] args) [0x00043] in

By looking at the code of SetPropertyItem, I guess that the IntPtr pi.Value is
not initialized and that's why Marshal.Copy complains. But could also be sth

(The mono --version said I'm on 1.9.1 but I couldn't select it in the version
field of the bug tracker. (gmcs --version says
(My Linux distro is Debian lenny, which is missing in the OS field.)

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