Bug 273 - libgdiplus.dylib is missing required export
Summary: libgdiplus.dylib is missing required export
Status: RESOLVED FIXED
Alias: None
Product: Runtime
Classification: Mono
Component: packaging ()
Version: unspecified
Hardware: Macintosh Mac OS
: --- blocker
Target Milestone: ---
Assignee: Alex Corrado [MSFT]
URL:
: 244 ()
Depends on:
Blocks:
 
Reported: 2011-08-12 00:03 UTC by borrillis
Modified: 2014-10-12 18:42 UTC (History)
7 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on GitHub or Developer Community with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED FIXED

Description borrillis 2011-08-12 00:03:08 UTC

    
Comment 1 borrillis 2011-08-12 00:05:49 UTC
This is the Stacktrace from WinForm application:

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] in <filename unknown>:0 
  at System.Windows.Forms.Control.CreateGraphics () [0x00000] in <filename unknown>:0 
  at System.Windows.Forms.TextBoxBase.CreateGraphicsInternal () [0x00000] in <filename unknown>:0 
  at (wrapper remoting-invoke-with-check) System.Windows.Forms.TextBoxBase:CreateGraphicsInternal ()
  at System.Windows.Forms.Document.owner_HandleCreated (System.Object sender, System.EventArgs e) [0x00000] in <filename unknown>:0 
  at System.Windows.Forms.Control.OnHandleCreated (System.EventArgs e) [0x00000] in <filename unknown>:0 
  at System.Windows.Forms.TextBoxBase.OnHandleCreated (System.EventArgs e) [0x00000] in <filename unknown>:0 
  at System.Windows.Forms.TextBox.OnHandleCreated (System.EventArgs e) [0x00000] in <filename unknown>:0 
  at System.Windows.Forms.Control.WmCreate (System.Windows.Forms.Message& m) [0x00000] in <filename unknown>:0 
  at System.Windows.Forms.Control.WndProc (System.Windows.Forms.Message& m) [0x00000] in <filename unknown>:0 
  at System.Windows.Forms.TextBoxBase.WndProc (System.Windows.Forms.Message& m) [0x00000] in <filename unknown>:0 
  at System.Windows.Forms.TextBox.WndProc (System.Windows.Forms.Message& m) [0x00000] in <filename unknown>:0 
  at System.Windows.Forms.Control+ControlWindowTarget.OnMessage (System.Windows.Forms.Message& m) [0x00000] in <filename unknown>:0 
  at System.Windows.Forms.Control+ControlNativeWindow.WndProc (System.Windows.Forms.Message& m) [0x00000] in <filename unknown>:0 
  at System.Windows.Forms.NativeWindow.WndProc (IntPtr hWnd, Msg msg, IntPtr wParam, IntPtr lParam) [0x00000] in <filename unknown>:0 
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] in <filename unknown>:0 
  at System.Windows.Forms.Control.CreateGraphics () [0x00000] in <filename unknown>:0 
  at System.Windows.Forms.TextBoxBase.CreateGraphicsInternal () [0x00000] in <filename unknown>:0 
  at (wrapper remoting-invoke-with-check) System.Windows.Forms.TextBoxBase:CreateGraphicsInternal ()
  at System.Windows.Forms.Document.owner_VisibleChanged (System.Object sender, System.EventArgs e) [0x00000] in <filename unknown>:0 
  at System.Windows.Forms.Control.OnVisibleChanged (System.EventArgs e) [0x00000] in <filename unknown>:0 
  at System.Windows.Forms.Control.OnParentVisibleChanged (System.EventArgs e) [0x00000] in <filename unknown>:0 
  at System.Windows.Forms.Control.OnVisibleChanged (System.EventArgs e) [0x00000] in <filename unknown>:0 
  at System.Windows.Forms.ScrollableControl.OnVisibleChanged (System.EventArgs e) [0x00000] in <filename unknown>:0 
  at System.Windows.Forms.Form.OnVisibleChanged (System.EventArgs e) [0x00000] in <filename unknown>:0 
  at System.Windows.Forms.Control.WmShowWindow (System.Windows.Forms.Message& m) [0x00000] in <filename unknown>:0 
  at System.Windows.Forms.Control.WndProc (System.Windows.Forms.Message& m) [0x00000] in <filename unknown>:0 
  at System.Windows.Forms.ScrollableControl.WndProc (System.Windows.Forms.Message& m) [0x00000] in <filename unknown>:0 
  at System.Windows.Forms.ContainerControl.WndProc (System.Windows.Forms.Message& m) [0x00000] in <filename unknown>:0 
  at System.Windows.Forms.Form.WndProc (System.Windows.Forms.Message& m) [0x00000] in <filename unknown>:0 
  at System.Windows.Forms.Control+ControlWindowTarget.OnMessage (System.Windows.Forms.Message& m) [0x00000] in <filename unknown>:0 
  at System.Windows.Forms.Control+ControlNativeWindow.WndProc (System.Windows.Forms.Message& m) [0x00000] in <filename unknown>:0 
  at System.Windows.Forms.NativeWindow.WndProc (IntPtr hWnd, Msg msg, IntPtr wParam, IntPtr lParam) [0x00000] in <filename unknown>:0 

