Unity-Technologies / arfoundation-samples

Example content for Unity projects based on AR Foundation
Other
3.04k stars 1.14k forks source link

[Bug]Black screen on changing camera configuration #993

Closed handrianj closed 2 years ago

handrianj commented 2 years ago

Unity bug report case number IN-9509

Describe the bug When changing camera configuration in the CPU image scene, the screen becomes dark and all other images stop updating.

To Reproduce Steps to reproduce the behavior:

  1. Go to CPU image scene
  2. Select a new resolution in the scroll down
  3. Black screen happens

Expected behavior In the CPUImage scene, change the configuration in the dropdown. The image resolution is updated and the information is updated too.

Actual behavior In the CPUImage scene, change the configuration in the dropdown. All images suddenly become black and the information displayed is the original resolution info.

Smartphone (please complete the following information):

Android logcat 2022/07/07 15:35:11.660 31279 31299 Error native E0000 00:00:1657179311.660397 31299 status.cc:162] FAILED_PRECONDITION: 2022/07/07 15:35:11.660 31279 31299 Error native ARCoreError: third_party/arcore/ar/core/session.cc:4181 2022/07/07 15:35:11.660 31279 31299 Error native at third_party/arcore/ar/core/session.cc:4181 [type.googleapis.com/util.ErrorSpacePayload='ArStatusErrorSpace::AR_ERROR_NOT_YET_AVAILABLE'] 2022/07/07 15:35:11.660 31279 31299 Error native === Source Location Trace: === 2022/07/07 15:35:11.660 31279 31299 Error native third_party/arcore/ar/core/session.cc:4181 2022/07/07 15:35:11.660 31279 31299 Error native 2022/07/07 15:35:12.677 31279 31299 Error native E0000 00:00:1657179312.677140 31299 error_policy_util.cc:263] 2022/07/07 15:35:12.677 31279 31299 Error native ################ ARCore Native Error ################## 2022/07/07 15:35:12.677 31279 31299 Error native BUILD_CHANGELIST:452219294 2022/07/07 15:35:12.677 31279 31299 Error native BUILD_BASELINE_CHANGELIST:452219294 2022/07/07 15:35:12.677 31279 31299 Error native ################### Stack Trace Begin ################ 2022/07/07 15:35:12.677 31279 31299 Error native ARCoreError: third_party/arcore/ar/infrastructure/android_data_source.cc:176 https://cs.corp.google.com/piper///depot/google3/third_party/arcore/ar/infrastructure/android_data_source.cc?g=0&l=176 2022/07/07 15:35:12.677 31279 31299 Error native ARCoreError: third_party/arcore/ar/core/camera_config_manager_2/camera_config_manager.cc:318 https://cs.corp.google.com/piper///depot/google3/third_party/arcore/ar/core/camera_config_manager_2/camera_config_manager.cc?g=0&l=318 2022/07/07 15:35:12.677 31279 31299 Error native ARCoreError: third_party/arcore/ar/core/session.cc:1310 https://cs.corp.google.com/piper///depot/google3/third_party/arcore/ar/core/session.cc?g=0&l=1310 2022/07/07 15:35:12.677 31279 31299 Error native ARCoreError: third_party/arcore/ar/core/c_api/session_lite_c_api.cc:50 https://cs.corp.google.com/piper///depot/google3/third_party/arcore/ar/core/c_api/session_lite_c_api.cc?g=0&l=50 2022/07/07 15:35:12.677 31279 31299 Error native ################### Stack Trace End ################# 2022/07/07 15:35:12.677 31279 31299 Error native 2022/07/07 15:35:12.677 31279 31299 Error native ################### Undecorated Trace Begin ################# 2022/07/07 15:35:12.677 31279 31299 Error native UNKNOWN: 2022/07/07 15:35:12.677 31279 31299 Error native ARCoreError: third_party/arcore/ar/core/session.cc:1310 2022/07/07 15:35:12.677 31279 31299 Error native 2022/07/07 15:35:12.677 31279 31299 Error native ARCoreError: third_party/arcore/ar/core/camera_config_manager_2/camera_config_manager.cc:318 2022/07/07 15:35:12.677 31279 31299 Error native 2022/07/07 15:35:12.677 31279 31299 Error native ARCoreError: third_party/arcore/ar/infrastructure/android_data_source.cc:176 2022/07/07 15:35:12.677 31279 31299 Error native There are images not closed yet! 2022/07/07 15:35:12.677 31279 31299 Error native === Source Location Trace: === 2022/07/07 15:35:12.677 31279 31299 Error native third_party/arcore/ar/infrastructure/android/jni_util.cc:111 2022/07/07 15:35:12.677 31279 31299 Error native third_party/arcore/ar/infrastructure/android/java_cameras.cc:207 2022/07/07 15:35:12.677 31279 31299 Error native third_party/arcore/ar/infrastructure/android_data_source.cc:176 2022/07/07 15:35:12.677 31279 31299 Error native third_party/arcore/ar/core/camera_config_manager_2/camera_config_manager.cc:318 2022/07/07 15:35:12.677 31279 31299 Error native third_party/arcore/ar/core/camera_config_manager_2/camera_config_manager.cc:430 2022/07/07 15:35:12.677 31279 31299 Error native third_party/arcore/ar/core/session.cc:1310 2022/07/07 15:35:12.677 31279 31299 Error native third_party/arcore/ar/core/session.cc:1334 2022/07/07 15:35:12.677 31279 31299 Error native 2022/07/07 15:35:12.677 31279 31299 Error native ################### Undecorated Trace End ################# 2022/07/07 15:35:12.677 31279 31299 Error native 2022/07/07 15:35:12.677 31279 31299 Info native I0000 00:00:1657179312.677408 31299 session_manager.cc:329] ArPresto::Moving from ArPrestoStatus 102 to 200 2022/07/07 15:35:12.677 31279 31299 Info native I0000 00:00:1657179312.677536 31299 arpresto_api.cc:173] ArPresto::ArPresto_setCameraTextureNames 2022/07/07 15:35:12.682 31279 31299 Error native E0000 00:00:1657179312.682024 31299 status.cc:162] FAILED_PRECONDITION: 2022/07/07 15:35:12.682 31279 31299 Error native ARCoreError: third_party/arcore/ar/core/session.cc:4181 2022/07/07 15:35:12.682 31279 31299 Error native at third_party/arcore/ar/core/session.cc:4181 [type.googleapis.com/util.ErrorSpacePayload='ArStatusErrorSpace::AR_ERROR_NOT_YET_AVAILABLE'] 2022/07/07 15:35:12.682 31279 31299 Error native === Source Location Trace: === 2022/07/07 15:35:12.682 31279 31299 Error native third_party/arcore/ar/core/session.cc:4181 2022/07/07 15:35:12.682 31279 31299 Error native 2022/07/07 15:35:12.696 31279 31299 Error native E0000 00:00:1657179312.696276 31299 status.cc:162] FAILED_PRECONDITION: 2022/07/07 15:35:12.696 31279 31299 Error native ARCoreError: third_party/arcore/ar/core/session.cc:4181 2022/07/07 15:35:12.696 31279 31299 Error native at third_party/arcore/ar/core/session.cc:4181 [type.googleapis.com/util.ErrorSpacePayload='ArStatusErrorSpace::AR_ERROR_NOT_YET_AVAILABLE'] 2022/07/07 15:35:12.696 31279 31299 Error native === Source Location Trace: === 2022/07/07 15:35:12.696 31279 31299 Error native third_party/arcore/ar/core/session.cc:4181 2022/07/07 15:35:12.696 31279 31299 Error native 2022/07/07 15:35:12.709 31279 31299 Error native E0000 00:00:1657179312.709544 31299 status.cc:162] FAILED_PRECONDITION: 2022/07/07 15:35:12.709 31279 31299 Error native ARCoreError: third_party/arcore/ar/core/session.cc:4181 2022/07/07 15:35:12.709 31279 31299 Error native at third_party/arcore/ar/core/session.cc:4181 [type.googleapis.com/util.ErrorSpacePayload='ArStatusErrorSpace::AR_ERROR_NOT_YET_AVAILABLE'] 2022/07/07 15:35:12.709 31279 31299 Error native === Source Location Trace: === 2022/07/07 15:35:12.709 31279 31299 Error native third_party/arcore/ar/core/session.cc:4181 2022/07/07 15:35:12.709 31279 31299 Error native 2022/07/07 15:35:12.729 31279 31299 Error native E0000 00:00:1657179312.729156 31299 status.cc:162] FAILED_PRECONDITION: 2022/07/07 15:35:12.729 31279 31299 Error native ARCoreError: third_party/arcore/ar/core/session.cc:4181 2022/07/07 15:35:12.729 31279 31299 Error native at third_party/arcore/ar/core/session.cc:4181 [type.googleapis.com/util.ErrorSpacePayload='ArStatusErrorSpace::AR_ERROR_NOT_YET_AVAILABLE'] 2022/07/07 15:35:12.729 31279 31299 Error native === Source Location Trace: === 2022/07/07 15:35:12.729 31279 31299 Error native third_party/arcore/ar/core/session.cc:4181 2022/07/07 15:35:12.729 31279 31299 Error native 2022/07/07 15:35:12.750 31279 31299 Error native E0000 00:00:1657179312.750773 31299 status.cc:162] FAILED_PRECONDITION: 2022/07/07 15:35:12.750 31279 31299 Error native ARCoreError: third_party/arcore/ar/core/session.cc:4181 2022/07/07 15:35:12.750 31279 31299 Error native at third_party/arcore/ar/core/session.cc:4181 [type.googleapis.com/util.ErrorSpacePayload='ArStatusErrorSpace::AR_ERROR_NOT_YET_AVAILABLE'] 2022/07/07 15:35:12.750 31279 31299 Error native === Source Location Trace: === 2022/07/07 15:35:12.750 31279 31299 Error native third_party/arcore/ar/core/session.cc:4181 2022/07/07 15:35:12.750 31279 31299 Error native 2022/07/07 15:35:12.773 31279 31299 Error native E0000 00:00:1657179312.773221 31299 status.cc:162] FAILED_PRECONDITION: 2022/07/07 15:35:12.773 31279 31299 Error native ARCoreError: third_party/arcore/ar/core/session.cc:4181 2022/07/07 15:35:12.773 31279 31299 Error native at third_party/arcore/ar/core/session.cc:4181 [type.googleapis.com/util.ErrorSpacePayload='ArStatusErrorSpace::AR_ERROR_NOT_YET_AVAILABLE'] 2022/07/07 15:35:12.773 31279 31299 Error native === Source Location Trace: === 2022/07/07 15:35:12.773 31279 31299 Error native third_party/arcore/ar/core/session.cc:4181 2022/07/07 15:35:12.773 31279 31299 Error native 2022/07/07 15:35:12.795 31279 31299 Error native E0000 00:00:1657179312.795719 31299 status.cc:162] FAILED_PRECONDITION: 2022/07/07 15:35:12.795 31279 31299 Error native ARCoreError: third_party/arcore/ar/core/session.cc:4181 2022/07/07 15:35:12.795 31279 31299 Error native at third_party/arcore/ar/core/session.cc:4181 [type.googleapis.com/util.ErrorSpacePayload='ArStatusErrorSpace::AR_ERROR_NOT_YET_AVAILABLE'] 2022/07/07 15:35:12.795 31279 31299 Error native === Source Location Trace: === 2022/07/07 15:35:12.795 31279 31299 Error native third_party/arcore/ar/core/session.cc:4181 2022/07/07 15:35:12.795 31279 31299 Error native 2022/07/07 15:35:12.817 31279 31299 Error native E0000 00:00:1657179312.817286 31299 status.cc:162] FAILED_PRECONDITION: 2022/07/07 15:35:12.817 31279 31299 Error native ARCoreError: third_party/arcore/ar/core/session.cc:4181 2022/07/07 15:35:12.817 31279 31299 Error native at third_party/arcore/ar/core/session.cc:4181 [type.googleapis.com/util.ErrorSpacePayload='ArStatusErrorSpace::AR_ERROR_NOT_YET_AVAILABLE'] 2022/07/07 15:35:12.817 31279 31299 Error native === Source Location Trace: === 2022/07/07 15:35:12.817 31279 31299 Error native third_party/arcore/ar/core/session.cc:4181 2022/07/07 15:35:12.817 31279 31299 Error native 2022/07/07 15:35:12.838 31279 31299 Error native E0000 00:00:1657179312.838617 31299 status.cc:162] FAILED_PRECONDITION: 2022/07/07 15:35:12.838 31279 31299 Error native ARCoreError: third_party/arcore/ar/core/session.cc:4181 2022/07/07 15:35:12.838 31279 31299 Error native at third_party/arcore/ar/core/session.cc:4181 [type.googleapis.com/util.ErrorSpacePayload='ArStatusErrorSpace::AR_ERROR_NOT_YET_AVAILABLE'] 2022/07/07 15:35:12.838 31279 31299 Error native === Source Location Trace: === 2022/07/07 15:35:12.838 31279 31299 Error native third_party/arcore/ar/core/session.cc:4181 2022/07/07 15:35:12.838 31279 31299 Error native

