runtime: Arm release build crashes on emulator

Android application type

Android for .NET (net6.0-android, etc.)

Affected platform version

VS2022 17.3.4

Description

Our app is crashing when it’s a release arm only build and is deployed on a x86_64 emulator (API 33 emulator).

There are no issues with x86 is included or app is built as debug.

signal 6 (SIGABRT), code -1 (SI_QUEUE), fault addr --------
Abort message: 'Bad 'uenum_count_70' call from 0x70bbe75b0cc8'
    rax 0000000000000000  rbx 00000000000011b1  rcx 000070befe6e266f  rdx 0000000000000006
    r8  0000000000000000  r9  0000000000000000  r10 00007ffc96d946f0  r11 0000000000000203
    r12 000070bc4b5be9b0  r13 000070bc9f3d2320  r14 00007ffc96d946e8  r15 00000000000011b1
    rdi 00000000000011b1  rsi 00000000000011b1
    rbp 00007ffc96d947d0  rsp 00007ffc96d946e0  rip 000070befe6e266f

backtrace:
      #00 pc 000000000005f66f  /apex/com.android.runtime/lib64/bionic/libc.so (abort+191) (BuildId: a6a938b1e902a52b39f41937b7f60481)
      dotnet/android#1 pc 00000000007ecf44  /apex/com.android.art/lib64/libart.so (art::Runtime::Abort(char const*)+1300) (BuildId: b263fa077d3022123c1495737bc0762f)
      dotnet/android#2 pc 0000000000019b3c  /apex/com.android.art/lib64/libbase.so (android::base::SetAborter(std::__1::function<void (char const*)>&&)::$_3::__invoke(char const*)+60) (BuildId: cd6c9d1372a0cc28cd6b7a8903cce0b2)
      dotnet/android#3 pc 000000000000a558  /system/lib64/liblog.so (__android_log_assert+328) (BuildId: 7f4dac00ec7b1176923c0095e80c9f5a)
      dotnet/android#4 pc 0000000000193f5c  /system/lib64/libndk_translation.so (ndk_translation::DoBadTrampoline(void const*, ndk_translation::ProcessState*)+44) (BuildId: e985eb71e8d4a3af5a2f4fe8e4067628)
      dotnet/android#5 pc 000000000045eba3  <anonymous:70bbdd295000>

RuntimeIdentifiers used: <RuntimeIdentifiers>android-arm;android-arm64</RuntimeIdentifiers> If this is removed and x86 is included in the APK, the app works fine on the emulator.

Steps to Reproduce

  • Create new Android .NET 6 app
  • Add <RuntimeIdentifiers>android-arm;android-arm64</RuntimeIdentifiers> to project file
  • Deploy as Release to API 33 emulator from VS
  • Observe crash

Did you find any workaround?

No response

Relevant log output

No response

About this issue

  • Original URL
  • State: open
  • Created 4 years ago
  • Comments: 26 (13 by maintainers)

Most upvoted comments

log.txt The log when deploying to emulator-31. It also mentions libndk_translation.

If the latest emulators don’t support ARM emulation anymore, then this is probably not very relevant anymore. Perhaps simply a warning in the documentation?