[Mono-bugs] [Bug 80786][Wis] Changed - [WIN] Saving Image to MemoryStream fails

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Sun Feb 11 00:27:24 EST 2007


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 miguel at ximian.com.

http://bugzilla.ximian.com/show_bug.cgi?id=80786

--- shadow/80786	2007-02-10 19:12:50.000000000 -0500
+++ shadow/80786.tmp.6926	2007-02-11 00:27:24.000000000 -0500
@@ -149,6 +149,49 @@
 GdipSaveImageToStream.
 
 Please feel free to modify the declaration of GdipSaveImageToStream.
 
 (Note that this doesn't fix HandleRef but avoids using it 
 unnecessarily.)
+
+------- Additional Comments From miguel at ximian.com  2007-02-11 00:27 -------
+HandleRef was not supported in Mono in the first place (until a few
+minutes ago, ie, nothing before Mono 1.2.4)
+
+Any code using HandleRef in System.Drawing was never tested, you would
+get garbage.
+
+Currently with SVN/trunk and HandleRef support, am getting this crash,
+which seems to be something else:
+
+mono$
+mono$ mono --debug /tmp/fi.exe
+Stacktrace:
+
+  at (wrapper managed-to-native)
+System.Runtime.InteropServices.Marshal.PtrToStringUni (intptr) <0x00004>
+  at (wrapper managed-to-native)
+System.Runtime.InteropServices.Marshal.PtrToStringUni (intptr)
+<0xffffffff>
+  at System.Drawing.GdipImageCodecInfo.MarshalTo
+(System.Drawing.GdipImageCodecInfo,System.Drawing.Imaging.ImageCodecInfo)
+[0x00012] in
+/home/cvs/mcs/class/System.Drawing/System.Drawing/gdipStructs.cs:126
+  at System.Drawing.Imaging.ImageCodecInfo.GetImageEncoders ()
+[0x00082] in
+/home/cvs/mcs/class/System.Drawing/System.Drawing.Imaging/ImageCodecInfo.cs:127
+  at System.Drawing.Image.findEncoderForFormat
+(System.Drawing.Imaging.ImageFormat) [0x00000] in
+/home/cvs/mcs/class/System.Drawing/System.Drawing/Image.cs:377
+  at System.Drawing.Image.Save
+(System.IO.Stream,System.Drawing.Imaging.ImageFormat) [0x00000] in
+/home/cvs/mcs/class/System.Drawing/System.Drawing/Image.cs:431
+  at (wrapper remoting-invoke-with-check) System.Drawing.Image.Save
+(System.IO.Stream,System.Drawing.Imaging.ImageFormat) <0xffffffff>
+  at ImageSerialize.MainClass.ImageToString (System.Drawing.Image)
+<0x00055>
+  at ImageSerialize.MainClass.Main (string[]) <0x0001b>
+  at (wrapper runtime-invoke)
+System.Object.runtime_invoke_void_string[]
+(object,intptr,intptr,intptr) <0xffffffff>
+
+


More information about the mono-bugs mailing list