[Mono-list] Problems to get ZedGraph working, apache mod_mono, ok with xsp2

Sebastien Pouliot sebastien.pouliot at gmail.com
Fri Sep 28 08:05:23 EDT 2007


On Fri, 2007-09-28 at 10:55 +0200, David Temes wrote:
> I am trying to get the ZedGraph library working on linux, and it works
> if I use the xsp2 server but with with apache 2 and mod_mono 1.2.4 I
> get this exception:

GdipGetFontHeightGivenDPI is implemented by (recent) libgdiplus,
including 1.2.4.

Generally this kind of exception occurs when an older (e.g. the one
installed by your distro) libgdiplus is loaded by a newer Mono runtime.

Note that it is important that you always use the same version of Mono
(technically it's System.Drawing assembly) and libgdiplus because both
are interdependent.

Your apache2 configuration (or user setup) probably don't use the same
path to load the libraries, ending up in a version mismatch.
 
> ***********
> System.EntryPointNotFoundException: GdipGetFontHeightGivenDPI at
> (wrapper managed-to-native)
> System.Drawing.GDIPlus:GdipGetFontHeightGivenDPI
> (intptr,single,single&) at System.Drawing.Font.GetHeight (Single dpi)
> [0x00000] at System.Drawing.Font.GetHeight () [0x00000] at
> System.Drawing.Font.get_Height () [0x00000] at (wrapper
> remoting-invoke-with-check) System.Drawing.Font:get_Height () at
> ZedGraph.FontSpec.GetHeight (Single scaleFactor) [0x00000] at
> ZedGraph.PaneBase.CalcClientRect (System.Drawing.Graphics g, Single
> scaleFactor) [0x00000] at ZedGraph.MasterPane.DoLayout
> (System.Drawing.Graphics g, Boolean isColumnSpecified, System.Int32[]
> countList, System.Single[] proportion) [0x00000] at
> ZedGraph.MasterPane.DoLayout (System.Drawing.Graphics g, Int32 rows,
> Int32 columns) [0x00000] at ZedGraph.MasterPane.DoLayout
> (System.Drawing.Graphics g) [0x00000] at ZedGraph.MasterPane.ReSize
> (System.Drawing.Graphics g, RectangleF rect) [0x00000] at
> ZedGraph.Web.ZedGraphWeb.CreateGraph (System.IO.Stream OutputStream,
> System.Drawing.Imaging.ImageFormat Format, Boolean bShowTransparency)
> [0x00000] at ZedGraph.Web.ZedGraphWeb.Render
> (System.Web.UI.HtmlTextWriter output) [0x00000] 
> System.EntryPointNotFoundException: GdipGetFontHeightGivenDPI at
> (wrapper managed-to-native)
> System.Drawing.GDIPlus:GdipGetFontHeightGivenDPI
> (intptr,single,single&) at System.Drawing.Font.GetHeight (Single dpi)
> [0x00000] at System.Drawing.Font.GetHeight () [0x00000] at
> System.Drawing.Font.get_Height () [0x00000] at (wrapper
> remoting-invoke-with-check) System.Drawing.Font:get_Height () at
> ZedGraph.FontSpec.GetHeight (Single scaleFactor) [0x00000] at
> ZedGraph.PaneBase.CalcClientRect (System.Drawing.Graphics g, Single
> scaleFactor) [0x00000] at ZedGraph.MasterPane.DoLayout
> (System.Drawing.Graphics g, Boolean isColumnSpecified, System.Int32[]
> countList, System.Single[] proportion) [0x00000] at
> ZedGraph.MasterPane.DoLayout (System.Drawing.Graphics g, Int32 rows,
> Int32 columns) [0x00000] at ZedGraph.MasterPane.DoLayout
> (System.Drawing.Graphics g) [0x00000] at ZedGraph.MasterPane.ReSize
> (System.Drawing.Graphics g, RectangleF rect) [0x00000] at
> ZedGraph.Web.ZedGraphWeb.CreateGraph (System.IO.Stream OutputStream,
> System.Drawing.Imaging.ImageFormat Format, Boolean bShowTransparency)
> [0x00000] at ZedGraph.Web.ZedGraphWeb.Render
> (System.Web.UI.HtmlTextWriter output) [0x00000]
> **********
>  
> I suspect it has to do with the libgdiplus library but can not find a
> solution, here is the result of running "ldconfig -p | grep
> libgdiplus":
>  
> devel:/usr/lib# ldconfig -p | grep libgdiplus
>         libgdiplus.so.0 (libc6) => /usr/lib/libgdiplus.so.0
>         libgdiplus.so (libc6) => /usr/lib/libgdiplus.so
> 
> If I overwrite the lib under /usr/lib with the one at /opt/monoXXX/lib
> then running a web app with apache/mod_mono gives me the Application
> error "Color XXXX is not a valid color"
>  
> some system info just in case:
> devel:/usr/lib# uname -a
> Linux devel 2.6.16.38.xs3.2.0.531.3960 #2 SMP Sat Mar 24 22:03:09 UTC
> 2007 i686 GNU/Linux
> 
> apache 2.53, mono 1.2.4, mono 1.2.5
>  
> I discarded mono 1.2.5.1 becouse i always get the color not valid
> error, even with the xsp2 server
>  
> Any ideas or suggestions?
>  
> Thanks
>  
> David
>  
>  
>  
>  
>  
>  
>  
>  
>  
>  
>  
>  
>  
>  
> _______________________________________________
> Mono-list maillist  -  Mono-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-list



More information about the Mono-list mailing list