Hi, I've run into a problem where our app is running accross multiple devices, however it crashes at startup on a Xiaomi Redmi 9AT, Android 10, API 29. I have been able to track the crash to the MauiProgram.cs at builder.UseArcGISRuntime() and it only crashes on the ArcGISRuntime SDK version 200.5 and onwards.
Below are the code where the crash happens (line 4) and the Device Log (logcat)
var builder = MauiApp.CreateBuilder();
builder
.UseMauiApp<App>()
.UseArcGISRuntime()
.ConfigureFonts(fonts =>
{
fonts.AddFont("OpenSans-Regular.ttf", "OpenSansRegular");
fonts.AddFont("OpenSans-Semibold.ttf", "OpenSansSemibold");
});
Time Device Name Type PID Tag Message
12-03 17:11:55.081 Xiaomi M2006C3LVG Error 29988 AndroidRuntime android.runtime.JavaProxyThrowable: System.InvalidProgramException: Invalid IL due to: method RuntimeCoreNet.GeneratedWrappers.CoreArcGISRuntimeEnvironment:OnPrivateArcGISRuntimeEnvironment_ArcadeConsoleMessage (intptr,intptr,RuntimeCoreNet.GeneratedWrappers.CoreInteropString) with UnmanagedCallersOnlyAttribute has non-blittable parameters or return type assembly:<unknown assembly> type:<unknown type> member:(null)
at RuntimeCoreNet.GeneratedWrappers.CoreArcGISRuntimeEnvironment.SetArcadeConsoleMessageCallback(CoreArcadeConsole_MessageReceived )
at Esri.ArcGISRuntime.ArcGISRuntimeEnvironment.InitializeRuntimeCore()
at Esri.ArcGISRuntime.ArcGISRuntimeEnvironment.Initialize(Action`1 )
at Esri.ArcGISRuntime.Maui.AppHostBuilderExtensions.UseArcGISRuntime(MauiAppBuilder builder, Action`1 configure)
at Esri.ArcGISRuntime.Maui.AppHostBuilderExtensions.UseArcGISRuntime(MauiAppBuilder builder)
at MauiAppXiaomiTest.MauiProgram.CreateMauiApp()
at MauiAppXiaomiTest.MainApplication.CreateMauiApp()
at Microsoft.Maui.MauiApplication.OnCreate()
at Android.App.Application.n_OnCreate(IntPtr jnienv, IntPtr native__this)
at Android.Runtime.JNINativeWrapper.Wrap_JniMarshal_PP_V(_JniMarshal_PP_V callback, IntPtr jnienv, IntPtr klazz)
at crc6488302ad6e9e4df1a.MauiApplication.n_onCreate(Native Method)
at crc6488302ad6e9e4df1a.MauiApplication.onCreate(MauiApplication.java:28)
at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1189)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6603)
at android.app.ActivityThread.access$1500(ActivityThread.java:235)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1916)
at android.os.Handler.dispatchMessage(Handler.java:107)
at android.os.Looper.loop(Looper.java:225)
at android.app.ActivityThread.main(ActivityThread.java:7563)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:539)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:994)
We unfortunately cannot go back to the SDK version 200.4, because version 200.5 fixed a breaking issue for us where the map would turn blank when the app had been running in the background for a while.
Reproduction
Running the app on a Pixel 5 Android 10 API 29 emulator device does not result in a crash.
Running the app on the Xiaomi Redmi 9AT with ArcGISRuntime SDK version 200.4 does also not result in a crash.
I have not been able to test the app on other Xiaomi devices or other Android 10 API 29 devices.
If there any remaining questions, please let me know.
Solved! Go to Solution.
Yes, sorry for the lack of updates on this. The issue turns out to be an interop issue in .NET that affects ARMv7 on Android only. We've implemented a workaround in v200.7 which will be released shortly.
We've recently been made aware of a regression with older 32bit Android Armv7 devices and are still investigating, and it appears you're likely also hitting this. We're still trying to fully determine if this is an issue in the .NET runtime or the Maps SDK (it was introduced in 200.5, because of some newer code hitting this .NET bug).
Is there any progress? Or a workaround? Users are complaining that they can't launch the app and I don't really know how to proceed.
Thank you for your help.
Our clients have the same issue with ArcGIS Runtime 200.6
Samsung Galaxy A13 Android 14 (SDK 34)
Application works with online basemap created at startup.
I would like to share our Android app vitals of last release (21of March 2025). About 30% of crashes are related to RuntimeCoreNet.GeneratedWrappers.CoreArcGISRuntimeEnvironment.SetArcadeConsoleMessageCallback. How could we speed up the solution to this issue? Can we expect a solution with the 200.7 version?
Yes, sorry for the lack of updates on this. The issue turns out to be an interop issue in .NET that affects ARMv7 on Android only. We've implemented a workaround in v200.7 which will be released shortly.
Hi, I have version 200.6 and problem is probably still there.
It is the same on this Samsung. It's on this phone too if that helps. But it's the same ver ABI. Just for information.
My final solution si wait for next version.
200.7 shipped yesterday and should have a fix for this issue.