DOTs | Development builds running fine, production gets null pointer dereference

Mono is working fine, but to publish we need to build for arm64 - that’s when the trouble began. Using IL2CPP works fine for development builds, but production builds are getting a null pointer dereference (stack trace below) just after the standard Unity splash screen.

This issue is the closest I can see to my own, but it’s marked as non-reproducable - Unity Issue Tracker - [DOTS][Mobile] IL2CPP ARM64 app crashes on start in release build

I’ve tried the standard way of building for Android as well as this method outlined in the Entities doc, both of which have the same outcome - DOTS Project Setup | Entities | 0.17.0-preview.42

The versions of Unity I’ve tried are:

  • 2020.3.25f1
  • 2020.1.17f1
  • 2020.1.15f1
  • 2020.1.0f1
  • 2019.4.0f1

Are there any specific build options that I should be using? What is the difference between a production and development build?

Thanks for you help.

Here’s my manifest.json, if needed
manifest.json

{
“dependencies”: {
“com.unity.2d.sprite”: “1.0.0”,
“com.unity.ads”: “3.7.5”,
“com.unity.burst”: “1.4.2”,
“com.unity.collab-proxy”: “1.15.4”,
“com.unity.entities”: “0.17.0-preview.41”,
“com.unity.ide.rider”: “2.0.7”,
“com.unity.ide.visualstudio”: “2.0.12”,
“com.unity.ide.vscode”: “1.2.4”,
“com.unity.platforms.android”: “0.10.0-preview.10”,
“com.unity.platforms.ios”: “0.10.0-preview.10”,
“com.unity.physics”: “0.6.0-preview.3”,
“com.unity.render-pipelines.core”: “10.7.0”,
“com.unity.render-pipelines.universal”: “10.7.0”,
“com.unity.rendering.hybrid”: “0.11.0-preview.42”,
“com.unity.shadergraph”: “10.7.0”,
“com.unity.test-framework”: “1.1.29”,
“com.unity.textmeshpro”: “3.0.6”,
“com.unity.timeline”: “1.4.8”,
“com.unity.ugui”: “1.0.0”,
“com.unity.modules.ai”: “1.0.0”,
“com.unity.modules.androidjni”: “1.0.0”,
“com.unity.modules.animation”: “1.0.0”,
“com.unity.modules.assetbundle”: “1.0.0”,
“com.unity.modules.audio”: “1.0.0”,
“com.unity.modules.cloth”: “1.0.0”,
“com.unity.modules.director”: “1.0.0”,
“com.unity.modules.imageconversion”: “1.0.0”,
“com.unity.modules.imgui”: “1.0.0”,
“com.unity.modules.jsonserialize”: “1.0.0”,
“com.unity.modules.particlesystem”: “1.0.0”,
“com.unity.modules.physics”: “1.0.0”,
“com.unity.modules.physics2d”: “1.0.0”,
“com.unity.modules.screencapture”: “1.0.0”,
“com.unity.modules.terrain”: “1.0.0”,
“com.unity.modules.terrainphysics”: “1.0.0”,
“com.unity.modules.tilemap”: “1.0.0”,
“com.unity.modules.ui”: “1.0.0”,
“com.unity.modules.uielements”: “1.0.0”,
“com.unity.modules.umbra”: “1.0.0”,
“com.unity.modules.unityanalytics”: “1.0.0”,
“com.unity.modules.unitywebrequest”: “1.0.0”,
“com.unity.modules.unitywebrequestassetbundle”: “1.0.0”,
“com.unity.modules.unitywebrequestaudio”: “1.0.0”,
“com.unity.modules.unitywebrequesttexture”: “1.0.0”,
“com.unity.modules.unitywebrequestwww”: “1.0.0”,
“com.unity.modules.vehicles”: “1.0.0”,
“com.unity.modules.video”: “1.0.0”,
“com.unity.modules.vr”: “1.0.0”,
“com.unity.modules.wind”: “1.0.0”,
“com.unity.modules.xr”: “1.0.0”
}
}

Null pointer dereference stack trace
Stacktrace

2022-02-01 16:00:59.977 8000-8116/? E/AndroidRuntime: FATAL EXCEPTION: UnityMain

Process: com.HuliganBear.SpaceFarm, PID: 8000

java.lang.Error: *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***

Version ‘2020.3.25f1 (9b9180224418)’, Build type ‘Release’, Scripting Backend ‘il2cpp’, CPU ‘arm64-v8a’

Build fingerprint: ‘samsung/a51xnaeea/a51x:11/RP1A.200720.012/A516BXXU4CUE3:user/release-keys’

Revision: ‘3’

ABI: ‘arm64’

Timestamp: 2022-02-01 16:00:59+0000

pid: 8000, tid: 8116, name: UnityMain >>> com.HuliganBear.SpaceFarm <<<

uid: 10808

signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0xc

Cause: null pointer dereference

x0 0000000000000008 x1 000000727c04a318 x2 0000000000000010 x3 000000000000000c

x4 00000073d9107d88 x5 00000072797083f6 x6 00000073d91079a8 x7 00000073d91079a8

x8 0000000000000008 x9 000000736fd19910 x10 00000073d9107d10 x11 0000000000000008

x12 0000000001150408 x13 000000000000044d x14 0000000000000000 x15 000000736fdcbad8

x16 000000736fcb21c8 x17 0000007472aa7bc0 x18 00000073d91073d7 x19 0000000000000000

x20 0000000000000000 x21 000000727c077b00 x22 00000073d9108400 x23 0000000000000000

x24 0000000000000000 x25 0000000000000000 x26 000000000000055f x27 0000000000000001

x28 0000000000000000 x29 00000073d9107bd0

sp 00000073d9107b90 lr 000000736b364dc8 pc 000000736b3694ac

backtrace:

#00 pc 0000000000c974ac /data/app/~~nKFjIwXCV9CajTnc-mZzhw==/com.HuliganBear.SpaceFarm-yT0TAp53TX93VJUUt5dq1A==/lib/arm64/libil2cpp.so (BlobArray_1_tFF4EEAB993B7CF2727F2A3CDE77227647BD82B8B::get_m_Length_1() const+12) (BuildId: 132e8e1ce51b1f3740253bad10fbb613ad17069e)

#01 pc 0000000000c92dc4 /data/app/~~nKFjIwXCV9CajTnc-mZzhw==/com.HuliganBear.SpaceFarm-yT0TAp53TX93VJUUt5dq1A==/lib/arm64/libil2cpp.so (BlobArray_1_get_Length_m92F96541C499A9E85D0292630B8B58D837F0E554_inline(BlobArray_1_tFF4EEAB993B7CF2727F2A3CDE77227647BD82B8B*, MethodInfo const*)+40) (BuildId: 132e8e1ce51b1f3740253bad10fbb613ad17069e)

#02 pc 0000000002061b14 /data/app/~~nKFjIwXCV9CajTnc-mZzhw==/com.HuliganBear.SpaceFarm-yT0TAp53TX93VJUUt5dq1A==/lib/arm64/libil2cpp.so (ResourceCatalogData_GetGUIDFromPath_m1DFC599FF027918D5B17B7ACE8367724DD250B7D+996) (BuildId: 132e8e1ce51b1f3740253bad10fbb613ad17069e)

#03 pc 000000000203fdcc /data/app/~~nKFjIwXCV9CajTnc-mZzhw==/com.HuliganBear.SpaceFarm-yT0TAp53TX93VJUUt5dq1A==/lib/arm64/libil2cpp.so (SceneSystem_GetSceneGUID_m3E6EA7E734CC2412113CE37B99AAEB8231716FEC+176) (BuildId: 132e8e1ce51b1f3740253bad10fbb613ad17069e)

#04 pc 000000000203fa00 /data/app/~~nKFjIwXCV9CajTnc-mZzhw==/com.HuliganBear.SpaceFarm-yT0TAp53TX93VJUUt5dq1A==/lib/arm64/libil2cpp.so (GameObjectSceneUtility_AddGameObjectSceneReferences_mCA24ACDDBE1FB3CE50403880BFA3FC7D85564C27+1404) (BuildId: 132e8e1ce51b1f3740253bad10fbb613ad17069e)

