Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Question App Bundle and multiple ABIs - Crash during startup

Discussion in 'Android' started by thiagolrosa, Jul 30, 2021.

  1. thiagolrosa

    thiagolrosa

    Joined:
    Feb 22, 2017
    Posts:
    60
    Hi,

    I'm having some Android build issues and it seems something wrong from the Unity side. When I build the app bundle with both ABIs (arm and arm64), sometimes the generated ABB doesn't work and the app doesn't startup.

    These are my tests:
    1) Build app bundle with only arm, everything is ok
    2) Build app bundle with only arm64, everything is ok
    3) Build app bundle with both arm and arm64, rarely works

    The way I'm doing now that always works:
    1) Delete everything from "Temp" folder
    2) Build app bundle with only arm64
    3) Build app bundle with arm and arm64 - now it works
    4) If I disable an empty game object and build it again, it starts to fail again
    5) Start from #1 again to make it work

    Note: sequential changes in the code/scene with only one ABI selected always work, the problem is when both ABIs are selected

    Does anyone also have this issue?

    Best regards,


    Thiago


     
    zinzsoft and OmarVector like this.
  2. JuliusM

    JuliusM

    Unity Technologies

    Joined:
    Apr 17, 2013
    Posts:
    835
    Which Unity version do you use? What does the device log show?
     
  3. thiagolrosa

    thiagolrosa

    Joined:
    Feb 22, 2017
    Posts:
    60
    Hi,

    Sorry my delay to reply back!

    I'm using 2020.3.15f2 the device log is below.

    Translating the address, it seems it is in an infinite loop in MetadataCache.FromTypeDefinition(int) it repeats thousands of times.

    Any idea how to solve this issue?

    Best regards,


    Thiago



    Code (Boo):
    1. FATAL EXCEPTION: UnityMain
    2. Process: com.impossibleapps.walkinghero, PID: 25632
    3. java.lang.Error: *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
    4. Version '2020.3.15f2 (6cf78cb77498)', Build type 'Release', Scripting Backend 'il2cpp', CPU 'arm64-v8a'
    5. Build fingerprint: 'motorola/lake_n/lake_n:10/QPWS30.61-21-18-7/fac4a:user/release-keys'
    6. Revision: 'pvt'
    7. ABI: 'arm64'
    8. Timestamp: 2021-08-09 15:08:50-0300
    9. pid: 25632, tid: 25674, name: UnityMain  >>> com.impossibleapps.walkinghero <<<
    10. uid: 11067
    11. signal 11 (SIGSEGV), code 2 (SEGV_ACCERR), fault addr 0x7e022b2fa0
    12.     x0  0000007e6c205748  x1  0000007e6c2008c0  x2  0000007e6c205708  x3  000000000000000e
    13.     x4  000000000000000e  x5  0000000000000000  x6  0000007e00000000  x7  00000000001c1000
    14.     x8  0000000000000001  x9  0000000000000000  x10 0000000000004040  x11 0000000000000028
    15.     x12 0000007efb705e60  x13 00000000000008e7  x14 0000000000000180  x15 0000000080000000
    16.     x16 0000007efb7d3890  x17 0000007efb7c5fd4  x18 0000000000000000  x19 0000007e6c205708
    17.     x20 0000007e6c2008c0  x21 0000007e023b6020  x22 0000007e6c205748  x23 000000000000000e
    18.     x24 000000000000000e  x25 0000007e10f6b408  x26 0000007e6c205778  x27 0000007efb705e60
    19.     x28 000000000000000e  x29 0000007e022b3090
    20.     sp  0000007e022b2f90  lr  0000007efb733ad8  pc  0000007efb7c5fd8
    21.  
    22. backtrace:
    23.       #00 pc 00000000000e2fd8  /apex/com.android.runtime/lib64/bionic/libc.so (pthread_mutex_unlock+4) (BuildId: 4cd97724e0ae0bf213b33eacb7bfbbe8)
    24.       #01 pc 0000000000050ad4  /apex/com.android.runtime/lib64/bionic/libc.so (arena_bin_malloc_hard+192) (BuildId: 4cd97724e0ae0bf213b33eacb7bfbbe8)
    25.       #02 pc 00000000000507cc  /apex/com.android.runtime/lib64/bionic/libc.so (je_arena_tcache_fill_small+308) (BuildId: 4cd97724e0ae0bf213b33eacb7bfbbe8)
    26.       #03 pc 000000000007af18  /apex/com.android.runtime/lib64/bionic/libc.so (je_tcache_alloc_small_hard+24) (BuildId: 4cd97724e0ae0bf213b33eacb7bfbbe8)
    27.       #04 pc 0000000000047500  /apex/com.android.runtime/lib64/bionic/libc.so (je_calloc+960) (BuildId: 4cd97724e0ae0bf213b33eacb7bfbbe8)
    28.       #05 pc 0000000000041268  /apex/com.android.runtime/lib64/bionic/libc.so (calloc+44) (BuildId: 4cd97724e0ae0bf213b33eacb7bfbbe8)
    29.       #06 pc 0000000000a3f748  /data/app/com.impossibleapps.walkinghero-yMvJONu20ag7pj5zHW_2Ew==/lib/arm64/libil2cpp.so (BuildId: 75f39898b805cb7dcbe95f9f69b95ea34e6c969a)
    30.       #07 pc 0000000000a3fa44  /data/app/com.impossibleapps.walkinghero-yMvJONu20ag7pj5zHW_2Ew==/lib/arm64/libil2cpp.so (BuildId: 75f39898b805cb7dcbe95f9f69b95ea34e6c969a)
    31.       #08 pc 0000000000a3fa44  /data/app/com.impossibleapps.walkinghero-yMvJONu20ag7pj5zHW_2Ew==/lib/arm64/libil2cpp.so (BuildId: 75f39898b805cb7dcbe95f9f69b95ea34e6c969a)
    32.       #09 pc 0000000000a3fa44  /data/app/com.impossibleapps.walkinghero-yMvJONu20ag7pj5zHW_2Ew==/lib/arm64/libil2cpp.so (BuildId: 75f39898b805cb7dcbe95f9f69b95ea34e6c969a)
    33.       #10 pc 0000000000a3fa44  /data/app/com.impossibleapps.walkinghero-yMvJONu20ag7pj5zHW_2Ew==/lib/arm64/libil2cpp.so (BuildId: 75f39898b805cb7dcbe95f9f69b95ea34e6c969a)
    34.       #11 pc 0000000000a3fa44  /data/app/com.impossibleapps.walkinghero-yMvJONu20ag7pj5zHW_2Ew==/lib/arm64/libil2cpp.so (BuildId: 75f39898b805cb7dcbe95f9f69b95ea34e6c969a)
    35.       #12 pc 0000000000a3fa44  /data/app/com.impossibleapps.walkinghero-yMvJONu20ag7pj5zHW_2Ew==/lib/arm64/libil2cpp.so (BuildId: 75f39898b805cb7dcbe95f9f69b95ea34e6c969a)
    36.       #13 pc 0000000000a3fa44  /data/app/com.impossibleapps.walkinghero-yMvJONu20ag7pj5zHW_2Ew==/lib/arm64/libil2cpp.so (BuildId: 75f39898b805cb7dcbe95f9f69b95ea34e6c969a)
    37.       #14 pc 0000000000a3fa44  /data/app/com.impossibleapps.walkinghero-yMvJONu20ag7pj5zHW_2Ew==/lib/arm64/libil2cpp.so (BuildId: 75f39898b805cb7dcbe95f9f69b95ea34e6c969a)
    38.       #15 pc 0000000000a3fa44  /data/app/com.impossibleapps.walkinghero-yMvJONu20ag7pj5zHW_2Ew==/lib/arm64/libil2cpp.so (BuildId: 75f39898b805cb7dcbe95f9f69b95ea34e6c969a)
    39.       #16 pc 0000000000a3fa44  /data/app/com.impossibleapps.walkinghero-yMvJONu20ag7pj5zHW_2Ew==/lib/arm64/libil2cpp.so (BuildId: 75f39898b805cb7dcbe95f9f69b95ea34e6c969a)
    40.       #17 pc 0000000000a3fa44  /data/app/com.impossibleapps.walkinghero-yMvJONu20ag7pj5zHW_2Ew==/lib/arm64/libil2cpp.so (BuildId: 75f39898b805cb7dcbe95f9f69b95ea34e6c969a)
    41.       #18 pc 0000000000a3fa44  /data/app/com.impossibleapps.walkinghero-yMvJONu20ag7pj5zHW_2Ew==/lib/arm64/libil2cpp.so (BuildId: 75f39898b805cb7dcbe95f9f69b95ea34e6c969a)
    42.       #19 pc 0000000000a3fa44  /data/app/com.impossibleapps.walkinghero-yMvJONu20ag7pj5zHW_2Ew==/lib/arm64/libil2cpp.so (BuildId: 75f39898b805cb7dcbe95f9f69b95ea34e6c969a)
    43.       #20 pc 0000000000a3fa44  /data/app/com.impossibleapps.walkinghero-yMvJONu20ag7pj5zHW_2Ew==/lib/arm64/libil2cpp.so (BuildId: 75f39898b805cb7dcbe95f9f69b95ea34e6c969a)
    44.       #21 pc 0000000000a3fa44  /data/app/com.impossibleapps.walkinghero-yMvJONu20ag7pj5zHW_2Ew==/lib/arm64/libil2cpp.so (BuildId: 75f39898b805cb7dcbe95f9f69b95ea34e6c969a)
    45.       #22 pc 0000000000a3fa44  /data/app/com.impossibleapps.walkinghero-yMvJONu20ag7pj5zHW_2Ew==/lib/arm64/libil2cpp.so (BuildId: 75f39898b805cb7dcbe95f9f69b95ea34e6c969a)
    46.       #23 pc 0000000000a3fa44  /data/app/com.impossibleapps.walkinghero-yMvJONu20ag7pj5zHW_2Ew==/lib/arm64/libil2cpp.so (BuildId: 75f39898b805cb7dcbe95f9f69b95ea34e6c969a)
    47.       #24 pc 0000000000a3fa44  /data/app/com.impossibleapps.walkinghero-yMvJONu20ag7pj5zHW_2Ew==/lib/arm64/libil2cpp.so (BuildId: 75f39898b805cb7dcbe95f9f69b95ea34e6c969a)
    48.       #25 pc 0000000000a3fa44  /data/app/com.impossibleapps.walkinghero-yMvJONu20ag7pj5zHW_2Ew==/lib/arm64/libil2cpp.so (BuildId: 75f39898b805cb7dcbe95f9f69b95ea34e6c969a)
     
  4. thiagolrosa

    thiagolrosa

    Joined:
    Feb 22, 2017
    Posts:
    60
    It also sometimes generate the below crash:

    libil2cpp.0x7fd564 - il2cpp::vm::MetadataCache::GetMethodPointer(Il2CppImage const*, unsigned int)
    libil2cpp.0x800db0 - il2cpp::vm::MetadataCache::Initialize()
    libil2cpp.0x7f1410 - il2cpp::vm::Runtime::Init(char const*)


    Code (Boo):
    1. pid: 30696, tid: 30756, name: UnityMain  >>> com.impossibleapps.walkinghero <<<
    2. uid: 11068
    3. signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x10
    4. Cause: null pointer dereference
    5.     x0  0000007de3ec5200  x1  0000000000000000  x2  0000000000000000  x3  0000007de4145000
    6.     x4  0000007e6c2032f8  x5  0000007e6c211000  x6  0000000000000000  x7  0000000000000001
    7.     x8  0000000000000000  x9  0000000000000000  x10 0000007de4245000  x11 0000000000000003
    8.     x12 0000000000000011  x13 0000000000000018  x14 174432c07acde026  x15 0000000000000000
    9.     x16 0000007e1102d0e4  x17 0000007efb7c5fd4  x18 000000007f1bf75f  x19 0000007e1102d330
    10.     x20 0000007defde0000  x21 0000007e6c1e95a8  x22 0000007defde0000  x23 0000000000000001
    11.     x24 0000000000000000  x25 0000007e6c1e9598  x26 0000007de4abe538  x27 0000007de4a59f90
    12.     x28 0000000000000058  x29 0000007e1102d2f0
    13.     sp  0000007e1102d280  lr  0000007ded1c44b0  pc  0000007ded1c4564
    14.  
    15. backtrace:
    16.       #00 pc 00000000007fd564  /data/app/com.impossibleapps.walkinghero-KK2T0N3MYSgANOQOFx5I7g==/lib/arm64/libil2cpp.so (BuildId: 23db9bc708a05776a904e91d1495f5b3249335be)
    17.       #01 pc 0000000000800db0  /data/app/com.impossibleapps.walkinghero-KK2T0N3MYSgANOQOFx5I7g==/lib/arm64/libil2cpp.so (BuildId: 23db9bc708a05776a904e91d1495f5b3249335be)
    18.       #02 pc 00000000007f1410  /data/app/com.impossibleapps.walkinghero-KK2T0N3MYSgANOQOFx5I7g==/lib/arm64/libil2cpp.so (BuildId: 23db9bc708a05776a904e91d1495f5b3249335be)
    19.       #03 pc 00000000007ca9ec  /data/app/com.impossibleapps.walkinghero-KK2T0N3MYSgANOQOFx5I7g==/lib/arm64/libil2cpp.so (il2cpp_init+36) (BuildId: 23db9bc708a05776a904e91d1495f5b3249335be)
    20.       #04 pc 0000000000347724  /data/app/com.impossibleapps.walkinghero-KK2T0N3MYSgANOQOFx5I7g==/lib/arm64/libunity.so (BuildId: ba8271088487e43e95f43fed813267d4a689428d)
    21.       #05 pc 00000000003b2d1c  /data/app/com.impossibleapps.walkinghero-KK2T0N3MYSgANOQOFx5I7g==/lib/arm64/libunity.so (BuildId: ba8271088487e43e95f43fed813267d4a689428d)
    22.       #06 pc 00000000003b398c  /data/app/com.impossibleapps.walkinghero-KK2T0N3MYSgANOQOFx5I7g==/lib/arm64/libunity.so (BuildId: ba8271088487e43e95f43fed813267d4a689428d)
    23.       #07 pc 00000000003c9d00  /data/app/com.impossibleapps.walkinghero-KK2T0N3MYSgANOQOFx5I7g==/lib/arm64/libunity.so (BuildId: ba8271088487e43e95f43fed813267d4a689428d)
    24.       #08 pc 00000000000467bc  /data/app/com.impossibleapps.walkinghero-KK2T0N3MYSgANOQOFx5I7g==/oat/arm64/base.odex
    25.  
    26.     at libil2cpp.0x7fd564(Native Method)
    27.     at libil2cpp.0x800db0(Native Method)
    28.     at libil2cpp.0x7f1410(Native Method)
    29.     at libil2cpp.il2cpp_init(il2cpp_init:36)
    30.     at libunity.0x347724(Native Method)
    31.     at libunity.0x3b2d1c(Native Method)
    32.     at libunity.0x3b398c(Native Method)
    33.     at libunity.0x3c9d00(Native Method)
     
  5. Francesco-FL

    Francesco-FL

    Joined:
    May 25, 2021
    Posts:
    176
    Last edited: Aug 10, 2021
  6. thiagolrosa

    thiagolrosa

    Joined:
    Feb 22, 2017
    Posts:
    60
    Were you able to analyze my logs (posts above)? Thanks!
     
  7. JuliusM

    JuliusM

    Unity Technologies

    Joined:
    Apr 17, 2013
    Posts:
    835
    Hi, sorry for a late reply. Unfortunately these logs don't give me any ideas right away. We will have to investigate this issue. Please submit a bug report. Thank you.
     
  8. rizawerx

    rizawerx

    Joined:
    May 30, 2013
    Posts:
    38
    I'm also experiencing this...


    FATAL EXCEPTION: UnityMain
    Process: com.cubrickInteraktive.DemoVirtualEvent, PID: 18036
    java.lang.Error: *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
    Version '2020.3.18f1 (a7d1c678663c)', Build type 'Release', Scripting Backend 'il2cpp', CPU 'arm64-v8a'
    Build fingerprint: 'google/blueline/blueline:9/PQ3A.190801.002/5670241:user/release-keys'
    Revision: 'MP1.0'
    ABI: 'arm64'
    Timestamp: 2021-09-22 07:40:18-0700
    pid: 18036, tid: 18056, name: UnityMain >>> com.cubrickInteraktive.DemoVirtualEvent <<<
    uid: 10171
    signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x10
    Cause: null pointer dereference
    x0 0000007b1f40d640 x1 0000000000000000 x2 0000000000000000 x3 0000000000000000
    x4 0000000000000000 x5 00000000000000a1 x6 0000000000000000 x7 0000000000200000
    x8 0000000000000000 x9 0000000000000000 x10 0000007bc0233000 x11 0000000000000003
    x12 0000000000000017 x13 0000000000000018 x14 0000007bdac028c0 x15 0000000000000000
    x16 0000007c5efb01e0 x17 0000007c5ef44100 x18 000000007f1bf75f x19 0000007bc11839b0
    x20 0000007bc2120000 x21 0000007bd0c63638 x22 0000007bc2120000 x23 0000000000000001
    x24 0000000000000000 x25 0000007bd0c63628 x26 0000007bc054d13c x27 0000007bc050685c
    x28 0000000000000058 x29 0000007bc1183970
    sp 0000007bc1183900 lr 0000007bc14e4cec pc 0000007bc14e4da0
    backtrace:
    #00 pc 000000000035dda0 /data/app/com.cubrickInteraktive.DemoVirtualEvent-bCt8d4LQf_dc-1drMQbMXg==/lib/arm64/libil2cpp.so (BuildId: 047c221b0f5bf1635dd8051cf2fee9ef3759c5e4)
    #01 pc 00000000003615ec /data/app/com.cubrickInteraktive.DemoVirtualEvent-bCt8d4LQf_dc-1drMQbMXg==/lib/arm64/libil2cpp.so (BuildId: 047c221b0f5bf1635dd8051cf2fee9ef3759c5e4)
    #02 pc 0000000000352ca4 /data/app/com.cubrickInteraktive.DemoVirtualEvent-bCt8d4LQf_dc-1drMQbMXg==/lib/arm64/libil2cpp.so (BuildId: 047c221b0f5bf1635dd8051cf2fee9ef3759c5e4)
    #03 pc 000000000027189c /data/app/com.cubrickInteraktive.DemoVirtualEvent-bCt8d4LQf_dc-1drMQbMXg==/lib/arm64/libil2cpp.so (il2cpp_init+36) (BuildId: 047c221b0f5bf1635dd8051cf2fee9ef3759c5e4)
    #04 pc 00000000002a6c64 /data/app/com.cubrickInteraktive.DemoVirtualEvent-bCt8d4LQf_dc-1drMQbMXg==/lib/arm64/libunity.so (BuildId: 5c5d163e83e6bb0c2e6216e734678f9f7ed51a85)
    #05 pc 00000000003145a4 /data/app/com.cubrickInteraktive.DemoVirtualEvent-bCt8d4LQf_dc-1drMQbMXg==/lib/arm64/libunity.so (BuildId: 5c5d163e83e6bb0c2e6216e734678f9f7ed51a85)
    #06 pc 00000000003152a4 /data/app/com.cubrickInteraktive.DemoVirtualEvent-bCt8d4LQf_dc-1drMQbMXg==/lib/arm64/libunity.so (BuildId: 5c5d163e83e6bb0c2e6216e734678f9f7ed51a85)
    #07 pc 000000000032b2ec /data/app/com.cubrickInteraktive.DemoVirtualEvent-bCt8d4LQf_dc-1drMQbMXg==/lib/arm64/libunity.so (BuildId: 5c5d163e83e6bb0c2e6216e734678f9f7ed51a85)
    #08 pc 00000000000047fc /data/app/com.cubrickInteraktive.DemoVirtualEvent-bCt8d4LQf_dc-1drMQbMXg==/oat/arm64/base.odex
    at libil2cpp.0x35dda0(Native Method)
    at libil2cpp.0x3615ec(Native Method)
    at libil2cpp.0x352ca4(Native Method)
    at libil2cpp.il2cpp_init(il2cpp_init:36)
    at libunity.0x2a6c64(Native Method)
    at libunity.0x3145a4(Native Method)
    at libunity.0x3152a4(Native Method)
    at libunity.0x32b2ec(Native Method)
    at base.0x47fc(Native Method)
     
  9. OmarVector

    OmarVector

    Joined:
    Apr 18, 2018
    Posts:
    129
    I've the same issue, nothing seems to work unless I build either for 32 or 64bit, if I checked both, it crash
     
  10. OmarVector

    OmarVector

    Joined:
    Apr 18, 2018
    Posts:
    129

    Thanks for sharing those steps, it helped me to make my build working at least
     
  11. zinzsoft

    zinzsoft

    Joined:
    Oct 19, 2021
    Posts:
    1
    is there any news on this yet ?
     
  12. thiagolrosa

    thiagolrosa

    Joined:
    Feb 22, 2017
    Posts:
    60
    No, almost one year later this issue is still happening in 2020.3.33f1...
     
  13. ColinAmuzo

    ColinAmuzo

    Joined:
    Mar 20, 2013
    Posts:
    46
    Happens for me too in Unity 2020.3.17.
    9407 recursive calls to FromTypeDefinition according to the (partially symbolicated) crash log.
    Can't attach the log because it's too large, but here are some screenshots:
    upload_2022-11-30_16-26-13.png

    upload_2022-11-30_16-26-58.png
     
  14. sanekmin

    sanekmin

    Joined:
    Jul 28, 2015
    Posts:
    1
    My tips for fix it
    1) Build arm7 APK and Arm8 APK (2 builds). After this AAB will good. Repeat this every build
    2) Clear unity cache and delete library and first tip will not need
     
  15. thiagolrosa

    thiagolrosa

    Joined:
    Feb 22, 2017
    Posts:
    60
    From my experience, without clearing the temp folder you never get a working bundle with ARM8 included. Just building 7 then 8 doesn't work for me without clearing the temp folder.