Search Unity

Bug Crash issue with Vulkan and DevelopmentBuild

Discussion in 'VR' started by Fujii-Hibiki, Dec 22, 2023.

  1. Fujii-Hibiki

    Fujii-Hibiki

    Joined:
    Jul 2, 2015
    Posts:
    4
    Crash issue with Vulkan and DevelopmentBuild

    When I build an APK with DevelopmentBuild enabled on Unity 2022.3.11f1 and run it on PICO4, it crashes before the splash screen appears.
    If I disable Vulkan or disable DevelopmentBuild, there is no problem.

    I reported this issue in a bug report, but was told that it is a "single device third party issue." and will not be fixed.
    https://issuetracker.unity3d.com/is...-at-launch-when-development-build-is-selected

    Then I updated Unity to 2022.3.16f1 and now the same problem occurs in MetaQuest2.

    Does anyone know how to work around this problem?
     
  2. DevDunk

    DevDunk

    Joined:
    Feb 13, 2020
    Posts:
    5,041
    Is graphics jobs enabled?
    Maybe disable that (if that doesn't fix it turn it back on)
    Can you share the android and graphics settings?
    Which errors do you get on logcat?
     
  3. Fujii-Hibiki

    Fujii-Hibiki

    Joined:
    Jul 2, 2015
    Posts:
    4
    Graphic Jobs (Experimental)" is disabled. Enabling it did not improve the problem.
    Most of the other settings are still the default settings for Unity 3D projects.
    Only IL2CPP and ARM64 have been changed.

    I do not know which error logs are important.

    Fatal libc Fatal signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x120 in tid 9738 (UnityGfxDeviceW), pid 4701 (ICO4CrashSample)
    Fatal DEBUG pid: 4701, ppid: 747, tid: 9738, name: UnityGfxDeviceW >>> com.DefaultCompany.PICO4CrashSample <<<
    Fatal DEBUG #04 pc 0000000000c7bbe4 /data/app/com.DefaultCompany.PICO4CrashSample-J0IewwIPZ0KLCcKS6JDkjw==/lib/arm64/libunity.so (vk::CommandBuffer::Begin(vk::CommandBuffer::Type, VkRenderPass_T*, VkFramebuffer_T*, unsigned int, unsigned long, bool)+264) (BuildId: 587385b31144c6cb)
     
  4. DevDunk

    DevDunk

    Joined:
    Feb 13, 2020
    Posts:
    5,041
    If that's in the latest LTS and latest pico sdk I am not sure what the issue is (also try pico sdk, instead of openxr)
     
  5. Fujii-Hibiki

    Fujii-Hibiki

    Joined:
    Jul 2, 2015
    Posts:
    4
    I am using Unity 2022.3.16 LTS.
    I don't think it is a PICO SDK issue as it also happens in MetaQuest2.
     
  6. DevDunk

    DevDunk

    Joined:
    Feb 13, 2020
    Posts:
    5,041
    Then try a blank or demo project
     
  7. Fujii-Hibiki

    Fujii-Hibiki

    Joined:
    Jul 2, 2015
    Posts:
    4
    I tried using Unity VR template and had the same problem.
    The same thing happens with blank scenes.
     
  8. weiping-toh

    weiping-toh

    Joined:
    Sep 8, 2015
    Posts:
    192
    I used a blank project and reciprocated the issue.
    It only occurs on certain GPU/OEMs

    I used a custom plugin to force my app to switch to GLES3 when such GPUs are detected.
    It is an issue of compatibility of the vulkan DebugTools library.
     
    Fujii-Hibiki likes this.
  9. FuatW

    FuatW

    Joined:
    Apr 9, 2013
    Posts:
    23
    I have the same problem, it seems to be caused by the XR Toolkit OpenXR backend, because vulkan works fine when using the XR Toolkit Oculus Backend.

    I fixed this by using OpenGL instead of Vulkan for development builds and also am using this modified plugin instead of the original: https://github.com/needle-mirror/com.unity.xr.meta-openxr (but I don't know if that is related to the issue)
     
    Fujii-Hibiki likes this.
  10. weiping-toh

    weiping-toh

    Joined:
    Sep 8, 2015
    Posts:
    192
  11. EdBlais

    EdBlais

    Unity Technologies

    Joined:
    Nov 18, 2013
    Posts:
    311
    @Fujii-Hibiki Could you file a bug report using the empty/template project that you were able to reproduce the issue with? And then post the bug report here so that we can filter it to our QA and Graphics folks? Thank you.
     
  12. camogram

    camogram

    Joined:
    Jul 11, 2018
    Posts:
    29
    I've run into this crash as well on Quest Pro (2022.3.21f1). I've reported an issue using the MR template and included logcats in the issue. IN-72100
     
  13. camogram

    camogram

    Joined:
    Jul 11, 2018
    Posts:
    29
  14. weiping-toh

    weiping-toh

    Joined:
    Sep 8, 2015
    Posts:
    192
    I assume that Unity is not going to fix this. And the fault would passed around like the following.

    Unity: "Most Vulkan devices work with our code, The 3rd party driver should be responsible for the Vulkan Library implementation."
    3rd Party Driver: "Technically, we did implement accordingly the official Vulkan specifications. So not a bug."

    And hence, this issue will be stuck here forever.
     
  15. camogram

    camogram

    Joined:
    Jul 11, 2018
    Posts:
    29
    Where was this? In the issue link they stated: