[Mono-osx] System.Drawing not working on OSX 10.8 (latest Mono)

aresm mono at reikan.co.uk
Mon Oct 1 18:06:27 UTC 2012


I'm hoping someone might have a simple pointer for me here.

As soon as I construct a Bitmap (System.Drawing.Bitmap) in my Mono,
everything just hangs.  I noticed this in a complex application, and tried
it in a very simple MonoMac demo app (one window, no code other than the
MonoMac new project code except to create an instance of a Bitmap).

My understanding from reading other information about this is that on the
first use of Bitmap, a call to the global GdiPlus Initialisation code is
called and it's this that causes a problem.

I'm succesfully using the same version of the Mono framework (2.10.9) on OSX
10.7.4 (Lion) without any issue, and I believe it's also worked on at least
one 10.8 machine also.

Note that my 10.8 machine is a new (2 days old) Mac Mini with a fresh 10.8
install and very few applications installed (just Xcode, MonoDevelop, Mono
framework and a few other bits and pieces).

I wonder if this is an issue with the bindings to Cecil built into GdiPlus
in Mono?

Incidentally, I realise that System.Drawing is not the native graphics
interface for OSX, but the software I'm writing was originally written for
the PC and ported to Mac.  Eventually the System.Drawing code will be
replaced with CoreGraphics based code but that's a BIG task right now!

Does anyone have any ideas about this problem and how I might be able to fix

Thanks for any input.


View this message in context: http://mono.1490590.n4.nabble.com/System-Drawing-not-working-on-OSX-10-8-latest-Mono-tp4656801.html
Sent from the Mono - OSX mailing list archive at Nabble.com.

More information about the Mono-osx mailing list