Bug 10958 - Can't run Gtk# or System.Windows.Forms applications on Mac OSX 10.8.2
Summary: Can't run Gtk# or System.Windows.Forms applications on Mac OSX 10.8.2
Status: RESOLVED DUPLICATE of bug 10957
Alias: None
Product: Gtk#
Classification: Mono
Component: gtk-sharp ()
Version: 2.x
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2013-03-07 03:29 UTC by Narcís Calvet
Modified: 2013-03-08 03:01 UTC (History)
2 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 DUPLICATE of bug 10957

Description Narcís Calvet 2013-03-07 03:29:28 UTC
I have found that applications using System.Windows.Forms an Microsoft.VisualBasic namespaces, that used to work with OSX 10.7.5, failed to run with OSX 10.8.2. Going back to the basics to find out where the problem was, I also found that running an empty Gtk# application created from scartch via command line through mono also fails with this error message:

Unhandled Exception: System.TypeInitializationException: An exception was thrown by the type initializer for Gtk.Application ---> System.DllNotFoundException: glibsharpglue-2 at (wrapper managed-to-native) GLib.Thread:glibsharp_g_thread_supported () at GLib.Thread.get_Supported () [0x00000] in :0 at Gtk.Application..cctor () [0x00000] in :0 --- End of inner exception stack trace --- at GtkDialogs.MainClass.Main (System.String[] args) [0x00000] in :0 [ERROR] FATAL UNHANDLED EXCEPTION: System.TypeInitializationException: An exception was thrown by the type initializer for Gtk.Application ---> System.DllNotFoundException: glibsharpglue-2 at (wrapper managed-to-native) GLib.Thread:glibsharp_g_thread_supported () at GLib.Thread.get_Supported () [0x00000] in :0 at Gtk.Application..cctor () [0x00000] in :0 --- End of inner exception stack trace --- at GtkDialogs.MainClass.Main (System.String[] args) [0x00000] in :0

At http://forums.xamarin.com/discussion/comment/6749#Comment_6749, Jonathan Pryor suggest that's because libglibsharpglue-2.dylib can't be found. You likely need to set $DYLID_LIBRARY_PATH or $DYLD_FALLBACK_LIBRARY_PATH so that it can be found. I'd think (hope?) that this should be set by default.

I submitted another bug which might be related to this: https://bugzilla.xamarin.com/show_bug.cgi?id=10957
Comment 1 Mikayla Hutchinson [MSFT] 2013-03-07 20:55:22 UTC

*** This bug has been marked as a duplicate of bug 10957 ***
Comment 2 Narcís Calvet 2013-03-08 03:01:29 UTC
Sorry if I didn't explain the issues correctly. I submitted two of them upon Jonathan Pryor's request at http://forums.xamarin.com/discussion/comment/6749#Comment_6749. IMO one issue is about System.Windows.Forms & Microsoft.VisualBasic and the other one is about Gtk#. Both of them are about not working properly on Mac OSX 10.8.2 though.