[Mono-bugs] [Bug 70773][Maj] New - [AMD64] Marshalling to libgdiplus fails
bugzilla-daemon@bugzilla.ximian.com
bugzilla-daemon@bugzilla.ximian.com
Thu, 23 Dec 2004 01:58:04 -0500 (EST)
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 harningt@gmail.com.
http://bugzilla.ximian.com/show_bug.cgi?id=70773
--- shadow/70773 2004-12-23 01:58:04.000000000 -0500
+++ shadow/70773.tmp.6930 2004-12-23 01:58:04.000000000 -0500
@@ -0,0 +1,66 @@
+Bug#: 70773
+Product: Mono: Runtime
+Version: 1.1
+OS:
+OS Details:
+Status: NEW
+Resolution:
+Severity:
+Priority: Major
+Component: JIT
+AssignedTo: mono-bugs@ximian.com
+ReportedBy: harningt@gmail.com
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: [AMD64] Marshalling to libgdiplus fails
+
+Please fill in this template when reporting a bug, unless you know what you
+are doing.
+Description of Problem:
+ When trying to access the ImageCodecInfo instances via
+ImageCodecInfo.GetImageEncoders(), or when attempting to save an image, a
+NullRefrenceException gets thrown inside
+System.Runtime.InteropServices.Marshal:PtrToStringUni(intptr) [even though
+the actual pointer that causes the exception isn't null, but apparently
+unreferenceable when testing via gdb].
+
+
+Steps to reproduce the problem:
+1. Execute a mono application that calls
+System.Drawing.Imaging.ImageCodecInfo retreival functions
+
+Actual Results:
+Exception gets thrown - mono output:
+Unhandled Exception: System.NullReferenceException: Object reference not
+set to an instance of an object
+in <0x68ddef4b> (wrapper managed-to-native)
+System.Runtime.InteropServices.Marshal:PtrToStringUni (intptr)
+in <0x0000f> (wrapper managed-to-native)
+System.Runtime.InteropServices.Marshal:PtrToStringUni (intptr)
+in <0x00027> System.Drawing.GdipImageCodecInfo:MarshalTo
+(System.Drawing.GdipImageCodecInfo,System.Drawing.Imaging.ImageCodecInfo)
+in <0x00297> System.Drawing.Imaging.ImageCodecInfo:GetImageEncoders ()
+in <0x00018> TheMain:Main (string[])
+
+
+
+Expected Results:
+-- The ImageCodecInfo retrieval succeeds and no exceptions get thrown.
+
+How often does this happen?
+Every time a call to the functions for ImageCodecInfo retrieval.
+
+Additional Information:
+I had to setup the libgdiplus src/Makefile to not have -Werror due to
+__stdcall causing warnings due to ignorance on AMD64 and pointer casting
+issues. I also tried sizing all the ints that get cast to pointers up to
+the larger [pointer] in case pointer issues were the main trouble, and also
+defining __stdcall to nothing and resetting the -Werror flag to check for
+more warnings [none after the define and changing all 'int's that were cast
+to void* to void* in the first place.
+
+I'm running everything from the bleeding edge SVN sources. [keep doing svn
+up */ in my sources directory just about every day I work with mono's sources].
+I have provided a simple test case.