#05 pc 0000000001fa7b9c /data/app/~~nKFjIwXCV9CajTnc-mZzhw==/com.HuliganBear.SpaceFarm-yT0TAp53TX93VJUUt5dq1A==/lib/arm64/libil2cpp.so (AutomaticWorldBootstrap_Initialize_m4F061B0E0169BE83532543C686DD702FA0930EF3+256) (BuildId: 132e8e1ce51b1f3740253bad10fbb613ad17069e)

#06 pc 0000000000843c14 /data/app/~~nKFjIwXCV9CajTnc-mZzhw==/com.HuliganBear.SpaceFarm-yT0TAp53TX93VJUUt5dq1A==/lib/arm64/libil2cpp.so (RuntimeInvoker_FalseVoid_t700C6383A2A510C2CF4DD86DABD5CA9FF70ADAC5(void ()(), MethodInfo const, void*, void**)+56) (BuildId: 132e8e1ce51b1f3740253bad10fbb613ad17069e)

#07 pc 00000000013b49f4 /data/app/~~nKFjIwXCV9CajTnc-mZzhw==/com.HuliganBear.SpaceFarm-yT0TAp53TX93VJUUt5dq1A==/lib/arm64/libil2cpp.so (il2cpp::vm::Runtime::Invoke(MethodInfo const*, void*, void**, Il2CppException**)+376) (BuildId: 132e8e1ce51b1f3740253bad10fbb613ad17069e)

#08 pc 00000000013124d8 /data/app/~~nKFjIwXCV9CajTnc-mZzhw==/com.HuliganBear.SpaceFarm-yT0TAp53TX93VJUUt5dq1A==/lib/arm64/libil2cpp.so (il2cpp_runtime_invoke+132) (BuildId: 132e8e1ce51b1f3740253bad10fbb613ad17069e)

2022-02-01 16:00:59.977 8000-8116/? E/AndroidRuntime: #09 pc 0000000000614064 /data/app/~~nKFjIwXCV9CajTnc-mZzhw==/com.HuliganBear.SpaceFarm-yT0TAp53TX93VJUUt5dq1A==/lib/arm64/libunity.so (BuildId: 1a0351d7529b73798701efc1b751325174e22904)

#10 pc 0000000000621934 /data/app/~~nKFjIwXCV9CajTnc-mZzhw==/com.HuliganBear.SpaceFarm-yT0TAp53TX93VJUUt5dq1A==/lib/arm64/libunity.so (BuildId: 1a0351d7529b73798701efc1b751325174e22904)

#11 pc 00000000005302c4 /data/app/~~nKFjIwXCV9CajTnc-mZzhw==/com.HuliganBear.SpaceFarm-yT0TAp53TX93VJUUt5dq1A==/lib/arm64/libunity.so (BuildId: 1a0351d7529b73798701efc1b751325174e22904)

#12 pc 0000000000530220 /data/app/~~nKFjIwXCV9CajTnc-mZzhw==/com.HuliganBear.SpaceFarm-yT0TAp53TX93VJUUt5dq1A==/lib/arm64/libunity.so (BuildId: 1a0351d7529b73798701efc1b751325174e22904)

#13 pc 000000000052f848 /data/app/~~nKFjIwXCV9CajTnc-mZzhw==/com.HuliganBear.SpaceFarm-yT0TAp53TX93VJUUt5dq1A==/lib/arm64/libunity.so (BuildId: 1a0351d7529b73798701efc1b751325174e22904)

#14 pc 00000000005474f4 /data/app/~~nKFjIwXCV9CajTnc-mZzhw==/com.HuliganBear.SpaceFarm-yT0TAp53TX93VJUUt5dq1A==/lib/arm64/libunity.so (BuildId: 1a0351d7529b73798701efc1b751325174e22904)

#15 pc 00000000005471b8 /data/app/~~nKFjIwXCV9CajTnc-mZzhw==/com.HuliganBear.SpaceFarm-yT0TAp53TX93VJUUt5dq1A==/lib/arm64/libunity.so (BuildId: 1a0351d7529b73798701efc1b751325174e22904)

#16 pc 0000000000547478 /data/app/~~nKFjIwXCV9CajTnc-mZzhw==/com.HuliganBear.SpaceFarm-yT0TAp53TX93VJUUt5dq1A==/lib/arm64/libunity.so (BuildId: 1a0351d7529b73798701efc1b751325174e22904)

