Search Unity

  1. Read here for Unity's latest plans on OpenXR.
    Dismiss Notice

Bug ARFoundation black screen issue on Android 11

Discussion in 'AR' started by mb13admin, Aug 27, 2021.

  1. mb13admin

    mb13admin

    Joined:
    May 28, 2017
    Posts:
    18
    Hi all,
    Our QAs team and customers are reporting many issues with samsung devices with android 11 showing black screen when entering ARFoundation
    For example: S20+ fw 11, S10+ fw 11
    The issue does not occur with Pixel 2 fw 11 or Samsung Devices with android 10 or lower

    Before it was fine but after we try to build with Target SDK 30 (as Google requirement for submission) the black screen occurs on fw 11

    We are using AR Foundtion 4.1.7 with Unity 2020.3.16
    Can anyone help us on this?
    Cheers
     
  2. mb13admin

    mb13admin

    Joined:
    May 28, 2017
    Posts:
    18
    Today we are reported crashes with ARCore on samsung flagships while they are trying to load the arcore plugin

    Code (CSharp):
    1. 08-27 09:17:49.844: I/third_party/arcore/ar/core/android/sdk/session_create.cc(19046): Entering ArSession_createWithFeatures
    2. 08-27 09:17:49.844: I/third_party/arcore/ar/core/android/sdk/session_create.cc(19046): ARCore Version: SDK build name: 1.22
    3. 08-27 09:17:49.845: I/third_party/arcore/ar/core/android/sdk/session_create.cc(19046): ARCore Version: APK version code: 212010383
    4. 08-27 09:17:49.865: D/InputTransport(1120): Input channel destroyed: 'ClientS', fd=735
    5. 08-27 09:17:49.866: I/Zygote(775): Process 12755 exited due to signal 9 (Killed)
    6. 08-27 09:17:49.867: I/libprocessgroup(1120): Successfully killed process cgroup uid 10092 pid 12755 in 50ms
    7. 08-27 09:17:49.872: W/ActivityManager(1120): setHasOverlayUi called on unknown pid: 12755
    8. 08-27 09:17:49.873: I/SemDvfsHyPerManager(13607): acquire hyper - com.samsung.android.game.gos/13607@6, type = 536875010
    9. 08-27 09:17:49.875: I/CameraService(1129): UidPolicy: No processes running for a uid=10092 disabled=0
    10. 08-27 09:17:49.876: I/HYPER-HAL(870): [RequestManager.cpp]acquire(): Acquired ID : 92663697  [13607 / 6]    HINT :      list : [GPUMaxFreq / 345]
    11. 08-27 09:17:49.903: I/third_party/arcore/ar/core/android/sdk/session_create.cc(19046): Dynamite load ok.
    12. 08-27 09:17:49.903: I/third_party/arcore/java/com/google/vr/dynamite/client/native/dynamite_client.cc(19046): Attempting to load native library arcore_c from package com.google.ar.core
    13. 08-27 09:17:49.905: E/DynamiteClient(19046): Failed to load native library [packageName=com.google.ar.core,libraryName=arcore_c] from remote package:
    14. 08-27 09:17:49.905: E/DynamiteClient(19046):  
    15. 08-27 09:17:49.905: E/DynamiteClient(19046): java.lang.UnsatisfiedLinkError: dlopen failed: "/data/app/~~u_1pv7mhEcdnnbSpbvHKgQ==/com.google.ar.core-ln9aByaqxbuIVWB73BtlpA==/base.apk!/lib/arm64-v8a/libarcore_c.so" is 64-bit instead of 32-bit
    16. 08-27 09:17:49.905: E/DynamiteClient(19046):     at java.lang.Runtime.loadLibrary0(Runtime.java:1087)
    17. 08-27 09:17:49.905: E/DynamiteClient(19046):     at java.lang.Runtime.loadLibrary0(Runtime.java:1008)
    18. 08-27 09:17:49.905: E/DynamiteClient(19046):     at java.lang.System.loadLibrary(System.java:1664)
    19. 08-27 09:17:49.905: E/DynamiteClient(19046):     at com.google.vr.dynamite.NativeLibraryLoader.b(PG:5)
    20. 08-27 09:17:49.905: E/DynamiteClient(19046):     at com.google.vr.dynamite.NativeLibraryLoader.initializeAndLoadNativeLibrary(PG:2)
    21. 08-27 09:17:49.905: E/DynamiteClient(19046):     at gan.A(PG:6)
    22. 08-27 09:17:49.905: E/DynamiteClient(19046):     at agy.onTransact(PG:3)
    23. 08-27 09:17:49.905: E/DynamiteClient(19046):     at android.os.Binder.transact(Binder.java:1079)
    24. 08-27 09:17:49.905: E/DynamiteClient(19046):     at com.google.a.a.a.b(BaseProxy.java:2)
    25. 08-27 09:17:49.905: E/DynamiteClient(19046):     at com.google.vr.dynamite.client.b.initializeAndLoadNativeLibrary(INativeLibraryLoader.java:3)
    26. 08-27 09:17:49.905: E/DynamiteClient(19046):     at com.google.vr.dynamite.client.DynamiteClient.loadNativeRemoteLibrary(DynamiteClient.java:8)
    27. 08-27 09:17:49.905: E/DynamiteClient(19046):     at com.unity3d.player.UnityPlayer.nativeRender(Native Method)
    28. 08-27 09:17:49.905: E/DynamiteClient(19046):     at com.unity3d.player.UnityPlayer.access$300(Unknown Source:0)
    29. 08-27 09:17:49.905: E/DynamiteClient(19046):     at com.unity3d.player.UnityPlayer$e$1.handleMessage(Unknown Source:95)
    30. 08-27 09:17:49.905: E/DynamiteClient(19046):     at android.os.Handler.dispatchMessage(Handler.java:102)
    31. 08-27 09:17:49.905: E/DynamiteClient(19046):     at android.os.Looper.loop(Looper.java:246)
    32. 08-27 09:17:49.905: E/DynamiteClient(19046):     at com.unity3d.player.UnityPlayer$e.run(Unknown Source:20)
    33. 08-27 09:17:49.905: I/third_party/arcore/java/com/google/vr/dynamite/client/native/dynamite_client.cc(19046): Dynamite::LoadNativeRemoteLibrary handle=0
    34. 08-27 09:17:49.905: E/third_party/arcore/ar/core/android/sdk/session_create.cc(19046): Dynamite failed to load remote library
    35. 08-27 09:17:49.905: E/third_party/arcore/ar/core/android/sdk/session_create.cc(19046): LoadSymbolsDynamite returning AR_ERROR_FATAL.
    36. 08-27 09:17:49.905: E/third_party/arcore/ar/core/android/sdk/session_create.cc(19046): LoadSymbols returning status.
    37. 08-27 09:17:49.905: E/native(19046): session_manager.cc:56 ArPresto::ArCore session creation failed.
     
  3. todds_unity

    todds_unity

    Unity Technologies

    Joined:
    Aug 1, 2018
    Posts:
    171
    The key message in your crash report is:
    E/DynamiteClient(19046): java.lang.UnsatisfiedLinkError: dlopen failed: "/data/app/~~u_1pv7mhEcdnnbSpbvHKgQ==/com.google.ar.core-ln9aByaqxbuIVWB73BtlpA==/base.apk!/lib/arm64-v8a/libarcore_c.so" [URL='http://www.google.com/search?q=is+msdn.microsoft.com']is[/URL] 64-bit instead of 32-bit


    ARCore has deprecated support for 32-bit.
    https://developers.google.com/ar/64bit

    See this thread for more discussion on our forum.
    https://forum.unity.com/threads/hard-crash-face-tracking-on-arcore-1-26-212010383.1158317/
     
  4. mb13admin

    mb13admin

    Joined:
    May 28, 2017
    Posts:
    18
    Hi, Did you mean to turn of armv7 and keep only arm64?
    We are enabling both ARMv7 and ARM64 in Player Settings
    and I'm wondering why do those flagships choose to run armv7 apk instead of arm64 instead?
     
  5. todds_unity

    todds_unity

    Unity Technologies

    Joined:
    Aug 1, 2018
    Posts:
    171
    For devices that are 64-bit only or devices that support both 64- and 32-bit, the 64-bit version of the app should be used.

    There are some devices that support ARCore but that are still only 32-bit. Only these devices should use the 32-bit version of the app.

    If you are building for both armv7 and arm64, that is the correct approach. You will need to file a bug with Unity for us to be able to investigate the issue.
    https://unity3d.com/unity/qa/bug-reporting
     
  6. mb13admin

    mb13admin

    Joined:
    May 28, 2017
    Posts:
    18
    Yes we are using both armv7 and arm64 for 2 years and it has been working fine when we use unity 2019.4 and ARfoundation 3

    Since when upgrade to unity 2020.3 and ARFoundation 4.1.7 recently,
    the issue only occurs on Samsung S series with andoird 11 only (S10, S20, S21 and variants)
    it does not occur on Samsung Note, A or Tab series or other manufactrurers like Pixel and Xiaomi
    I believe this is a bug on how Unity/ARFoundation handle the so file foreach platform
     
unityunity