[Mono-winforms-list] Regression in Winforms Support for version > 3.0

Baltasar García Perez-Schofield baltasarq at gmail.com
Wed Apr 9 19:21:25 UTC 2014


Hi, all of you.

I've finally found a solution to this problem by myself. Since probably
many people will stumble upon this, I think it is better to somehow
register it.

The problem seems to be in System.Drawing. When you try to launch an
application using WinForms, it crashes with:

==
Unhandled exception
...snip...
Missing dll: /tmp/install/lib/libgdiplus.so
==

This is particularly confusing on Windows, where one would think this file
should be already present.

The key to this problem is already in the Xamarin bugtrack system, bug 8309:
https://bugzilla.xamarin.com/show_bug.cgi?id=8309

The problem seems to be related to the following two lines in the file
$INSTDIR\etc\mono\config:

==

<dllmap dll="ggdiplus" target="/tmp/install/lib/libgdiplus.so" />
<dllmap dll="ggdiplus.dll" target="/tmp/install/lib/libgdiplus.so" />

==

Being INSTDIR the installation directory of mono. Note that this happens in
Windows, maybe that "etc" could be confusing, but it is just a subdirectory
of the mono installation.

Removing both lines immediately solves the problem.

==
Because bugs happen :)
Locate $mono-prefix/etc/mono/config and add an os="!windows" attribute
to all gdiplus & gdi32 DLL mapps.
==

Thanks Robert. I found the solution just before reading your message. I
suppose I've been more taxative.

This bug invalidates the use of this version of Mono for any final user
trying to run an application employing WinForms, and there are quite a lot
out there.

An yep, bugs happen. However, the bug was found in 11/2012 (mono 3.0.1),
and bug 14586, a duplicate of this bug, was (re-)found in 09/2013.
Currently, in 4/2014 (mono-3.2.3), the bug has not still been solved, while
the fix seems just to add an os="!windows" attribute to those lines.  I
understand that WinForms is not a valuable asset for Xamarin, but this
seems strange anyway.

-- Baltasar
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ximian.com/pipermail/mono-winforms-list/attachments/20140409/2ef11f7e/attachment.html>


More information about the Mono-winforms-list mailing list