[Mono-bugs] [Bug 538539] New: WinForms apps do not run on Mac OS X 10.6 with Mono 2.4.2.3

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Fri Sep 11 12:42:55 EDT 2009


http://bugzilla.novell.com/show_bug.cgi?id=538539


           Summary: WinForms apps do not run on Mac OS X 10.6 with Mono
                    2.4.2.3
    Classification: Mono
           Product: Mono: Class Libraries
           Version: 2.4.x
          Platform: x86
        OS/Version: Mac OS X 10.6
            Status: NEW
          Severity: Major
          Priority: P5 - None
         Component: Windows.Forms
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: shawmishrak at gmail.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---


User-Agent:       Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US;
rv:1.9.1.3) Gecko/20090824 Firefox/3.5.3

After upgrading to Mac OS X 10.6, WinForms apps stopped working in Mono.  I
cannot verify that the 10.6 upgrade is the primary reason, but it is the only
software change between the time WinForms apps worked and when they stopped
working.

I have re-installed Mono 2.4.2.3 from the .dmg image and the problem remains. 
Building libgdiplus + Mono 2.4.2.3 from the source tarballs (with
CFLAGS="-m32") results in the same behavior but a different error message.  The
only real difference is that the Mono version built from source actually
displays the WinForms window for a second before crashing.

The same behavior is observed for all WinForms apps, from a simple example
(attached) to Red Gate's .NET Reflector (which used to work, at least on 10.5).


Output from Mono 2.4.2.3:

acheron:winforms jholewinski$ gmcs Test1.cs -reference:System.Windows.Forms.dll
-out:Test1.exe && 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



Output from Mono 2.4.2.3 built from source:

acheron:winforms jholewinski$ /usr/local/mono-2.4.2.3/bin/gmcs Test1.cs
-reference:System.Windows.Forms.dll -out:Test1.exe &&
DYLD_LIBRARY_PATH=/usr/local/mono-2.4.2.3/lib /usr/local/mono-2.4.2.3/bin/mono
Test1.exe
System.EntryPointNotFoundException: GdipCreateFromContext_macosx
  at (wrapper managed-to-native)
System.Drawing.GDIPlus:GdipCreateFromContext_macosx (intptr,int,int,intptr&)
  at System.Drawing.Graphics.FromHwnd (IntPtr hwnd) [0x00000] 
  at System.Windows.Forms.XplatUICarbon.PaintEventStart
(System.Windows.Forms.Message& msg, IntPtr handle, Boolean client) [0x00000] 
  at System.Windows.Forms.XplatUI.PaintEventStart
(System.Windows.Forms.Message& msg, IntPtr handle, Boolean client) [0x00000] 
  at System.Windows.Forms.Control.WmPaint (System.Windows.Forms.Message& m)
[0x00000] 
  at System.Windows.Forms.Control.WndProc (System.Windows.Forms.Message& m)
[0x00000] 
  at System.Windows.Forms.ScrollableControl.WndProc
(System.Windows.Forms.Message& m) [0x00000] 
  at System.Windows.Forms.ContainerControl.WndProc
(System.Windows.Forms.Message& m) [0x00000] 
  at System.Windows.Forms.Form.WndProc (System.Windows.Forms.Message& m)
[0x00000] 
  at System.Windows.Forms.Control+ControlWindowTarget.OnMessage
(System.Windows.Forms.Message& m) [0x00000] 
  at System.Windows.Forms.Control+ControlNativeWindow.WndProc
(System.Windows.Forms.Message& m) [0x00000] 
  at System.Windows.Forms.NativeWindow.WndProc (IntPtr hWnd, Msg msg, IntPtr
wParam, IntPtr lParam) [0x00000] 
acheron:winforms jholewinski$ 




Reproducible: Always

Steps to Reproduce:
1. Compile Test1.cs  (gmcs Test1.cs -reference:System.Windows.Forms.dll
-out:Test1.exe)
2. Run Test1.exe  (mono Test1.exe)

Actual Results:  
Immediate crash:

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


Expected Results:  
Simple WinForms application should run.

-- 
Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the mono-bugs mailing list