[Mono-bugs] [Bug 63098][Nor] New - NullReferenceException invoking Font.Height on Mono/Linux

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Sun, 15 Aug 2004 16:04:13 -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 gert.driesen@pandora.be.

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

--- shadow/63098	2004-08-15 16:04:13.000000000 -0400
+++ shadow/63098.tmp.6187	2004-08-15 16:04:13.000000000 -0400
@@ -0,0 +1,63 @@
+Bug#: 63098
+Product: Mono: Class Libraries
+Version: unspecified
+OS: GNU/Linux [Other]
+OS Details: Gentoo 2.6.7 R13
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: Sys.Drawing.
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: gert.driesen@pandora.be               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: NullReferenceException invoking Font.Height on Mono/Linux
+
+I get the following exception when invoking Font.Height using the 
+attached code on Mono CVS/Linux:
+
+Unhandled Exception: System.NullReferenceException: Object reference not 
+set to an instance of an object
+in (unmanaged) (wrapper managed-to-native) 
+System.Drawing.GDIPlus:GdipGetEmHeight (intptr,int,uint&)
+in <0x00004> (wrapper managed-to-native) 
+System.Drawing.GDIPlus:GdipGetEmHeight (intptr,int,uint&)
+in <0x0003e> System.Drawing.FontFamily:GetEmHeight 
+(System.Drawing.FontStyle)
+in <0x00058> (wrapper remoting-invoke-with-check) 
+System.Drawing.FontFamily:GetEmHeight (System.Drawing.FontStyle)
+in <0x00034> System.Drawing.Font:GetHeight (single)
+in <0x0006e> (wrapper remoting-invoke-with-check) 
+System.Drawing.Font:GetHeight (single)
+in <0x00027> System.Drawing.Font:GetHeight ()
+in <0x00050> (wrapper remoting-invoke-with-check) 
+System.Drawing.Font:GetHeight ()
+in <0x00010> System.Drawing.Font:get_Height ()
+in <0x0004b> (wrapper remoting-invoke-with-check) 
+System.Drawing.Font:get_Height ()
+in <0x00046> PieChart:CalculateLegendWidthHeight ()
+in <0x00417> PieChart:CollectDataPoints (string[],string[])
+in <0x000e6> EntryPoint:Main ()
+
+I'm not sure my environment is set-up correctly, as the System.Drawing 
+unit tests also fail on my system.
+
+I'm using Mono, libgdiplus and Cairo built from cvs.
+
+The attached zip file contains the following files :
+
+- PieChart.cs, EntryPoint.cs: sources to reproduce the issue
+- EntryPoint.exe: pre-built assembly using above sources
+- chart-msnet-win32.png: chart created by executing the repro using 
+MS.NET (1.1)
+- chart-mono-win32.png: chart creating by executing the repro using Mono 
+1.0 on Windows
+
+This repro is code which was extracted from the ASP.NET Reports Starter 
+Kit (http://www.asp.net/ReportsStarterKit/).
+
+As you can see the chart generated by Mono 1.0 on Windows is also 
+distorted, but I'll create a separate bug report for this later.