[Mono-bugs] [Bug 61414][Nor] Changed - System.Drawing.Graphics.DrawString crash

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Mon, 12 Jul 2004 09:11:48 -0400 (EDT)


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 cleonard@go.ro.

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

--- shadow/61414	2004-07-12 07:51:46.000000000 -0400
+++ shadow/61414.tmp.23908	2004-07-12 09:11:48.000000000 -0400
@@ -74,6 +74,70 @@
 +    void *glyph_cache;
      const struct cairo_font_backend *backend;
  };
                                                                      
                      
 Thanks!
+
+------- Additional Comments From cleonard@go.ro  2004-07-12 09:11 -------
+Here is the result I got with the patch, applied it to gdiplus 1.0.
+Should I compile System.Drawing from source too?
+
+Unhandled Exception: System.NullReferenceException: Object reference
+not set to an instance of an object
+in (unmanaged) (wrapper managed-to-native)
+System.Drawing.GDIPlus:GdipCreateFont
+(intptr,single,System.Drawing.FontStyle,System.Drawing.GraphicsUnit,intptr&)in
+<0x00004> (wrapper managed-to-native)
+System.Drawing.GDIPlus:GdipCreateFont
+(intptr,single,System.Drawing.FontStyle,System.Drawing.GraphicsUnit,intptr&)
+in <0x000cb> System.Drawing.Font:.ctor
+(string,single,System.Drawing.FontStyle,System.Drawing.GraphicsUnit,byte,bool)
+in <0x0002a> System.Drawing.Font:.ctor (string,single)
+in <0x00077> (wrapper remoting-invoke-with-check)
+System.Drawing.Font:.ctor (string,single)
+in <0x0007f> Font:Main ()
+
+Here is a gdb backtrace:
+
+Program received signal SIGSEGV, Segmentation fault.
+[Switching to Thread 1106664368 (LWP 1947)]
+0x42042513 in FT_Set_Char_Size () from /usr/lib/libgdiplus.so
+(gdb) bt
+#0  0x42042513 in FT_Set_Char_Size () from /usr/lib/libgdiplus.so
+#1  0x41fdd2b6 in gdip_font_create (family=0x1 <Address 0x1 out of
+bounds>, fcslant=1, fcweight=1) at font.c:479
+#2  0x41fdd4c3 in GdipCreateFont (family=0x1, emSize=10,
+style=FontStyleRegular, unit=UnitPoint, font=0x809af0c) at font.c:538
+#3  0x4159ae16 in ?? ()
+/* Lots and lots of junk down here. */
+
+Here is a gdb backtrace without the patch.
+
+Program received signal SIGSEGV, Segmentation fault.
+[Switching to Thread 32771 (LWP 18146)]
+0x41c33006 in pixman_uninit () from /usr/lib/libgdiplus.so
+(gdb) bt
+#0  0x41c33006 in pixman_uninit () from /usr/lib/libgdiplus.so
+#1  0x41c33034 in pixman_region_destroy () from /usr/lib/libgdiplus.so
+#2  0x41c3fd18 in pixman_image_destroyClip () from /usr/lib/libgdiplus.so
+#3  0x41c3fd54 in pixman_image_set_clip_region () from
+/usr/lib/libgdiplus.so
+#4  0x41c2a9bb in _cairo_image_surface_set_clip_region () from
+/usr/lib/libgdiplus.so
+#5  0x41c2ebe8 in _cairo_surface_set_clip_region () from
+/usr/lib/libgdiplus.so
+#6  0x41c28d59 in _cairo_gstate_init_clip () from /usr/lib/libgdiplus.so
+#7  0x41c24acb in cairo_init_clip () from /usr/lib/libgdiplus.so
+#8  0x41c1b6b1 in MeasureOrDrawString (graphics=0x816fed0,
+stringUnicode=0x0, length=4, font=0x81a36f0, rc=0xbf5ff808,
+format=0x0, brush=0x81b4120,
+    boundingBox=0x0, codepointsFitted=0x0, linesFilled=0x0, draw=1) at
+graphics.c:2310
+#9  0x41c1caa1 in GdipDrawString (graphics=0x0, stringUnicode=0x0,
+length=135777496, font=0x0, rc=0x0, fmt=0x0, brush=0x0) at graphics.c:2329
+#10 0x415de617 in ?? ()
+/* Junk down here. */
+
+Btw, I'm using debian packages, I just copied
+src/.libs/libgdiplus.so.0.0.0 to /usr/lib
+