[Mono-dev] windows.form regression with mono 2.8.1

matteo tesser matteo.tesser at gmail.com
Thu Nov 18 04:27:53 EST 2010

I tried to run this simple program on osx 10.6 and mono 2.8.1

using System;
using System.Windows.Forms;
class myform:Form
 static void Main(string[] args) {
   Application.Run( new myform());

mono crashes showing the stack trace reported below. I think it is
quite severe, so I posted a bug


note that when  MONO_MWF_MAC_FORCE_X11 is set to one, it works.


Stack Trace:

Unhandled Exception: System.NullReferenceException: Object reference
not set to an instance of an object
 at System.Drawing.Graphics.Dispose () [0x00000] in <filename unknown>:0
 at (wrapper remoting-invoke-with-check) System.Drawing.Graphics:Dispose ()
 at System.Drawing.Bitmap..ctor (System.Drawing.Image original, Int32
width, Int32 height) [0x00000] in <filename unknown>:0
 at System.Drawing.Bitmap..ctor (System.Drawing.Image original)
[0x00000] in <filename unknown>:0
 at (wrapper remoting-invoke-with-check) System.Drawing.Bitmap:.ctor
 at System.Windows.Forms.Cursor.ToBitmap (Boolean xor, Boolean
transparent) [0x00000] in <filename unknown>:0
 at System.Windows.Forms.Cursor.CreateCursor (System.IO.Stream
stream) [0x00000] in <filename unknown>:0
 at System.Windows.Forms.Cursor..ctor (System.Type type,
System.String resource) [0x00000] in <filename unknown>:0
 at System.Windows.Forms.Cursors.get_SizeNWSE () [0x00000] in
<filename unknown>:0
 at System.Windows.Forms.SizeGrip..ctor (System.Windows.Forms.Control
CapturedControl) [0x00000] in <filename unknown>:0
 at (wrapper remoting-invoke-with-check)
System.Windows.Forms.SizeGrip:.ctor (System.Windows.Forms.Control)
 at System.Windows.Forms.ScrollableControl.CreateScrollbars ()
[0x00000] in <filename unknown>:0
 at System.Windows.Forms.ScrollableControl..ctor () [0x00000] in
<filename unknown>:0
 at System.Windows.Forms.ContainerControl..ctor () [0x00000] in
<filename unknown>:0
 at System.Windows.Forms.Form..ctor () [0x00000] in <filename unknown>:0
 at myform..ctor () [0x00000] in <filename unknown>:0
 at (wrapper remoting-invoke-with-check) myform:.ctor ()
 at myform.Main (System.String[] args) [0x00000] in <filename unknown>:0

More information about the Mono-devel-list mailing list