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

John BouAntoun jba-mono@optusnet.com.au
Tue, 05 Oct 2004 21:37:15 +1000


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