Unhandled Exception: System.ObjectDisposedException: The object was used after being disposed.
  at System.Windows.Forms.Control.CreateHandle () [0x00000] in <filename unknown>:0 
  at System.Windows.Forms.Form.CreateHandle () [0x00000] in <filename unknown>:0 
  at System.Windows.Forms.Control.get_Handle () [0x00000] in <filename unknown>:0 
  at (wrapper remoting-invoke-with-check) System.Windows.Forms.Control:get_Handle ()
  at System.Windows.Forms.Application.RunLoop (Boolean Modal, System.Windows.Forms.ApplicationContext context) [0x00000] in <filename unknown>:0 
  at System.Windows.Forms.Form.ShowDialog (IWin32Window owner) [0x00000] in <filename unknown>:0 
  at System.Windows.Forms.Form.ShowDialog () [0x00000] in <filename unknown>:0 
  at Axiom.Framework.Exceptions.WinFormErrorDialog.Show (System.Exception exception) [0x00000] in <filename unknown>:0 
  at Axiom.Samples.Program.Main () [0x00000] in <filename unknown>:0 
[ERROR] FATAL UNHANDLED EXCEPTION: System.ObjectDisposedException: The object was used after being disposed.
  at System.Windows.Forms.Control.CreateHandle () [0x00000] in <filename unknown>:0 
  at System.Windows.Forms.Form.CreateHandle () [0x00000] in <filename unknown>:0 
  at System.Windows.Forms.Control.get_Handle () [0x00000] in <filename unknown>:0 
  at (wrapper remoting-invoke-with-check) System.Windows.Forms.Control:get_Handle ()
  at System.Windows.Forms.Application.RunLoop (Boolean Modal, System.Windows.Forms.ApplicationContext context) [0x00000] in <filename unknown>:0 
  at System.Windows.Forms.Form.ShowDialog (IWin32Window owner) [0x00000] in <filename unknown>:0 
  at System.Windows.Forms.Form.ShowDialog () [0x00000] in <filename unknown>:0 
  at Axiom.Framework.Exceptions.WinFormErrorDialog.Show (System.Exception exception) [0x00000] in <filename unknown>:0 
  at Axiom.Samples.Program.Main () [0x00000] in <filename unknown>:0 
