[Mono-winforms-list] Problems trying to run winformssamples

Peter Dennis Bartok peter@novonyx.com
Tue, 5 Oct 2004 20:21:51 -0600


The patch should now be obsolete. I just commited a bunch of changes for 
libgdiplus to make it independent of particular internals of cairo. Please 
update libgdiplus and check if it starts working for you and let me know.

Cheers,
  Peter


-----Original Message-----
From: "Ravindra Kumar" <rkumar@novell.com>
To: <jba-mono@optusnet.com.au>; <mono-winforms-list@ximian.com>
Date: 05 October, 2004 06:10
Subject: Re: [Mono-winforms-list] Problems trying to run winformssamples


>Hey John,
>
>Can you try the following patch for libgdiplus:
>
>Index: gdip.h
>===================================================================
>RCS file: /cvs/public/libgdiplus/src/gdip.h,v
>retrieving revision 1.92
>diff -u -r1.92 gdip.h
>--- gdip.h      26 Jul 2004 07:32:59 -0000      1.92
>+++ gdip.h      13 Sep 2004 17:20:35 -0000
>@@ -74,7 +74,7 @@
>struct cairo_font {
>     int refcount;
>     cairo_matrix_t matrix;
>-    //void *glyph_cache;
>+    void *glyph_cache;
>     const struct cairo_font_backend *backend;
>};
>
>- Ravi
>
>>>> John BouAntoun <jba-mono@optusnet.com.au> 10/05/04 5:07 PM >>>
>Hi guys,
>
>I was trying to try the samples in the winforms module and all of them
>seem to be failing with the same problem.
>
>I have a fresh install of all sources on a new machine.
>
>I installed cairo, libpixman and libgdiplus and all other deps.
>
>In particular after successfully installing Managed Windows Forms I
>get
>the following error message when running the swf-radiobuttons.exe:
>
>mono swf-radiobuttons.exe
>#region #line XplatUI Constructor called
>
>Unhandled Exception: System.NullReferenceException: Object reference
>not
>set to an instance of an object
>in <0xffe232f0> (wrapper managed-to-native)
>System.Drawing.GDIPlus:GdipDrawString
>(intptr,string,int,intptr,System.Drawing.RectangleF&,intptr,intptr)
>in <0x00004> (wrapper managed-to-native)
>System.Drawing.GDIPlus:GdipDrawString
>(intptr,string,int,intptr,System.Drawing.RectangleF&,intptr,intptr)
>in <0x00094> System.Drawing.Graphics:DrawString
>(string,System.Drawing.Font,System.Drawing.Brush,System.Drawing.RectangleF,System.Drawing.StringFormat)
>in <0x000fe> (wrapper remoting-invoke-with-check)
>System.Drawing.Graphics:DrawString
>(string,System.Drawing.Font,System.Drawing.Brush,System.Drawing.RectangleF,System.Drawing.StringFormat)
>in <0x00f01> System.Windows.Forms.ThemeWin32Classic:DrawRadioButton
>(System.Drawing.Graphics,System.Drawing.Rectangle,System.Windows.Forms.RadioButton)
>in <0x00065> System.Windows.Forms.RadioButton:Redraw ()
>in <0x0000e> System.Windows.Forms.ButtonBase:OnTextChanged
>(System.EventArgs)
>in <0x00069> System.Windows.Forms.Control:set_Text (string)
>in <0x007bc> MyFormProject.MainForm:InitializeComponent ()
>in <0x0004a> (wrapper remoting-invoke-with-check)
>MyFormProject.MainForm:InitializeComponent ()
>in <0x00018> MyFormProject.MainForm:.ctor ()
>in <0x0004a> (wrapper remoting-invoke-with-check)
>MyFormProject.MainForm:.ctor ()
>in <0x0001a> MyFormProject.MainForm:Main (string[])
>
>All the samples have a NullReferenceException in
>System.Drawing.GDIPlus.XXXXX methods.
>
>Have I done anything wrong in setting up the environment?
>
>Help would be much appreciated.
>
>JBA
>
>
>_______________________________________________
>Mono-winforms-list maillist  -  Mono-winforms-list@lists.ximian.com
>http://lists.ximian.com/mailman/listinfo/mono-winforms-list
>_______________________________________________
>Mono-winforms-list maillist  -  Mono-winforms-list@lists.ximian.com
>http://lists.ximian.com/mailman/listinfo/mono-winforms-list
>
>