Bug 36210 - Profiler doesn't work for normal console .exe, can't open mlpd in temp
Summary: Profiler doesn't work for normal console .exe, can't open mlpd in temp
Alias: None
Product: Profiler
Classification: Xamarin
Component: General ()
Version: unspecified
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: ---
Assignee: Rodrigo Moya
Depends on:
Reported: 2015-11-24 10:49 UTC by Alexander Köplinger [MSFT]
Modified: 2016-01-22 12:22 UTC (History)
6 users (show)

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

Profiler.log (2.48 KB, application/octet-stream)
2015-11-24 10:49 UTC, Alexander Köplinger [MSFT]

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 Alexander Köplinger [MSFT] 2015-11-24 10:49:11 UTC
Created attachment 13973 [details]

Profiling the following simple console .exe compiled in XS:

>using System;
>namespace MyConsoleApp
>	class MainClass
>	{
>		public static void Main(string[] args)
>		{
>			Console.WriteLine($"Hello World {DateTime.Now}");
>			var x = new Byte[50000];
>			Console.ReadLine();
>		}
>	}

... raises the following error when trying to start a profile session via Profiler -> File -> Open:

> An error has occurred
> could not open /var/folders/cs/kt8x25p14g9dlk_p192rd7th0000gn/T/ubimxhjr.mlpd

Looks like it can't create the temp file, maybe an El Capitan issue?
Comment 1 Rodrigo Moya 2015-11-25 12:32:41 UTC
I'd say the runtime profiler is not loaded, which is the one creating the mlpd. Can you profile that same app on the command line?
Comment 2 Alexander Köplinger [MSFT] 2015-11-25 13:36:29 UTC
Yes, if I paste the failing command from the profiler logfile into the terminal, it works fine and generates the mlpd at the correct location.
Comment 3 Rodrigo Moya 2015-11-27 04:17:02 UTC
This should be fixed in profiler master now
Comment 4 James Humphries 2015-11-27 04:18:46 UTC
Any idea as to when a new release with this fix will be available?
Comment 5 Alexander Köplinger [MSFT] 2015-11-27 06:21:27 UTC
I tested with the latest internal build from Wrench and can confirm it works now. Thanks, Rodrigo!
Comment 6 Rodrigo Moya 2015-11-27 06:27:19 UTC
James, the next version of the profiler is taking a bit more time than usual because we've added some exciting new features that need more integration work and testing, so we are right now in the process of stabilizing it and getting in place all the needed bits in other Xamarin products, so next release, which will contain this fix and the "exciting new features", should be soon, hope in the next 2/3 weeks.

For the time being, if it's failing for you, profile the console app with mono on a terminal (copy/paste the command from the profiler's log), and then you can read the resulting MLPD in the profiler UI. Ugly, but at least you'll be able to have it work while you wait for the next release.
Comment 7 Udham Singh 2015-11-30 19:28:36 UTC
I have checked this issue with latest profiler build profiler-mac-0.24-331 and still getting the reported issue.

Screencast : http://www.screencast.com/t/lFi9IZBy4O
Profiler Log : https://gist.github.com/Udham1/106be57f8a2b0680dca9
Environment Info (mac) : https://gist.github.com/Udham1/a63011fb4235bf2b152f

As of now I am reopening this issue, please let me know with which build should I have to verify this issue.

Comment 8 Alexander Köplinger [MSFT] 2015-11-30 19:33:35 UTC
@Udham your log files say you're using Xamarin Profiler 0.24-286 (it worked with 0.24-331 for me).
Comment 9 Udham Singh 2015-12-01 09:32:29 UTC
Sorry @Alexander, by mistake I had checked this issue with last week build. Thanks for the confirmation.

I have checked this issue with latest profiler-mac-0.24-331 and observed that if we select Console.exe via profiler target dropdown then it works fine. But if we try to select Console.exe via "Profiler > > File > Open..." then Console.exe is displaying in disabled mode in Open File dialog window and I have filed bug https://bugzilla.xamarin.com/show_bug.cgi?id=36409 for the same.

I will closing this issue once the issue https://bugzilla.xamarin.com/show_bug.cgi?id=36409 will be fixed.

Comment 10 Rodrigo Moya 2016-01-13 14:55:24 UTC
Closing this one, as bug #36409 already has the remaining bug.
Comment 11 Udham Singh 2016-01-22 12:22:30 UTC
As per comment https://bugzilla.xamarin.com/show_bug.cgi?id=36409#c2 I am closing this issue.