iRoo:linux borrillis$ mono Axiom.Samples.Browser.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] in <filename unknown>:0 
  at System.Windows.Forms.Control.CreateGraphics () [0x00000] in <filename unknown>:0 
  at System.Windows.Forms.TextBoxBase.CreateGraphicsInternal () [0x00000] in <filename unknown>:0 
  at (wrapper remoting-invoke-with-check) System.Windows.Forms.TextBoxBase:CreateGraphicsInternal ()
  at System.Windows.Forms.Document.owner_HandleCreated (System.Object sender, System.EventArgs e) [0x00000] in <filename unknown>:0 
  at System.Windows.Forms.Control.OnHandleCreated (System.EventArgs e) [0x00000] in <filename unknown>:0 
  at System.Windows.Forms.TextBoxBase.OnHandleCreated (System.EventArgs e) [0x00000] in <filename unknown>:0 
  at System.Windows.Forms.TextBox.OnHandleCreated (System.EventArgs e) [0x00000] in <filename unknown>:0 
  at System.Windows.Forms.Control.WmCreate (System.Windows.Forms.Message& m) [0x00000] in <filename unknown>:0 
  at System.Windows.Forms.Control.WndProc (System.Windows.Forms.Message& m) [0x00000] in <filename unknown>:0 
  at System.Windows.Forms.TextBoxBase.WndProc (System.Windows.Forms.Message& m) [0x00000] in <filename unknown>:0 
  at System.Windows.Forms.TextBox.WndProc (System.Windows.Forms.Message& m) [0x00000] in <filename unknown>:0 
  at System.Windows.Forms.Control+ControlWindowTarget.OnMessage (System.Windows.Forms.Message& m) [0x00000] in <filename unknown>:0 
  at System.Windows.Forms.Control+ControlNativeWindow.WndProc (System.Windows.Forms.Message& m) [0x00000] in <filename unknown>:0 
  at System.Windows.Forms.NativeWindow.WndProc (IntPtr hWnd, Msg msg, IntPtr wParam, IntPtr lParam) [0x00000] in <filename unknown>:0 
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] in <filename unknown>:0 
  at System.Windows.Forms.Control.CreateGraphics () [0x00000] in <filename unknown>:0 
  at System.Windows.Forms.TextBoxBase.CreateGraphicsInternal () [0x00000] in <filename unknown>:0 
  at (wrapper remoting-invoke-with-check) System.Windows.Forms.TextBoxBase:CreateGraphicsInternal ()
  at System.Windows.Forms.Document.owner_VisibleChanged (System.Object sender, System.EventArgs e) [0x00000] in <filename unknown>:0 
  at System.Windows.Forms.Control.OnVisibleChanged (System.EventArgs e) [0x00000] in <filename unknown>:0 
  at System.Windows.Forms.Control.OnParentVisibleChanged (System.EventArgs e) [0x00000] in <filename unknown>:0 
  at System.Windows.Forms.Control.OnVisibleChanged (System.EventArgs e) [0x00000] in <filename unknown>:0 
  at System.Windows.Forms.ScrollableControl.OnVisibleChanged (System.EventArgs e) [0x00000] in <filename unknown>:0 
  at System.Windows.Forms.Form.OnVisibleChanged (System.EventArgs e) [0x00000] in <filename unknown>:0 
  at System.Windows.Forms.Control.WmShowWindow (System.Windows.Forms.Message& m) [0x00000] in <filename unknown>:0 
  at System.Windows.Forms.Control.WndProc (System.Windows.Forms.Message& m) [0x00000] in <filename unknown>:0 
  at System.Windows.Forms.ScrollableControl.WndProc (System.Windows.Forms.Message& m) [0x00000] in <filename unknown>:0 
  at System.Windows.Forms.ContainerControl.WndProc (System.Windows.Forms.Message& m) [0x00000] in <filename unknown>:0 
  at System.Windows.Forms.Form.WndProc (System.Windows.Forms.Message& m) [0x00000] in <filename unknown>:0 
  at System.Windows.Forms.Control+ControlWindowTarget.OnMessage (System.Windows.Forms.Message& m) [0x00000] in <filename unknown>:0 
  at System.Windows.Forms.Control+ControlNativeWindow.WndProc (System.Windows.Forms.Message& m) [0x00000] in <filename unknown>:0 
  at System.Windows.Forms.NativeWindow.WndProc (IntPtr hWnd, Msg msg, IntPtr wParam, IntPtr lParam) [0x00000] in <filename unknown>:0 

Unhandled Exception: System.ObjectDisposedException: The object was used after being disposed.
  at System.Windows.Forms.Control.CreateHandle () [0x00000] in <filename unknown>:0 
  at System.Windows.Forms.Form.CreateHandle () [0x00000] in <filename unknown>:0 
  at System.Windows.Forms.Control.get_Handle () [0x00000] in <filename unknown>:0 
  at (wrapper remoting-invoke-with-check) System.Windows.Forms.Control:get_Handle ()
  at System.Windows.Forms.Application.RunLoop (Boolean Modal, System.Windows.Forms.ApplicationContext context) [0x00000] in <filename unknown>:0 
  at System.Windows.Forms.Form.ShowDialog (IWin32Window owner) [0x00000] in <filename unknown>:0 
  at System.Windows.Forms.Form.ShowDialog () [0x00000] in <filename unknown>:0 
  at Axiom.Framework.Exceptions.WinFormErrorDialog.Show (System.Exception exception) [0x00000] in <filename unknown>:0 
  at Axiom.Samples.Program.Main () [0x00000] in <filename unknown>:0 
