Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
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
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.
Created attachment 21468 [details]
Visual Studio install details
In the current preview of Mono 5, there seems to be a bug, regression, or missing functionality around "System.Reflection.MethodBase.GetCurrentMethod().DeclaringType;".
I consistently receive this exception:
System.NotSupportedException: Stack walks are not supported on this platform.
at (wrapper managed-to-native) System.Reflection.MethodBase:GetCurrentMethod ()
I'm attaching a sample Xamarin.Android app that demonstrates the issue. This same code works fine in the latest stable version of Mono.
Created attachment 21469 [details]
Xamarin.Android Repro App
Does this happen on a simulator, or on a real device ?
For sure on a Google API 23 emulator
@Zoltan - Some additional info I gathered this morning
Also crashes on:
Google API 24 emulator
Google API 25 emulator
NO crash on:
Moto E 2nd gen API 22 (debug & release build configurations)
Nexus 5 hardware API 23 (debug & release build configurations)
Nexus 6P hardware API 25 (debug & release build configurations)
@Zoltan - I might have some additionally useful information.
Running on x86_64 emulator image
x86 ABI selected + x86_64 ABI unselected => WORKS!!
x86 ABI unselected + x86_64 ABI selected => crash
Created attachment 22012 [details]
Preview 10 VS for Mac Details
Created attachment 22013 [details]
API23 x86_64 Google Emulator
Here's one example of an Android emulator where the repro app crashes. Please note that you need to click the button to observe the crash.
Here's the crash stack:
CrashTest Exception: System.NotSupportedException: Stack walks are not supported on this platform.
at (wrapper managed-to-native) System.Reflection.MethodBase:GetCurrentMethod ()
at CrashTest.MainActivity.GetDeclaringType () [0x00002] in /Users/chrisr/Downloads/CrashTest/CrashTest/MainActivity.cs:37
Setting as confirmed as I can reproduce this issue when running the test project on a Google x86_64 emulator running Marshmallow.
## Steps to reproduce:
1. Load the Repro app
2. Open the Android Project Options->Android Build->Advanced tab
3. Deselect all supported ABIs EXCEPT x86_64
4. Build and run the app to an x86_64 emulator
5. Click the button
Expected result: Button's text will be updated to say "1 MainActivity Clicks!"
Actual result: App crashes with exception and stack trace below:
>System.NotSupportedException: Stack walks are not supported on this platform.
> at at (wrapper managed-to-native) System.Reflection.MethodBase:GetCurrentMethod ()
> at CrashTest.MainActivity.GetDeclaringType () [0x00022] in /Users/jongoldberger/Downloads/CrashTest/CrashTest/MainActivity.cs:42
> at CrashTest.MainActivity+<>c__DisplayClass1_0.<OnCreate>b__0 (System.Object <p0>, System.EventArgs <p1>) [0x00001] in /Users/jongoldberger/Downloads/CrashTest/CrashTest/MainActivity.cs:28
> at Android.Views.View+IOnClickListenerImplementor.OnClick (Android.Views.View v) [0x00011] in <33e6e739ac344166b157e323586f11a1>:0
> at Android.Views.View+IOnClickListenerInvoker.n_OnClick_Landroid_view_View_ (System.IntPtr jnienv, System.IntPtr native__this, System.IntPtr native_v) [0x0000f] in <33e6e739ac344166b157e323586f11a1>:0
> at at (wrapper dynamic-method) System.Object:d5595756-92bd-4e78-9420-4ec888bd7ea4 (intptr,intptr,intptr)
=== Visual Studio for Mac Preview ===
Version Preview 10 (7.0 build 3051)
Installation UUID: f86726f2-bd5d-4610-867e-44e82f306ca2
Mono 22.214.171.124 (2017-02/1d0445b) (64-bit)
GTK+ 2.24.23 (Raleigh theme)
Package version: 500000094
=== NuGet ===
=== .NET Core ===
MSBuild SDKs: /Library/Frameworks/Mono.framework/Versions/5.0.0/lib/mono/msbuild/15.0/bin/Sdks
=== Xamarin.Profiler ===
Location: /Applications/Xamarin Profiler.app/Contents/MacOS/Xamarin Profiler
=== Apple Developer Tools ===
Xcode 8.3.2 (12175)
=== Xamarin.Android ===
Version: 126.96.36.199 (Visual Studio Enterprise)
Android SDK: /Users/jongoldberger/Library/Developer/Xamarin/android-sdk-macosx
Supported Android versions:
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)
5.0 (API level 21)
5.1 (API level 22)
6.0 (API level 23)
7.0 (API level 24)
7.1 (API level 25)
SDK Tools Version: 25.2.5
SDK Platform Tools Version: 25.0.5
SDK Build Tools Version: 25.0.2
Java SDK: /usr
java version "1.8.0_91"
Java(TM) SE Runtime Environment (build 1.8.0_91-b14)
Java HotSpot(TM) 64-Bit Server VM (build 25.91-b14, mixed mode)
Android Designer EPL code available here:
=== Xamarin Inspector ===
Build date: Fri, 21 Apr 2017 17:57:12 GMT
=== Xamarin.Mac ===
Version: 188.8.131.52 (Visual Studio Enterprise)
=== Xamarin.iOS ===
Version: 10.10.0.30 (Visual Studio Enterprise)
Build date: 2017-04-28 17:17:13-0400
=== Build Information ===
Release ID: 700003051
Git revision: e5296061de5c6b093fb59668526728f2b82caa91
Build date: 2017-05-01 09:58:05-04
Xamarin addins: 7123ae956f3089f398cc9eae6bba94037ca896e6
Build lane: monodevelop-lion-d15-2
=== Operating System ===
Mac OS X 10.12.4
Darwin 16.5.0 Darwin Kernel Version 16.5.0
Fri Mar 3 16:52:33 PST 2017
Created attachment 22014 [details]
Android 184.108.40.206 Crash Log
Seems the issue is specific to Android version 7.3.x.
If I upgrade ONLY Visual Studio for Mac to Preview 10 (leaving all other SDKs on Stable), my sample app works. If I then update Android from 7.2.x to 7.3.x, then the app begins to crash.
Should be fixed on mono 2017-02 branch by 1298269b88479747947d332c8ae7c0e8222a3b8c.
Could somebody bump xam.android to that revision or cherry-pick-it into a branch ?
*** Bug 56233 has been marked as a duplicate of this bug. ***
## Additional tallying
4 other users: https://forums.xamarin.com/discussion/92934/ (2017-04-11 to 2017-05-11)
3 other users: https://forums.xamarin.com/discussion/92937/ (2017-04-11 to 2017-05-10)
1 other user: https://forums.xamarin.com/discussion/93430/ (2017-04-18 to 2017-04-27)
0 other users: https://forums.xamarin.com/discussion/93975/ (2017-04-24, from the reporter of this bug)
Reopening this issue as in mono version I found that application crashes
In comment 9 it is mentioned that
Expected result : Button's text will be updated to say "1 MainActivity Clicks!" when button is clicked
But it was found that application crashes when button is clicked
Created attachment 22168 [details]
Logs Generated when issue is reproduced
@Saurabh you didn't test the fix as the android version you have is too old. First a bump on Android need to happen before you test it.
Verified the bug on build :-
Visual Studio Enterprise 2017 for Mac Version 7.0.1 (build 2)
Xamarin.Android Version: 220.127.116.11
Xamarin.iOS Version: 10.10.0.33
Xamarin.Mac Version: 18.104.22.168
Screen cast link :-
Build Information :-
As I have verified this bug can you please mark the bug resolved so that i can mark it as verified.
Created attachment 22189 [details]
I am experiencing the same issue, is there a workaround or expected fix date?
@Mobigtal, a workaround is to use an x86 Android emulator rather than an x86_64 Android emulator or to deselect the x86_64 Android ABI, as mentioned in Comment 5. The candidate fix as verified on Comment 18 and Comment 19 is targeted to the Xamarin 15.2.2 release as indicated by the Target Milestone field of the bug. The Xamarin 15.2.2 release is tentatively scheduled for release by the end of this week.
*** Bug 55602 has been marked as a duplicate of this bug. ***