JohnMichaelTO commented 2 years ago

I reproduced the same issue with my OnePlus 9 Pro 5G with the following AR Foundation samples versions:

I couldn't downgrade to 4.0 as I get a pop-up saying Google Play services for ARCore needs to be updated to the latest version, which is already installed.

Notice also that my OnePlus is a Chinese hardware version (LE2120) but it's running the European firmware version (LE2123).

@andyb-unity Would it be possible to know what is missing here to proceed further with this bug please? Thanks in advance for your help!

ankur-unity commented 2 years ago

The bug, IN-9509, for Pixel 6 device is still in triage with QA.

Notice also that my OnePlus is a Chinese hardware version (LE2120) but it's running the European firmware version (LE2123).

@JohnMichaelTO - I can't find your device under the list of supported devices (China) at https://developers.google.com/ar/devices#android_china. The device is likely not supported by Google for ARCore. Note that running a different firmware on a device does not guarantee support for ARCore. For further inquiry about ARCore support on this device, you will need to reach out to Google: https://github.com/google-ar/arcore-android-sdk

ankur-unity commented 2 years ago

During our investigation of IN-9509/IN-9508, we discovered that this is an issue in ARCore SDK and cannot be fixed by Unity in AR Foundation. We have communicated it to Google already. Please reach out to them directly for updates on the issue: https://github.com/google-ar/arcore-android-sdk

Closing it for now since we can't fix it in AR Foundation. Please feel free to re-open if you have follow-up questions.