Bug 20210 - Simple reference to System.Drawing.Color freezes app
Summary: Simple reference to System.Drawing.Color freezes app
Status: RESOLVED DUPLICATE of bug 17225
Alias: None
Product: Xamarin.Mac
Classification: Desktop
Component: Library (Xamarin.Mac.dll) ()
Version: 1.8.0
Hardware: PC Windows
: Normal normal
Target Milestone: ---
Assignee: Aaron Bockover [MSFT]
URL:
Depends on:
Blocks:
 
Reported: 2014-05-30 13:34 UTC by Jeff Simon
Modified: 2014-09-10 09:29 UTC (History)
5 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 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:
RESOLVED DUPLICATE of bug 17225

Description Jeff Simon 2014-05-30 13:34:45 UTC
In a fresh osx install with Xamain Studio 5.0, I created a new "Xamarin.Mac" project, and in the MainWindowController's Initialize function, added the following line:

     Color c = Color.Red;

Put a breakpoint on that line, run to it, step over it - it never comes back.
Comment 1 Jeff Simon 2014-05-30 13:41:16 UTC
Oop, it actually just came back.  I happened to not stop it and it eventually stepped over the line.  It now no longer has the problem, so I'm guessing it had to jit something (or whatever black magic you guys are doing).  Not sure if you consider this a bug, but it definitely had me stumped for a while until I got lucky enough to just let it run...
Comment 2 Jeff Simon 2014-05-30 14:34:34 UTC
Last note: it took probably 5-10 minutes before it stepped over the line.
Comment 3 Shruti 2014-07-16 07:30:17 UTC
I have tried this issue  but not able to reproduce it. Followed  steps are : 
1. I have added code 'Color c = Color.Red' in MainWindowController ()' 
2. Added breakpoint at (i) Color c = Color.Red and (ii) Initialize() method.
3. Run the project and debugger appear at first breakpoint.
4. I clicked on 'StepOver' button and debugger moved to next breakpoint.

Screencast : http://www.screencast.com/t/aCfftjgJof5

Environment Info : 
Xamarin Studio
Version 5.0 (build 878)
Installation UUID: 3dbf10c4-ed30-4e55-8a8b-1704777c7b5f
Runtime:
	Mono 3.6.0 ((no/c46cf0e)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 306000038

Xamarin.Mac: 1.8.0.8
Comment 4 David Lilley 2014-08-06 04:24:42 UTC
I have also hit this bug too.. Is there somewhere I can +1 it.
Comment 5 David Lilley 2014-08-06 05:03:47 UTC
I have also tried to make a simple test case but it works fine in the simple case but fails in my working project, Nothing obvious in the project setups or code difference. Once the line has passed it remains quick. I think I have seen this before and remember reading the reason it was loading up all the system fonts in to its cache... ???? Jeff did you manage to make a simple test project ?


=== Xamarin Studio ===

Version 5.2 (build 386)
Installation UUID: 7d614215-ae86-4132-8cff-53347f7978db
Runtime:
	Mono 3.6.0 ((no/f540f8a)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 306000039

=== Xamarin.Android ===

Not Installed

=== Apple Developer Tools ===

Xcode 5.0.2 (3335.32)
Build 5A3005

=== Xamarin.iOS ===

Version: 7.2.6.28 (Business Edition)
Hash: 606f31a
Branch: 
Build date: 2014-08-01 15:27:48-0400

=== Xamarin.Mac ===

Version: 1.8.1.6

=== Build Information ===

Release ID: 502000386
Git revision: e6a54dee5376e6e7a2d9982695b060fddc09e65d
Build date: 2014-08-04 14:03:28-04
Xamarin addins: 2b5a5c26ac2ee74c6e91a8d24ef44d0ca9cb74d0

=== Operating System ===

Mac OS X 10.9.4
Darwin Dave-Lilleys-iMac.local 13.3.0 Darwin Kernel Version 13.3.0
    Tue Jun  3 21:27:35 PDT 2014
    root:xnu-2422.110.17~1/RELEASE_X86_64 x86_64
Comment 6 David Lilley 2014-08-06 06:34:55 UTC
May be a work around ?

By Placing  System.Drawing.Color aColor = System.Drawing.Color.Red; as soon as I awoke from nib in my my main app this reference had no delay, this seemed to make my later reference work fine with out delay.
Comment 7 David Lilley 2014-08-11 05:27:24 UTC
Actually this work around did not work on other machines..Only for Developer machine it worked. Very Confused.
Comment 8 Chris Hamons 2014-08-20 18:10:18 UTC
So I believe this is an issue we've sorted out internally related to fontconfig.

David, on the machine that is having trouble, could you try running your Xamarin.Mac application one time as root:

sudo ./Foo.app/Contents/MacOS/Foo

(with Foo being your app name on the terminal).

If running the app normally on the machine after that is fast, then I can provide other work arounds.
Comment 9 Johan H 2014-08-27 05:28:16 UTC
I beleive this bug is a duplicate of bug 17225.

https://bugzilla.xamarin.com/show_bug.cgi?id=17225
Comment 10 David Lilley 2014-09-02 04:17:15 UTC
Hi Chris and Johan

I believe it is bug 17225 as well,

Chris I don't need a work around I have adopted a different approach but if you need me to test let me know.

Cheers
Dave
Comment 11 Chris Hamons 2014-09-10 09:29:05 UTC
Yep, I thought it was 17225 but the workaround was to test that before i marked it as duplicate in case I was wrong.

*** This bug has been marked as a duplicate of bug 17225 ***