[Mono-dev] Crash on Android when trying to execute dynamic code

Jonathan Pryor jonpryor at vt.edu
Mon Jun 17 13:42:26 UTC 2013

Xamarin.Android-related issues should either go to monodroid at lists.xamarin.com [0] or the Android forums [1].

This particular case appears to be a JIT bug; please file a bug at bugzilla [2] with a reproducible test case, ideally with instructions as simple as "run the app and watch it crash and burn". (The less interaction, the better.)

Even better, try to run the app on "normal"/desktop mono, not Xamarin.Android. That makes it easier for the runtime team to test and fix.

On Jun 15, 2013, at 8:37 AM, Robert Pickering <robert at strangelights.com> wrote:
> I tried grab the IL code generated, but for some reason it always gets truncated in the log.

`adb logcat` output limits message length. (I don't know the length; I just know that my stack traces are regularly truncated...)

If possible, try writing your IL to a file so that you can avoid the logcat limits.

> The program fails with the following stack trace:
> 06-15 12:22:33.666 F/        ( 5381): * Assertion: should not be reached at /Users/builder/data/lanes/monodroid-mlion-master/f6831347/source/mono/mono/mini/mini-arm.c:3599
> I've tried checking out mini-arm.c:3599, but it currently seems to be a comment. I'm not sure how you find the source for the version of Mono that Android is running on.

You ask me; Xamarin.Android commit f6831347 (in the path) is Xamarin.Android 4.7.4, which uses Mono 20572465 [3]

For more recent releases, I've been mentioning the corresponding git commit hash in the release notes, e.g. Xamarin.Android 4.7.8 [4] is based on Mono 3.0.12 commit 322d5bd3.

I would suggest upgrading to 4.7.9, which is currently in beta (and is 4.7.8 + one change, unrelated to mono). I don't think 4.7.9 will fix your issue, though, as the assert appears to still be there, just on line mini-arm.c:3674 Please file a bug.

 - Jon

[0]: http://lists.ximian.com/mailman/listinfo/monodroid
[1]: http://forums.xamarin.com/categories/android
[2]: https://bugzilla.xamarin.com/
[3]: https://github.com/mono/mono/blob/20572465/mono/mini/mini-arm.c#L3599
[3]: http://docs.xamarin.com/releases/android/xamarin.android_4/xamarin.android_4.7#Xamarin.Android_4.7.8

More information about the Mono-devel-list mailing list