Search Unity

Bug Crash when using ARFoundation (android) StartedCameraController(0) Saw capture failed event, failure

Discussion in 'AR' started by Ganosal, Mar 1, 2023.

  1. Ganosal

    Ganosal

    Joined:
    Sep 25, 2015
    Posts:
    6
    We are working on an AR application with ARFoundation, but we have had random crashes, where the app just closes. These always seem to happen at random moments, and we haven't found a way to reproduce it consistently.

    The error we get is:

    2023/02/27 16:02:34.912 23932 23947 Error BufferQueueProducer [ImageReader-1920x1080f22u256m16-23932-0](id:5d7c00000004,api:4,p:1581,c:23932) dequeueBuffer: attempting to exceed the max dequeued buffer count (9)
    2023/02/27 16:02:34.913 23932 24891 Error RepeatCaptureReq(0) Capture failed.
    2023/02/27 16:02:34.914 23932 25018 Error StartedCameraController(0) Saw capture failed event, failure: android.hardware.camera2.CaptureFailure@74c66a1.


    Unity version: Unity 2023.1.0a20
    ARFoundation: 5.0.3
    Google ARCore XR Plugin: 5.0.2

    Anyone an idea what could cause and hopefully solve the crash? I know the alpha version of Unity is not ideal, but sadly I was placed on this project after the decision to use this version of Unity was taken.
     
  2. Ganosal

    Ganosal

    Joined:
    Sep 25, 2015
    Posts:
    6
    I was able to catch a crash on a development build any this was the log:

     
  3. andyb-unity

    andyb-unity

    Unity Technologies

    Joined:
    Feb 10, 2022
    Posts:
    1,062
    You should always use the same version of provider plug-ins (ARCore, ARKit, etc) as the AR Foundation version. Please upgrade ARCore to 5.0.3 and see if your issue persists.
     
  4. MarcSpraragen

    MarcSpraragen

    Joined:
    Jun 29, 2020
    Posts:
    8
    We're on 5.0.3 for both and same error is happening multiple times per run.


    023-03-09 14:39:48.297 8848-8863 BufferQueueProducer E [ImageReader-1920x1080f22u256m16-8848-0](id:229000000002,api:4,p:1819,c:8848) dequeueBuffer: attempting to exceed the max dequeued buffer count (9)
    2023-03-09 14:39:48.297 1819-10105 Camera3-OutputStream cameraserver E getBufferLockedCommon: Stream 0: Can't dequeue next output buffer: Function not implemented (-38)
    2023-03-09 14:39:48.297 1819-10105 CameraDeviceClient cameraserver E notifyError: pid=8848, errorCode=3, errorStreamId=-1, frameNumber=5109
    2023-03-09 14:39:48.297 1819-10105 CameraDeviceClient cameraserver E notifyError: pid=8848, skipClientNotification=false
    2023-03-09 14:39:48.298 8848-10041 RepeatCaptureReq(0) E Capture failed.
    2023-03-09 14:39:48.298 8848-10220 StartedCam...troller(0) E Saw capture failed event, failure: android.hardware.camera2.CaptureFailure@57c332a.



    Also, this crash is happening every run (no more camera errors after that ;)


    *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
    2023-03-09 14:39:48.549 8848-9687 CRASH E Version '2022.2.9f1 (1cc571a6ec95)', Build type 'Release', Scripting Backend 'il2cpp', CPU 'arm64-v8a'
    2023-03-09 14:39:48.549 8848-9687 CRASH E Build fingerprint: 'samsung/p3qsqw/p3q:13/TP1A.220624.014/G998USQU5EWAI:user/release-keys'
    2023-03-09 14:39:48.549 8848-9687 CRASH E Revision: '18'
    2023-03-09 14:39:48.549 8848-9687 CRASH E ABI: 'arm64'
    2023-03-09 14:39:48.549 8848-9687 CRASH E Timestamp: 2023-03-09 14:39:48.549499854-0500
    2023-03-09 14:39:48.549 8848-9687 CRASH E pid: 8848, tid: 9687, name: UnityGfxDeviceW >>> <<<
    2023-03-09 14:39:48.549 8848-9687 CRASH E uid: 11012
    2023-03-09 14:39:48.549 8848-9687 CRASH E signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr --------
    2023-03-09 14:39:48.549 8848-9687 CRASH E Cause: null pointer dereference
    2023-03-09 14:39:48.549 8848-9687 CRASH E x0 00000073a298b300 x1 00000000a298b580 x2 00000000a298b580 x3 0000000000000000
    2023-03-09 14:39:48.549 8848-9687 CRASH E x4 0000000000000000 x5 0000000000000000 x6 0000000000000000 x7 0101f5b009600438
    2023-03-09 14:39:48.549 8848-9687 CRASH E x8 0000000000000031 x9 0000000800000000 x10 0000000000000000 x11 0000000000000000
    2023-03-09 14:39:48.549 8848-9687 CRASH E x12 000000000afba214 x13 00000cdaa3293f70 x14 000f9b726856f1e6 x15 0000000034155555
    2023-03-09 14:39:48.549 8848-9687 CRASH E x16 0000000000000001 x17 000000776632fca8 x18 000000732b62a000 x19 00000073a298b300
    2023-03-09 14:39:48.549 8848-9687 CRASH E x20 00000000a298b580 x21 00000000a298b538 x22 00000008a298b580 x23 0000000000000000
    2023-03-09 14:39:48.549 8848-9687 CRASH E x24 000000000038a8bc x25 00000073a04d6770 x26 00000073a11cc0c0 x27 000000731000018c
    2023-03-09 14:39:48.549 8848-9687 CRASH E x28 000000732b977000 x29 000000732b976b20
    2023-03-09 14:39:48.549 8848-9687 CRASH E lr 00000073e3d27f78 sp 000000732b9767d0 pc 00000073e3d2802c pst 0000000060001000
    2023-03-09 14:39:48.549 8848-9687 CRASH E backtrace:
    2023-03-09 14:39:48.549 8848-9687 CRASH E #00 pc 00000000009ac02c /data/app/~~dAGU4ZXEZ8vTm-SmqIoFGA==/-o32c7k7Lehzvrhclj1-jOQ==/lib/arm64/libunity.so (BuildId: 30a337b8cb10f9f2)
    2023-03-09 14:39:48.549 8848-9687 CRASH E #01 pc 00000000009abf74 /data/app/~~dAGU4ZXEZ8vTm-SmqIoFGA==/-o32c7k7Lehzvrhclj1-jOQ==/lib/arm64/libunity.so (BuildId: 30a337b8cb10f9f2)
    2023-03-09 14:39:48.549 8848-9687 CRASH E #02 pc 0000000000974268 /data/app/~~dAGU4ZXEZ8vTm-SmqIoFGA==/-o32c7k7Lehzvrhclj1-jOQ==/lib/arm64/libunity.so (BuildId: 30a337b8cb10f9f2)
    2023-03-09 14:39:48.549 8848-9687 CRASH E #03 pc 0000000000975da8 /data/app/~~dAGU4ZXEZ8vTm-SmqIoFGA==/-o32c7k7Lehzvrhclj1-jOQ==/lib/arm64/libunity.so (BuildId: 30a337b8cb10f9f2)
    2023-03-09 14:39:48.549 8848-9687 CRASH E #04 pc 0000000000b5df78 /data/app/~~dAGU4ZXEZ8vTm-SmqIoFGA==/-o32c7k7Lehzvrhclj1-jOQ==/lib/arm64/libunity.so (BuildId: 30a337b8cb10f9f2)
    2023-03-09 14:39:48.549 8848-9687 CRASH E #05 pc 0000000000b5689c /data/app/~~dAGU4ZXEZ8vTm-SmqIoFGA==/-o32c7k7Lehzvrhclj1-jOQ==/lib/arm64/libunity.so (BuildId: 30a337b8cb10f9f2)
    2023-03-09 14:39:48.549 8848-9687 CRASH E #06 pc 0000000000b56614 /data/app/~~dAGU4ZXEZ8vTm-SmqIoFGA==/-o32c7k7Lehzvrhclj1-jOQ==/lib/arm64/libunity.so (BuildId: 30a337b8cb10f9f2)
    2023-03-09 14:39:48.549 8848-9687 CRASH E #07 pc 0000000000563b08 /data/app/~~dAGU4ZXEZ8vTm-SmqIoFGA==/-o32c7k7Lehzvrhclj1-jOQ==/lib/arm64/libunity.so (BuildId: 30a337b8cb10f9f2)
    2023-03-09 14:39:48.549 8848-9687 CRASH E #08 pc 00000000000bb728 /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+208) (BuildId: 870560a8376a70249f9e9a7b480cc02f)
    2023-03-09 14:39:48.549 8848-9687 CRASH E #09 pc 000000000005501c /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+68) (BuildId: 870560a8376a70249f9e9a7b480cc02f)

     
    fredperr likes this.
  5. andyb-unity

    andyb-unity

    Unity Technologies

    Joined:
    Feb 10, 2022
    Posts:
    1,062