Search Unity

Question Error libc Access denied finding property "persist.vendor.camera.privapp.list". OpenCV in Android

Discussion in 'AR' started by AlberVicky09, Jun 20, 2022.

  1. AlberVicky09

    AlberVicky09

    Joined:
    Mar 16, 2020
    Posts:
    1
    Hi everyone, im making a game that uses OpenCv for face tracking and PaperPlaneTools (that depends of OpenCV) for marker tracking.
    When i run the app in the editor, it works all good, but when i make the android build it reports me with "Access denied finding property "persist.vendor.camera.privapp.list". when i enter the scene with the camera usage.
    After some time stuck, this warning appears
    Code (CSharp):
    1. 2022/06/20 20:42:24.142 8495 8548 Warn Adreno-GSL <sharedmem_gpuobj_alloc:2713>: sharedmem_gpumem_alloc: mmap failed errno 12 Out of memory
    2.  
    And then this error
    Code (CSharp):
    1. 2022/06/20 20:42:24.154 8495 8548 Error Adreno-GSL <gsl_memory_alloc_pure:2297>: GSL MEM ERROR: kgsl_sharedmem_alloc ioctl failed.
    2.  
    They both appear like 50 times and then this error appears
    Code (CSharp):
    1. 2022/06/20 20:43:04.214 8495 8548 Error Unity Could not allocate memory: System out of memory!
    2.  
    But the device have a few Gb of free space and an SD card with 20 Gb free, so it cant be a memory problem, so i thought it was due to the camera issue.

    Im using a Xiaomi device with MIUI12, if it helps in something.
     
  2. RiviV33

    RiviV33

    Joined:
    Sep 10, 2021
    Posts:
    4
    Having somewhat of a similar situation here
     
  3. davidmo_unity

    davidmo_unity

    Unity Technologies

    Joined:
    Jun 18, 2019
    Posts:
    99
    The warning is indicating that you are running out of RAM memory, it won't matter how much SD card or onboard storage the device has. I am grossly oversimplifying this but generally speaking GPU's on mobile devices typically leverage the devices RAM as it's VRAM.

    While not your particular model the ARM Mali GPU Documentation gives a good overview of how mobile graphics chips work under the hood. OpenCV will use GPU compute to perform operations so similar concepts will apply.