Bug 26431 - Xamarin Profiler hangs on OSX 10.10.1 for Xamarin.Mac applciation
Summary: Xamarin Profiler hangs on OSX 10.10.1 for Xamarin.Mac applciation
Alias: None
Product: Profiler
Classification: Xamarin
Component: General ()
Version: unspecified
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: ---
Assignee: Rodrigo Moya
Depends on:
Reported: 2015-01-26 16:02 UTC by George
Modified: 2015-04-29 17:27 UTC (History)
6 users (show)

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

Xamarin Profiler Logs. (1.76 KB, application/zip)
2015-01-26 16:02 UTC, George
Updated logs for the 0.10-720 profiler. (1.81 KB, application/zip)
2015-01-27 13:34 UTC, George
Mac Build Project Options Screenshot (134.13 KB, image/png)
2015-01-27 15:05 UTC, George

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 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:

Description George 2015-01-26 16:02:30 UTC
Created attachment 9508 [details]
Xamarin Profiler Logs.

When clicking the run button of the Xamarin Profiler after selecting a target, it hangs for ~30 seconds and then I get a popup with the following message:


After this popup is displayed, and I close it, the Profiler still has not started, and if I click run again, the same behavior happens.

OS Version: OSX 10.10.1
Xamarin Profiler Version: 0.10-720 (1)

Attached are the logs for the Profiler but it does not look like they will be useful for deciphering this error.  Also to note, the Xamarin Profiler does work fine IF I use Mono's Ahead-Of-Time compiler on the code before I run the profiler.

Comment 1 Stephen Shaw 2015-01-26 16:43:59 UTC
What are you profiling? iOS? Android?
If you are profiling iOS, is sgen enabled?

It looks like you are also using an older preview build. Could you try this with a newer version -> http://xamarin.com/profiler
Comment 2 Rodrigo Moya 2015-01-26 17:18:58 UTC
Seems you have an old copy of the profiler under ~/Downloads, even though you seem to have installed the newer version. So can you please remove that and re-try and then attach the logs that are now under ~/Library/Logs/Xamarin.Profiler with the new version?
Comment 3 Rodrigo Moya 2015-01-26 17:32:57 UTC
Oh, it's a Xamarin.Mac application. Support for that is preliminary, so please get the logs (~/Library/Logs/Xamarin.Profiler) so that we can have a look at what the problem is and fix it
Comment 4 George 2015-01-26 18:18:11 UTC
The logs were attached to the original post I made.  They should still be there, but I do not think they will be much help as there was no error output in them...

I will also make sure that I have any old versions of the profiler uninstalled.

Comment 5 Rodrigo Moya 2015-01-27 12:57:46 UTC
Those logs are from the old version, which you seem to have in your Downloads folder. So please remove that, and run the profiler installed (in /Applications) from the 0.10-720 .pkg file. Then, get the logs from the new location which is ~/Library/Logs/Xamarin.Profiler
Comment 6 George 2015-01-27 13:34:07 UTC
Created attachment 9517 [details]
Updated logs for the 0.10-720 profiler.
Comment 7 George 2015-01-27 13:34:52 UTC
Verified that these are the logs from the 0.10-720 version of the Profiler.
Comment 9 George 2015-01-27 14:25:45 UTC
No that would not be possible.  Any other ideas?  Thanks.
Comment 10 Stephen Shaw 2015-01-27 14:27:52 UTC
I'm working on creating something I could maybe use to reproduce the problem locally.

What are the settings under "Mac Build" in the "Project Options"? Would you be able to take a screenshot?
Comment 11 George 2015-01-27 15:05:52 UTC
Created attachment 9523 [details]
Mac Build Project Options Screenshot
Comment 12 Rodrigo Moya 2015-01-28 12:13:50 UTC
Could you please try to profile by hand with the runtime profiler and see if there is any error? To do so, on a terminal:

$ MONO_ENV_OPTIONS=--profile=log:sample,alloc "/Users/beardeng/Projects/CloudDriveDesktopDotNet/MacUI/bin/Debug/Amazon Cloud Drive App.app/Contents/MacOS/$binary"

where $binary is the name of the binary in the .../Contents/MacOS/ dir.

Let us know if there's any error output to the terminal
Comment 13 George 2015-01-28 12:38:02 UTC
Hi Rodrigo, 

I only get my applications log/debug output when I run the two terminal commands above, no profile output.  Is there part of a command missing that you listed above?
Comment 14 Rodrigo Moya 2015-01-28 16:19:45 UTC
it's only one command, or 2 if you do:

$ export MONO_ENV_OPTIONS=--profile=log:sample,alloc
$ "/Users/beardeng/Projects/CloudDriveDesktopDotNet/MacUI/bin/Debug/Amazon Cloud Drive App.app/Contents/MacOS/$binary"

if running these 2 commands you still see the log/debug output from your app, you should have an output.mlpd file in the dir where you ran the commands, in which case it means the runtime profiler works, and the problem is on the profiler UI.

So yes, please run them and let us know what you get
Comment 19 George 2015-01-29 12:20:22 UTC
So I have been working on this for the past few hours and have
made a little progress.

First, attached are several logs.
- Terminal Output.logs 1 and 2 show the output after running the commands you
requested I run.  
- Profiler Crash Rurn.logs 1 and 2 show an Apple exception report after
launching the app in the Xamarin Profiler.

What I have noticed is the exception that crashes the app is always either:

Crashed Thread:        3
Exception Type:        EXC_CRASH (SIGABRT)
Exception Codes:       0x0000000000000000, 0x0000000000000000


Crashed Thread:        3
Exception Type:        EXC_BAD_ACCESS (SIGABRT)
Exception Codes:       KERN_PROTECTION_FAILURE at 0x00000000006a1000

Also, one last observation.  When I specify the Mono runtime should be
included in the application bundle in Xamarin Studio(under Project Options -> Mac Build), the application will not run with the commands you gave me, and the
application will not even launch in the Xamarin Profiler.  When this setting is checked, the Xamarin Profiler errors with the original spinning wheel of death followed by the tmp folder popup error that we were discussing yesterday.  Once I uncheck the setting, the app launches in the Xamarin Profiler and I receive the crash logs I have attached.
Comment 20 Rodrigo Moya 2015-01-29 17:03:22 UTC
Kumpera, this looks like a crash in the runtime profiler, from what I can see in the 'Terminal Output*' files
Comment 21 Rodrigo Kumpera 2015-01-29 22:31:57 UTC
Paolo, one of the crash logs has good line information and is actionable, can you take a look at it?
Comment 22 George 2015-02-09 14:20:02 UTC
Have you been able to make any progress given the crash logs I provided.  Thanks.
Comment 24 Rodrigo Moya 2015-04-15 09:12:20 UTC
With the packages in the alpha channel this should work now, so doing some internal tests before it can be closed
Comment 25 Rodrigo Moya 2015-04-29 17:27:11 UTC
It works here, without including the mono runtime in the app bundle, which is already fixed also on our internal builds, so will be out in a future update. But yes, as I said, if you don't include the mono runtime in the app bundle, and with the packages in Alpha/Beta (and soon stable) channels (that is, Xam.mac 2.0), this works for the apps I have tried with.

So closing. George, if you can replicate it, please re-open