Bug 23444 - System.Drawing.GDIPlus GdiplusStartup exception
Summary: System.Drawing.GDIPlus GdiplusStartup exception
Status: VERIFIED FIXED
Alias: None
Product: Xamarin.Mac
Classification: Desktop
Component: Library (Xamarin.Mac.dll) ()
Version: 1.11.0
Hardware: PC Mac OS
: Normal normal
Target Milestone: ---
Assignee: Chris Hamons
URL:
Depends on:
Blocks:
 
Reported: 2014-09-28 21:23 UTC by troy-dawson
Modified: 2015-01-05 08:42 UTC (History)
3 users (show)

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


Attachments
Project to replicate the bug (6.46 KB, application/zip)
2014-09-28 21:23 UTC, troy-dawson
Details


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 Developer Community or GitHub 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:
VERIFIED FIXED

Description troy-dawson 2014-09-28 21:23:56 UTC
Created attachment 8221 [details]
Project to replicate the bug

Seeing this during the build of OpenTK.dll and in my own code during execution

Full exception:

An exception was thrown by the type initializer for System.Drawing.GDIPlus ---> System.Exception: GdiplusStartup

Versions:

Xamarin Studio
Version 5.5 (build 198)
Installation UUID: 4b991e3f-5b17-407e-970d-153a6e5764e2
Runtime:
	Mono 3.10.0 ((detached/ac51002)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 310000016

Apple Developer Tools
Xcode 6.1 (6307)
Build 6A1030

Xamarin.Mac
Version: 1.11.0.1 (Indie Edition)

With the latest Mono from the alpha release channel, attached project should raise an typenotfound exception when run at:

			var image = Image.FromStream(content);

because GDIPlus can't be initialized or something.

This is similar to another bug I filed where Image.FromStream() takes a very long time to return when Mono is first run.
Comment 1 Sadik Ali 2014-09-29 06:43:22 UTC
I have checked this issue and able to reproduce this. To reproduce this I have followed the sample application and instruction provided in bug description.

Steps I have followed:

1. Open attached sample application in XS
2. Clean and build the solution, it will build successfully
3. Run the application you will get the following exception:

Exception:  https://gist.github.com/Rajneesh360Logica/1d817c53d26cfed025a5

Screencast: http://www.screencast.com/t/4cP7jOWu2S0M

Environment info:  
=== Xamarin Studio ===

Version 5.5 (build 198)
Installation UUID: 011d70a5-dede-428b-ab04-ef451c2e539d
Runtime:
	Mono 3.10.0 ((detached/53e3161)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 310000018

=== Apple Developer Tools ===

Xcode 6.0.1 (6528)
Build 6A317

=== Xamarin.Mac ===

Version: 1.11.0.1 (Enterprise Edition)

=== Xamarin.Android ===

Version: 4.16.0.17 (Enterprise Edition)
Android SDK: /Users/MM/Desktop/android-sdk-macosx
	Supported Android versions:
		2.1    (API level 7)
		2.2    (API level 8)
		2.3    (API level 10)
		3.1    (API level 12)
		3.2    (API level 13)
		4.0    (API level 14)
		4.0.3  (API level 15)
		4.1    (API level 16)
		4.2    (API level 17)
		4.3    (API level 18)
		4.4    (API level 19)
		4.4.87 (API level 20)
		4.5    (API level 21)
Java SDK: /usr
java version "1.7.0_65"
Java(TM) SE Runtime Environment (build 1.7.0_65-b17)
Java HotSpot(TM) 64-Bit Server VM (build 24.65-b04, mixed mode)

=== Xamarin.iOS ===

Version: 8.0.0.63 (Enterprise Edition)
Hash: 58b46df
Branch: 
Build date: 2014-09-18 22:32:07-0400

=== Build Information ===

Release ID: 505000198
Git revision: 7495942eb76d6b80c460ddd61f2b94cba1a97fa2
Build date: 2014-09-18 09:50:12-04
Xamarin addins: c571b625445d60f2c8b189b309a6ffc87386caed

=== Operating System ===

Mac OS X 10.9.5
Darwin MacMini.local 13.4.0 Darwin Kernel Version 13.4.0
    Sun Aug 17 19:50:11 PDT 2014
    root:xnu-2422.115.4~1/RELEASE_X86_64 x86_64
Comment 2 troy-dawson 2014-10-03 20:29:27 UTC
This is fixed with

Version 5.5 (build 227)
Installation UUID: 4b991e3f-5b17-407e-970d-153a6e5764e2
Runtime:
	Mono 3.10.0 ((detached/633e444)
	GTK+ 2.24.23 (Raleigh theme)
Comment 3 Prashant manu 2015-01-05 08:42:39 UTC
We have checked and no error is shown on running the attached sample.
Screencast: http://www.screencast.com/t/1abA5oNgeU

Environment Info:
Xamarin Studio
Version 5.7 (build 660)
Installation UUID: 0b7eaebc-a0ed-4b58-81df-91e378cad28c
Runtime:
 Mono 3.12.0 ((detached/a813491)
 GTK+ 2.24.23 (Raleigh theme)

 Package version: 312000068

Xamarin.Android
Version: 4.20.0.28 (Business Edition)
Android SDK: /Users/Admin_Mac/Desktop/Anddk/android-sdk-macosx
 Supported Android versions:
  2.1    (API level 7)
  2.2    (API level 8)
  2.3    (API level 10)
  3.1    (API level 12)
  4.0    (API level 14)
  4.0.3  (API level 15)
  4.1    (API level 16)
  4.2    (API level 17)
  4.3    (API level 18)
  4.4    (API level 19)
  4.4.87 (API level 20)
  5.0    (API level 21)
Java SDK: /usr
java version "1.7.0_25"
Java(TM) SE Runtime Environment (build 1.7.0_25-b15)
Java HotSpot(TM) 64-Bit Server VM (build 23.25-b01, mixed mode)

Apple Developer Tools
Xcode 6.1.1 (6611)
Build 6A2008a

Xamarin.iOS
Version: 8.6.0.45 (Business Edition)
Hash: 0376f62
Branch: 
Build date: 2014-12-23 17:34:21-0500

Xamarin.Mac
Version: 1.11.3.0 (Business Edition)

Build Information
Release ID: 507000660
Git revision: 6a74f9bdb90d9415b597064d815c9be38b401fee
Build date: 2014-12-18 00:38:00-05
Xamarin addins: 57be0f5e1433cb58b70ea9b52e9dc77ad791be40

Operating System
Mac OS X 10.10.2
Darwin Admin-Macs-Mac-mini.local 14.1.0 Darwin Kernel Version 14.1.0
    Thu Nov 13 18:36:56 PST 2014
    root:xnu-2782.10.65~2/RELEASE_X86_64 x86_64