App crashes at the start up for some devices: Unable to initialize unity engine.

App crashes at the start up for some devices: Unable to initialize unity engine.
For some other devices everything seems to be ok

07-11 22:16:28.636 13496 13511 I Unity : SystemInfo CPU = ARM64 FP ASIMD AES VMH, Cores = 4, Memory = 1899mb

07-11 22:16:28.637 13496 13511 I Unity : SystemInfo ARM big.LITTLE configuration: 4 big (mask: 0xf), 0 little (mask: 0x0)

07-11 22:16:28.639 13496 13511 I Unity : ApplicationInfo com.Roxley.SantoriniGame version 1.74 build af0b0d7e-fc16-4bba-a1a5-289e10ba4f72

07-11 22:16:28.640 13496 13511 I Unity : Built from ‘2018.3/release’ branch, Version ‘2018.3.12f1 (8afd630d1f5b)’, Build type ‘Release’, Scripting Backend ‘il2cpp’, CPU ‘arm64-v8a’

07-11 22:16:28.643 3229 8471 V WindowManager: Relayout of Window{d3e2d94 u0 com.Roxley.SantoriniGame/com.unity3d.player.UnityPlayerActivity}: focusMayChange=false

07-11 22:16:28.664 3229 3240 V WindowManager: Relayout of Window{d3e2d94 u0 com.Roxley.SantoriniGame/com.unity3d.player.UnityPlayerActivity}: focusMayChange=false

07-11 22:16:28.691 3229 5069 V WindowManager: Relayout of Window{96fd032 u0 SurfaceView}: focusMayChange=false

07-11 22:16:29.049 13496 13511 E CRASH : signal 11 (SIGSEGV), code 128 (?), fault addr 0000000000000000

07-11 22:16:29.050 13496 13511 E CRASH : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***

07-11 22:16:29.050 13496 13511 E CRASH : Build type ‘Release’, Scripting Backend ‘il2cpp’, CPU ‘arm64-v8a’

07-11 22:16:29.050 13496 13511 E CRASH : Build fingerprint: ‘Lenovo/YT3_10_row_lte/YT3:6.0.1/MMB29M/LenovoYT3-X90L_S200307_170614:user/release-keys’

07-11 22:16:29.050 13496 13511 E CRASH : Revision: ‘0’

07-11 22:16:29.051 13496 13511 E CRASH : pid: 13496, tid: 13511, name: UnityMain >>> com.Roxley.SantoriniGame <<<

07-11 22:16:29.051 13496 13511 E CRASH : x0 ffffffffffffffff x1 00007f216eeb14f0 x2 0000000000000001 x3 0000000000000002

07-11 22:16:29.052 13496 13511 E CRASH : x4 00000000ffffffff x5 0000000000000000 x6 0000000080000000 x7 4b447dff776463fe

07-11 22:16:29.052 13496 13511 E CRASH : x8 00000000000000de x9 6f62316b682cff45 x10 7f7f7f7f7f7f7f7f x11 0101010101010101

07-11 22:16:29.052 13496 13511 E CRASH : x12 0000000000000020 x13 0000000000000000 x14 0000000000000001 x15 0000000000000001

07-11 22:16:29.053 13496 13511 E CRASH : x16 0000000009fe9fc0 x17 000000000c569b38 x18 0000000045354e1c x19 00007f216ed3f360

07-11 22:16:29.053 13496 13511 E CRASH : x20 00007f216dafed90 x21 ffffffffffffffff x22 00007f216ed3f4b0 x23 00007f216eeb14e0

07-11 22:16:29.053 13496 13511 E CRASH : x24 00007f216ed3f908 x25 0000000004c56f09 x26 00007f216ed3f4d0 x27 0000000000000000

07-11 22:16:29.053 13496 13511 E CRASH : x28 0000000000000000 x29 00007f216ed3f350 x30 0000000008649c7c

07-11 22:16:29.054 13496 13511 E CRASH : sp 00007f216ed3f300 pc 0000000008649c88 pstate 0000000020000000

07-11 22:16:29.054 13496 13511 E CRASH :

07-11 22:16:29.054 13496 13511 E CRASH : backtrace:

07-11 22:16:29.095 13496 13511 E CRASH : #00 pc 000000000040df2c /system/vendor/lib64/libhoudini.so ()

07-11 22:16:29.095 13496 13511 E CRASH : #01 pc 0000000000649c84 /mnt/expand/068a57ba-5431-4fae-830d-044d59c07c36/app/com.Roxley.SantoriniGame-1/lib/arm64/libil2cpp.so ()

07-11 22:16:29.095 13496 13511 E CRASH : #02 pc 00000000000c05fc /system/vendor/lib64/libhoudini.so ()

Looking at the backtrace, it appears that the application is crashing inside the libhoudini.so library.

07-11 22:16:29.054 13496 13511 E CRASH : backtrace:
07-11 22:16:29.095 13496 13511 E CRASH : #00 pc 000000000040df2c /system/vendor/lib64/libhoudini.so ()
07-11 22:16:29.095 13496 13511 E CRASH : #01 pc 0000000000649c84 /mnt/expand/068a57ba-5431-4fae-830d-044d59c07c36/app/com.Roxley.SantoriniGame-1/lib/arm64/libil2cpp.so ()
07-11 22:16:29.095 13496 13511 E CRASH : #02 pc 00000000000c05fc /system/vendor/lib64/libhoudini.so ()

Libhoudini is an ARM emulator for x86 or x86-64 devices. Most Android devices use ARM processors. The libhoudini library tries to allow an app that has NDK binaries using ARM instructions, to run on a device that understands x86 instructions. In other words, it’s an emulator of ARM hardware for x86 devices. If libhoudini can translate all the code from your application, the app will run as if it were running on an ARM CPU. But it’s not uncommon for libhoudini to not be able to translate all instructions used by Unity or other plugins, the result can be a crash of ARM apps in x86 environment.

Unfortunately, Unity does not support hardware emulators, including libhoudini, as target platform. But we do support x86 as a target architecture. To allow your game to run on that target architecture, you need to enable the architecture in the Player Settings:

Please also refer to our documentation on building applications for Android, specifically on targeting multiple architectures:

To optimize for download and installation size, enable the Split APKs by target architecture option in the Player settings. The Split APKs by target architecture option produces one set of APKs and OBBs for each device architecture selected in the Target Architecture list in the Player settings. You can upload this set of APKs (and OBBs, if enabled) to the Google Play, or other, store instead of a FAT APK in which all of the selected architectures are included into a single APK. For more information on this feature, see Multiple APK support on the Android Developer website.

Also very important is that x86 support was dropped in 2019.3, so it won’t be supported in 2019 LTS. We still support it in 2017 LTS, 2018 LTS, 2019.1 and 2019.2. We also have no plans to support x86-64 (x64). Note that x64 is different from ARM64, which we do support.

1 Like