[ERROR] FATAL UNHANDLED EXCEPTION: System.ObjectDisposedException: The object was used after being disposed.
  at System.Windows.Forms.Control.CreateHandle () [0x00000] in <filename unknown>:0 
  at System.Windows.Forms.Form.CreateHandle () [0x00000] in <filename unknown>:0 
  at System.Windows.Forms.Control.get_Handle () [0x00000] in <filename unknown>:0 
  at (wrapper remoting-invoke-with-check) System.Windows.Forms.Control:get_Handle ()
  at System.Windows.Forms.Application.RunLoop (Boolean Modal, System.Windows.Forms.ApplicationContext context) [0x00000] in <filename unknown>:0 
  at System.Windows.Forms.Form.ShowDialog (IWin32Window owner) [0x00000] in <filename unknown>:0 
  at System.Windows.Forms.Form.ShowDialog () [0x00000] in <filename unknown>:0 
  at Axiom.Framework.Exceptions.WinFormErrorDialog.Show (System.Exception exception) [0x00000] in <filename unknown>:0 
  at Axiom.Samples.Program.Main () [0x00000] in <filename unknown>:0
Comment 2 borrillis 2011-08-12 00:07:00 UTC
Copying libgdiplus.dylib from Mono 2.10.2 installation works correctly. ( so far )
Comment 3 Alex Corrado [MSFT] 2011-08-23 11:25:43 UTC
*** Bug 244 has been marked as a duplicate of this bug. ***
Comment 4 Miguel de Icaza [MSFT] 2011-09-02 11:06:14 UTC
Alex, can you confirm that this bug is now fixed?
Comment 5 Alex Corrado [MSFT] 2011-09-02 12:58:09 UTC
Yes, for some reason, cairo had been commented out as a build dep for libgdiplus, so libgdiplus had been building with the Mac system cairo (X11, not quartz). Fixed as of mono 2.10.5.
Comment 6 ingos 2014-10-08 09:08:37 UTC
Hi

I am having exactly the same problem with the latest mono 3.10.0 on MacOS 10.9.5. Any WinForms application crashes on startup with the error message: 

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] in <filename unknown>:0 
  at System.Windows.Forms.XplatUICarbon.PaintEventStart (System.Windows.Forms.Message& msg, IntPtr handle, Boolean client) [0x00000] in <filename unknown>:0 
  at System.Windows.Forms.XplatUI.PaintEventStart (System.Windows.Forms.Message& msg, IntPtr handle, Boolean client) [0x00000] in <filename unknown>:0 
  at System.Windows.Forms.Control.WmPaint (System.Windows.Forms.Message& m) [0x00000] in <filename unknown>:0 
  at System.Windows.Forms.Control.WndProc (System.Windows.Forms.Message& m) [0x00000] in <filename unknown>:0 
  at System.Windows.Forms.ScrollableControl.WndProc (System.Windows.Forms.Message& m) [0x00000] in <filename unknown>:0 
  at System.Windows.Forms.ContainerControl.WndProc (System.Windows.Forms.Message& m) [0x00000] in <filename unknown>:0 
  at System.Windows.Forms.Form.WndProc (System.Windows.Forms.Message& m) [0x00000] in <filename unknown>:0 

I checked for the symbol in libgdi as follows: 

nm /Library/Frameworks/Mono.framework/Versions/3.10.0/lib/libgdiplus.dylib |
grep GdipCreateFrom
000105ed T _GdipCreateFromHDC
0001078f T _GdipCreateFromHWND
0001079c T _GdipCreateFromXDrawable_linux

As you see, the symbol GdipCreateFromContext_macosx is missing.
Comment 7 maxlazar 2014-10-08 15:31:05 UTC
OS 10.8.5 here, same issue using mono 3.10.0 like the user above.
Comment 8 Lev Ledit 2014-10-10 03:34:14 UTC
sorry. same here. OSX 10.9.5: even at mono 3.10.0.20
Comment 9 Paul 2014-10-12 18:34:46 UTC
Same error on OS X 10.10 GM Candidate 3. (Current developer build as of this writing) Also running Mono 3.10.

But posting inside this old, resolved bug probably isn't going to get us anywhere. Someone should probably open a new one.
Comment 10 Paul 2014-10-12 18:42:36 UTC
As it turns out, they have this problem in their list of known issues for 3.10 in the release notes. Just mentioning it here so nobody else wastes their time searching for the error.
Personally, I'm going to downgrade to 3.8 until it's fixed.