[Mono-bugs] [Bug 77724][Nor] New - A problem related to System.Drawing.Text.PrivateFontCollection and its FontFamily members

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Tue Mar 7 17:11:08 EST 2006

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 dawiddr at gmail.com.


--- shadow/77724	2006-03-07 17:11:08.000000000 -0500
+++ shadow/77724.tmp.18233	2006-03-07 17:11:08.000000000 -0500
@@ -0,0 +1,85 @@
+Bug#: 77724
+Product: Mono: Class Libraries
+Version: 1.1
+OS Details: Gentoo
+Status: NEW   
+Priority: Normal
+Component: libgdiplus
+AssignedTo: jordi at ximian.com                            
+ReportedBy: dawiddr at gmail.com               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+Summary: A problem related to System.Drawing.Text.PrivateFontCollection and its FontFamily members
+After creating new System.Drawing.Text.PrivateFontCollection and adding
+some FreeType font file paths using AddFontFile() method, a program crashes
+when trying to get Name property of any FontFamily object from Families
+property. The problem exists on Mono with libgdiplus
+Steps to reproduce the problem:
+Compile and run the following code:
+using System;
+using System.Drawing;
+using System.Drawing.Text;
+class MainClass {
+	public static void Main(string[] args)	{
+		PrivateFontCollection col = new System.Drawing.Text.PrivateFontCollection();
+		col.AddFontFile("/usr/X11R6/share/fonts/corefonts/arial.ttf");
+		foreach(System.Drawing.FontFamily f in col.Families) 	{
+			Console.WriteLine(f.Name);
+		}
+	}
+Actual Results:
+Got a SIGSEGV while executing native code. This usually indicates
+a fatal error in the mono runtime or one of the native libraries 
+used by your application.
+in <0x4> (wrapper managed-to-native)
+System.Drawing.GDIPlus:GdipGetFamilyName (intptr,intptr,int)
+in <0xffffffa6> (wrapper managed-to-native)
+System.Drawing.GDIPlus:GdipGetFamilyName (intptr,intptr,int)
+in [0x22] System.Drawing.FontFamily:refreshName ()
+in [0x19] System.Drawing.FontFamily:.ctor (intptr)
+in <0xfffffb93> (wrapper remoting-invoke-with-check)
+System.Drawing.FontFamily:.ctor (intptr)
+in [0xb7] System.Drawing.Text.FontCollection:get_Families ()
+in [0x12] MainClass:Main (string[])
+in <0x50b37e39> (wrapper runtime-invoke)
+System.Object:runtime_invoke_void_string[] (object,intptr,intptr,intptr)
+Native stacktrace:
+	mono(mono_handle_native_sigsegv+0xba) [0x814e86a]
+	mono [0x813b1c9]
+	[0xffffe440]
+	/usr/lib/libfontconfig.so.1(FcPatternFindElt+0x14) [0xb70ad4f4]
+	/usr/lib/libfontconfig.so.1(FcPatternGet+0x2c) [0xb70addac]
+	/usr/lib/libfontconfig.so.1(FcPatternGetString+0x32) [0xb70adf12]
+	/usr/lib/libgdiplus.so(GdipGetFamilyName+0x41) [0xb71b2c21]
+	[0xb759d063]
+	[0xb759cfd7]
+	[0xb759cf69]
+	[0xb759cf12]
+	[0xb759ca7c]
+	[0xb759996d]
+	[0xb7599823]
+	mono(mono_runtime_exec_main+0x62) [0x80d1632]
+	mono(mono_runtime_run_main+0x1ce) [0x80d192e]
+	mono(mono_main+0xef4) [0x805d694]
+	mono [0x805c2ee]
+	/lib/tls/libc.so.6(__libc_start_main+0xd4) [0xb7d71f24]
+	mono [0x805c231]

More information about the mono-bugs mailing list