Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
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
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.
Created attachment 1860 [details]
Solution to replicate the problem
If I run the attached project, XSP crashes with the following error:
If I remove the 'ForeColor="Red"' property from the TextBox in Default.aspx, the page loads without any errors.
The problem also occurs when I start XSP manually from the Terminal.
XSP tries to load the dylib from: /Library/Frameworks/Mono.framework/Versions/2.11/liblibgdiplus.dylib
But it is located at:
Mono 2.11.1 (master/426188e Thu Apr 19 19:14:12 EDT 2012)
Apple Developer Tools:
Xcode 4.3.2 (1177)
Here is a simpler test case for the same problem...
$ uname -a
Darwin enki.local 11.4.0 Darwin Kernel Version 11.4.0: Mon Apr 9 19:32:15 PDT 2012; root:xnu-1699.26.8~1/RELEASE_X86_64 x86_64
$ mono -V
Mono JIT compiler version 2.11.1 (master/426188e Thu Apr 19 19:14:12 EDT 2012)
Copyright (C) 2002-2012 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
Misc: debugger softdebug
GC: Included Boehm (with typed GC)
--- Create a very simple test program main.fs containing:
// Credit for original source snippet to:
type MainForm() as form =
let label1 = new Label()
member this.InitializeForm =
this.FormBorderStyle <- FormBorderStyle.Sizable
this.Text <- "Hello World Application"
this.Width <- 300
this.Height <- 300
label1.Text <- "Hello Internet!"
do Application.Run(new MainForm())
--- Compile and run:
$ fsharpc main.fs
$ mono main.exe
Unhandled Exception: System.TypeInitializationException: An exception was thrown by the type initializer for System.Windows.Forms.WindowsFormsSynchronizationContext ---> System.TypeInitializationException: An exception was thrown by the type initializer for System.Windows.Forms.ThemeEngine ---> System.TypeInitializationException: An exception was thrown by the type initializer for System.Windows.Forms.ThemeWin32Classic ---> System.TypeInitializationException: An exception was thrown by the type initializer for System.Drawing.KnownColors ---> System.TypeInitializationException: An exception was thrown by the type initializer for System.Drawing.GDIPlus ---> System.DllNotFoundException: /Library/Frameworks/Mono.framework/Versions/2.11/liblibgdiplus.dylib
Note the corrupted path to the library /Library/Frameworks/Mono.framework/Versions/2.11/liblibgdiplus.dylib, which should be /Library/Frameworks/Mono.framework/Versions/2.11/lib/libgdiplus.dylib
I tried including a trailing '/' in the DYLD path as follows:
$ export DYLD_LIBRARY_PATH="/Library/Frameworks/Mono.framework/Versions/2.11/lib/"
...to no avail.
As a 'hack', I tried:
$ sudo cp /Library/Frameworks/Mono.framework/Versions/2.11/lib/libgdiplus.0.dylib /Library/Frameworks/Mono.framework/Versions/2.11/liblibgdiplus.dylib
When I run with this hack in place, the app runs and the test window appears.
So, somewhere in Mono, it is preparing a search path, and not automatically appending a trailing '/' to the search path...
This seems to work now.