[Mono-winforms-list] WinForms Apps Crash on Mac OS X

Justin Holewinski shawmishrak at gmail.com
Sat Sep 5 21:29:03 EDT 2009


I'm having an issue with WinForms on Mac OS X 10.6.  WinForms apps used to
work, but all of a sudden they all crash on start-up.  Even trivial WinForms
apps crash now.  My first thought was the 10.6 upgrade, but I haven't read
of any Mono incompatibilities affecting WinForms.  I've tried uninstalling
and reinstalling Mono, including getting rid of the ~/.mono directory, but
no luck.  I am using the Mono .dmg image, version 2.4.2.3.

I read some older threads regarding font issues and needing X11, but X11 is
installed.  I use it everyday.


Test1.cs:

using System;
using System.Windows.Forms;

namespace test
{
  class Test
  {
    [STAThread]
    public static void Main(string[] args)
    {
      Form f = new Form();

      f.Show();

      Application.Run(f);
    }
  }
}


Crash:

acheron:winforms jholewinski$ gmcs Test1.cs -r:System.Windows.Forms.dll
acheron:winforms jholewinski$ mono Test1.exe
Stacktrace:

  at (wrapper managed-to-native)
System.Drawing.GDIPlus.GdipCreateFontFamilyFromName (string,intptr,intptr&)
<0x00004>
  at (wrapper managed-to-native)
System.Drawing.GDIPlus.GdipCreateFontFamilyFromName (string,intptr,intptr&)
<0xffffffff>
  at System.Drawing.FontFamily..ctor
(string,System.Drawing.Text.FontCollection) <0x00044>
  at System.Drawing.FontFamily..ctor (string) <0x00015>
  at (wrapper remoting-invoke-with-check) System.Drawing.FontFamily..ctor
(string) <0xffffffff>
  at System.Drawing.Font.CreateFont
(string,single,System.Drawing.FontStyle,System.Drawing.GraphicsUnit,byte,bool)
<0x00034>
  at System.Drawing.Font..ctor
(string,single,System.Drawing.FontStyle,System.Drawing.GraphicsUnit,byte,bool)
<0x00042>
  at System.Drawing.Font..ctor (string,single,string) <0x00024>
  at (wrapper remoting-invoke-with-check) System.Drawing.Font..ctor
(string,single,string) <0xffffffff>
  at System.Drawing.SystemFonts.get_DefaultFont () <0x0003c>
  at System.Windows.Forms.Theme..ctor () <0x00032>
  at System.Windows.Forms.ThemeWin32Classic..ctor () <0x00012>
  at System.Windows.Forms.ThemeEngine..cctor () <0x00085>
  at (wrapper runtime-invoke) object.runtime_invoke_void
(object,intptr,intptr,intptr) <0xffffffff>
  at System.Windows.Forms.SystemInformation.get_MenuAccessKeysUnderlined ()
<0xffffffff>
  at System.Windows.Forms.SystemInformation.get_MenuAccessKeysUnderlined ()
<0x0000b>
  at System.Windows.Forms.Control..ctor () <0x001f3>
  at (wrapper remoting-invoke-with-check) System.Windows.Forms.Control..ctor
() <0xffffffff>
  at System.Windows.Forms.WindowsFormsSynchronizationContext..cctor ()
<0x00028>
  at (wrapper runtime-invoke) object.runtime_invoke_void
(object,intptr,intptr,intptr) <0xffffffff>
  at System.Windows.Forms.Control..ctor () <0xffffffff>
  at System.Windows.Forms.Control..ctor () <0x00059>
  at System.Windows.Forms.ScrollableControl..ctor () <0x00012>
  at System.Windows.Forms.ContainerControl..ctor () <0x00023>
  at System.Windows.Forms.Form..ctor () <0x00058>
  at (wrapper remoting-invoke-with-check) System.Windows.Forms.Form..ctor ()
<0xffffffff>
  at test.Test.Main (string[]) <0x00028>
  at (wrapper runtime-invoke) test.Test.runtime_invoke_void_object
(object,intptr,intptr,intptr) <0xffffffff>
Abort trap


-- 

Thanks,

Justin Holewinski
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-winforms-list/attachments/20090905/988cd908/attachment-0001.html 


More information about the Mono-winforms-list mailing list