Bug 43199 - mono-symbolicate for android is not working properly.
Summary: mono-symbolicate for android is not working properly.
Alias: None
Product: Android
Classification: Xamarin
Component: MSBuild ()
Version: 7.1 (C9)
Hardware: PC Mac OS
: High major
Target Milestone: master
Assignee: dean.ellis
Depends on:
Reported: 2016-08-09 17:45 UTC by Rajneesh Kumar
Modified: 2017-03-31 15:02 UTC (History)
8 users (show)

Tags: potentialC8SR2
Is this bug a regression?: Yes
Last known good build: C7SR1

Test case, mysm folder, and crash log (1.99 MB, application/zip)
2016-09-01 21:21 UTC, Peter Collins

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:

Comment 1 Peter Collins 2016-09-01 21:21:45 UTC
Created attachment 17306 [details]
Test case, mysm folder, and crash log

I'm still able to reproduce this with monodroid/master/eeb4af59 which contains the latest fixes for using MVID folders.

### Steps to reproduce ###
1. Run `mono-symbolicate`
>      mono-symbolicate com.xamarin.simplecrash.apk.msym SimpleCrashSymbolicationTest.log
Comment 2 dean.ellis 2016-09-02 08:52:12 UTC

which mono-symbolicate is being run? 

Older versions will not handle the new structure afaik.
when you run


you should see

'Usage: symbolicate [options] <msym dir> <input file>
       symbolicate [options] store-symbols <msym dir> [<dir>]+

Available options:
  -h, --help                 Show this help
  -q                         Quiet, warnings are not displayed
  -v                         Verbose, log debug messages

If store-symbols is not present then its an older version.
Comment 3 Peter Collins 2016-09-02 20:16:05 UTC
I'm using the latest version from mono-4.6.0-branch which contains the changes you've mentioned.
Comment 4 dean.ellis 2016-09-07 10:11:25 UTC

I just tried the following 

1) mkdir example and cd example
2) create Program.cs

"using System;
using System.IO;
using System.Threading.Tasks;

namespace webclienttest
	class MainClass
		public static void Main (string[] args)
			throw new Exception( "Foo" );

3) mcs -debug -out:Program.exe Program.cs 
4) mkdir mSYM
5) mono-symbolicate store-symbols mSYM/ . /Library/Frameworks/Mono.framework/Versions/Current/lib/mono/4.5/
6) rm Program.exe.mdb 
7) mono Program.exe > crash.log 2>&1
8) mono-symbolicate mSYM/ crash.log 

Unhandled Exception:
System.Exception: Foo
  at webclienttest.MainClass.Main (System.String[] args) [0x00001] in <5d79478c053f4b238359ee1737afa8b2>:0 
  at webclienttest.MainClass.Main (System.String[] args) [0x00001] in <5d79478c053f4b238359ee1737afa8b2>:0 "

which is clearly wrong. I think this needs to be re-assigned to the runtime team as mono-symbolicate doesn't seem to be working. Can you try this on a standard .net app?

I am running mono-4.6.0-branch/d0fc1a6
Comment 5 Luis Aguilera 2016-09-12 20:11:44 UTC
since C8 is now closed, and is shipping this week, I will move this but to the C8SR1 milestone. We'll continue working on the issue seeking it's resolution as soon as possible.
Comment 6 Marek Safar 2016-11-23 16:49:47 UTC
I cannot reproduce the issue with Mono 4.8.
Comment 8 Marek Safar 2016-12-15 17:50:14 UTC
Which steps did you use. I cannot reproduce it as I wrote using steps from https://bugzilla.xamarin.com/show_bug.cgi?id=43199#c4.

It works as expected with output like

Unhandled Exception:
System.Exception: Foo
  at webclienttest.MainClass.Main (System.String[] args) [0x00001] in /Users/marek/git/mono/mcs/mcs/temp3/Program.cs:11
  at webclienttest.MainClass.Main (System.String[] args) [0x00001] in /Users/marek/git/mono/mcs/mcs/temp3/Program.cs:11
Comment 9 Peter Collins 2016-12-15 18:37:54 UTC
@Marek the original description should be detailed enough in order to test from an XA context, as the bug report initially indicated.

Though, if Deans steps are working for you now with a newer Mono version perhaps @Dean could also take another look?
Comment 10 Rodrigo Kumpera 2016-12-20 17:14:11 UTC
Possible fix: https://github.com/mono/mono/pull/4181
Comment 11 Rodrigo Kumpera 2016-12-21 13:07:46 UTC
Comment 13 Rodrigo Kumpera 2017-01-03 22:02:16 UTC
Looks like a bug in Android then for not producing a msym directory.
Comment 14 dean.ellis 2017-03-31 15:02:20 UTC
This looks like its fixed in the latest master builds.
Marking it as such. Please re-open if its still broken.