#17 pc 0000000000546ea8 /data/app/~~nKFjIwXCV9CajTnc-mZzhw==/com.HuliganBear.SpaceFarm-yT0TAp53TX93VJUUt5dq1A==/lib/arm64/libunity.so (BuildId: 1a0351d7529b73798701efc1b751325174e22904)

#18 pc 0000000000546f68 /data/app/~~nKFjIwXCV9CajTnc-mZzhw==/com.HuliganBear.SpaceFarm-yT0TAp53TX93VJUUt5dq1A==/lib/arm64/libunity.so (BuildId: 1a0351d7529b73798701efc1b751325174e22904)

#19 pc 0000000000546c3c /data/app/~~nKFjIwXCV9CajTnc-mZzhw==/com.HuliganBear.SpaceFarm-yT0TAp53TX93VJUUt5dq1A==/lib/arm64/libunity.so (BuildId: 1a0351d7529b73798701efc1b751325174e22904)

#20 pc 0000000000547ba8 /data/app/~~nKFjIwXCV9CajTnc-mZzhw==/com.HuliganBear.SpaceFarm-yT0TAp53TX93VJUUt5dq1A==/lib/arm64/libunity.so (BuildId: 1a0351d7529b73798701efc1b751325174e22904)

#21 pc 00000000005481b0 /data/app/~~nKFjIwXCV9CajTnc-mZzhw==/com.HuliganBear.SpaceFarm-yT0TAp53TX93VJUUt5dq1A==/lib/arm64/libunity.so (BuildId: 1a0351d7529b73798701efc1b751325174e22904)

#22 pc 0000000000690f48 /data/app/~~nKFjIwXCV9CajTnc-mZzhw==/com.HuliganBear.SpaceFarm-yT0TAp53TX93VJUUt5dq1A==/lib/arm64/libunity.so (BuildId: 1a0351d7529b73798701efc1b751325174e22904)

#23 pc 00000000006a71b0 /data/app/~~nKFjIwXCV9CajTnc-mZzhw==/com.HuliganBear.SpaceFarm-yT0TAp53TX93VJUUt5dq1A==/lib/arm64/libunity.so (BuildId: 1a0351d7529b73798701efc1b751325174e22904)

#24 pc 000000000001b1fc /data/app/~~nKFjIwXCV9CajTnc-mZzhw==/com.HuliganBear.SpaceFarm-yT0TAp53TX93VJUUt5dq1A==/oat/arm64/base.odex

at libil2cpp.BlobArray_1_tFF4EEAB993B7CF2727F2A3CDE77227647BD82B8B::get_m_Length_1() const(get_m_Length_1:12)

at libil2cpp.BlobArray_1_get_Length_m92F96541C499A9E85D0292630B8B58D837F0E554_inline(BlobArray_1_tFF4EEAB993B7CF2727F2A3CDE77227647BD82B8B*, MethodInfo const*)(BlobArray_1_get_Length_m92F96541C499A9E85D0292630B8B58D837F0E554_inline:40)

at libil2cpp.ResourceCatalogData_GetGUIDFromPath_m1DFC599FF027918D5B17B7ACE8367724DD250B7D(ResourceCatalogData_GetGUIDFromPath_m1DFC599FF027918D5B17B7ACE8367724DD250B7D:996)

at libil2cpp.SceneSystem_GetSceneGUID_m3E6EA7E734CC2412113CE37B99AAEB8231716FEC(SceneSystem_GetSceneGUID_m3E6EA7E734CC2412113CE37B99AAEB8231716FEC:176)

at libil2cpp.GameObjectSceneUtility_AddGameObjectSceneReferences_mCA24ACDDBE1FB3CE50403880BFA3FC7D85564C27(GameObjectSceneUtility_AddGameObjectSceneReferences_mCA24ACDDBE1FB3CE50403880BFA3FC7D85564C27:1404)

Any advice?

As far as I know, this is a bug in com.unity.entities, it should be fixed in upcoming 0.5 version as per DOTS Development Status And Next Milestones - December 2021

But I am not sure when 0.5 will come out, I don’t think Dots team gave a date yet

1 Like