Skip to content

[Windows ARM64] vanilla .NET Android Application (C#) crash on launch Android API 35 ARM64 emulator #10167

@devluminix

Description

@devluminix

Android framework version

net9.0-android

Affected platform version

VS 2022 17.14.3

Description

@jonathanpeppers moving from #9829 to here.

A vanilla .NET Android Application (C#) will crash in Debug|AnyCPU trying to launch on an ARM64 emulator.

Steps to Reproduce

  • On a Windows 11 ARM64 machine (e.g.: MacBook with Apple M2 chip running Parallels)
  • From Visual Studio launcher > Create new project > Choose C# Android Application template
  • Debug|AnyCPU try to run (either debugger attached or not) to API 35 Android ARM64 emulator (from MacBook following these instructions from MSFT)
  • App crashes on launch, (if Fast Deployment is enabled, which is default true for Debug build).
  • Android logcat attached showing the crash

Did you find any workaround?

Unchecking Fast Deployment let's the app run, but it's not great developer UX.

Relevant log output

06-03 09:09:04.868 23740 23740 W monodroid: Failed to create directory '/data/user/0/com.companyname.AndroidApp1/files/.__override__/arm64-v8a'. File exists
06-03 09:09:04.868 23740 23740 W monodroid: Creating public update directory: `/data/user/0/com.companyname.AndroidApp1/files/.__override__/arm64-v8a`
06-03 09:09:04.868 23740 23740 W ame.AndroidApp1: Attempt to remove non-JNI local reference
06-03 09:09:04.868 23740 23740 W monodroid: runtime args empty
06-03 09:09:04.868 23740 23740 F monodroid: No assemblies found in '/data/user/0/com.companyname.AndroidApp1/files/.__override__/arm64-v8a' or '<unavailable>'. Assuming this is part of Fast Deployment. Exiting...
06-03 09:09:04.868 23740 23740 F monodroid: ALL entries in APK named `lib/arm64-v8a/` MUST be STORED. Gradle's minification may COMPRESS such entries.
06-03 09:09:04.868 23740 23740 F monodroid: Abort at monodroid-glue.cc:740:3 ('MonoDomain *xamarin::android::internal::MonodroidRuntime::create_domain(JNIEnv *, jstring_array_wrapper &, bool, bool)')
--------- beginning of crash
06-03 09:09:04.868 23740 23740 F libc    : Fatal signal 6 (SIGABRT), code -1 (SI_QUEUE) in tid 23740 (ame.AndroidApp1), pid 23740 (ame.AndroidApp1)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area: App+Library BuildIssues when building Library projects or Application projects.Area: CommercialIssues with non-OSS components.need-attentionA xamarin-android contributor needs to reviewneed-infoIssues that need more information from the author.

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions