Search Unity

  1. We are migrating the Unity Forums to Unity Discussions. On July 12, the Unity Forums will become read-only. On July 15, Unity Discussions will become read-only until July 18, when the new design and the migrated forum contents will go live. Read our full announcement for more information and let us know if you have any questions.

Bug (Case 1346761) Error SwappyVk: Failed to wait for fence 2

Discussion in 'Graphics for ECS' started by optimise, Jun 29, 2021.

  1. optimise

    optimise

    Joined:
    Jan 22, 2014
    Posts:
    2,137
    When running android build at Mi Note 2 phone, I get super slow fps like 10+ only and the android logcat keep spamming Error SwappyVk: Failed to wait for fence 2.
     
    yhso likes this.
  2. optimise

    optimise

    Joined:
    Jan 22, 2014
    Posts:
    2,137
    @JussiKnuuttila Any new update for this issue? Zero update since 29 Jun. Can u help me get Vulkan team look at this issue as it most likely caused by Vulkan related bug. I also updated multiple phone testing results at this case.
     
  3. joelv

    joelv

    Unity Technologies

    Joined:
    Mar 20, 2015
    Posts:
    203
    Have you reported this as a bug using the bug reporter? If not, please do so so that we are able to track it and try to reproduce it.
     
  4. optimise

    optimise

    Joined:
    Jan 22, 2014
    Posts:
    2,137
    @joelv Ya. Case 1346761. I ady put case number at thread title long time ago. Btw I also get a reply from other thread mentions that it's very likely related to this issue. If it's the same issue and can't backport to 2020 LTS, will Entities package compatibility moves to 2021.2.x as soon as possible along with Hybrid Renderer package? With this issue I will not able to ship my title.

     
  5. joelv

    joelv

    Unity Technologies

    Joined:
    Mar 20, 2015
    Posts:
    203
    Sorry, brain is a bit slow today =)
    I see that the bug is being investigated by initial QA now.
     
    optimise likes this.
  6. optimise

    optimise

    Joined:
    Jan 22, 2014
    Posts:
    2,137
  7. optimise

    optimise

    Joined:
    Jan 22, 2014
    Posts:
    2,137
  8. joelv

    joelv

    Unity Technologies

    Joined:
    Mar 20, 2015
    Posts:
    203
    We do not yet know since the bug itself has not been fixed yet. I can't give a better estimate than that sadly.
     
    optimise likes this.
  9. optimise

    optimise

    Joined:
    Jan 22, 2014
    Posts:
    2,137
    @joelv Actually is that Hybrid Renderer specific bug or Vulkan bug?
     
  10. optimise

    optimise

    Joined:
    Jan 22, 2014
    Posts:
    2,137
    Hi @joelv. Seems like next version of Hybrid Renderer will move to Unity 2021.2. Can u check whether the bug is still reproducible?
     
  11. joelv

    joelv

    Unity Technologies

    Joined:
    Mar 20, 2015
    Posts:
    203
    @optimise Can you check if you have "Optimized Frame Pacing" checked in the android build settings. If so, can you try to disable it and test if you get any different behaviour?
     
  12. optimise

    optimise

    Joined:
    Jan 22, 2014
    Posts:
    2,137
    @joelv Alright now no more error spamming but the frame rate still very low like before. I guess now it's hybrid renderer performance issue since the same scene perform so much better at regular game object scene.
     
  13. joelv

    joelv

    Unity Technologies

    Joined:
    Mar 20, 2015
    Posts:
    203
    Right. Yeah it's still experimental and with the pandemic and everything it's a bit harder for us devs to test and profile on all hardware types. We will expand the set of devices we test on going forward and will try to iron out any performance problems.
     
    optimise likes this.
  14. DavidZobrist

    DavidZobrist

    Joined:
    Sep 3, 2017
    Posts:
    239
    Also getting this with a game crash, at a very specific position in the level, looking at something that may cause it.

    Code (CSharp):
    1. 2022.05.24 17:19:46.133 25269 25493 Error SwappyVk Failed to wait for fence 2
    Info:
    Device: Redmi Note 9 Pro
    Unity Version: 2021.3.3f1 LTS
    Note: My framrate is very good! Remaining at max 59-60 fps as it is capped there. I realized this performance jump some unity sub versions ago. Good job on that!

    Test:

    As @joelv the test with
    "Optimized Frame Pacing" off.

    Resulted in a more detailed error message:
    Code (CSharp):
    1. 2022.05.24 17:38:38.411 32173 32385 Info Choreographer Skipped 67 frames!  The application may be doing too much work on its main thread.
    2.  
    Followed by:
    Code (CSharp):
    1. 2022.05.24 17:38:38.526 32173 32295 Error CRASH pid: 32173, tid: 32295, name: Job.Worker 1  >>> com.pseudo.bundle<<<
    2.  
    3.  
    4. 2022.05.24 17:38:38.526 32173 32294 Error CRASH Cause: null pointer dereference
    5.  
    6. 2022.05.24 17:38:38.526 32173 32294 Error CRASH signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x30
    7.  
    8.  
    9. 2022.05.24 17:38:38.526 32173 32294 Error CRASH Cause: null pointer dereference
    10.  
    NOTE: It might not be related and was just hidden by "Optimized Frame Pacing".
     
    Last edited: May 24, 2022
  15. Robotec555

    Robotec555

    Joined:
    Feb 11, 2022
    Posts:
    5
    Facing Same problem, Any updates regarding it? @joelv .
    only appears with Android Builds as slow lagging frames before screen blackens and stop or crash. I started to get this issue only after I upgraded from 2020.3.9 to 2020.3.11f in order to use VFX graph in my game. What am I doing wrong? Any suggestions? Any workarounds?
    using:
    Unity 2021.3.11f

    Code (CSharp):
    1. 2022/11/05 20:24:38.535 6352 6586 Error SwappyVk Failed to vkQueueSubmit 5
    2. 2022/11/05 20:24:38.535 6352 7136 Error SwappyVk Failed to wait for fence 2
    3. 2022/11/05 20:24:38.594 6352 6513 Error CRASH *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
    4. 2022/11/05 20:24:38.594 6352 6513 Error CRASH Version '2021.3.11f1 (0a5ca18544bf)', Build type 'Development', Scripting Backend 'mono', CPU 'armeabi-v7a'
    5. 2022/11/05 20:24:38.594 6352 6513 Error CRASH Build fingerprint: 'samsung/starqltesq/starqltesq:10/QP1A.190711.020/G960USQS7DTE1:user/release-keys'
    6. 2022/11/05 20:24:38.594 6352 6513 Error CRASH Revision: '14'
    7. 2022/11/05 20:24:38.594 6352 6513 Error CRASH ABI: 'arm'
    8. 2022/11/05 20:24:38.594 6352 6513 Error CRASH Timestamp: 2022-11-05 20:24:38+0300
    9. 2022/11/05 20:24:38.594 6352 6513 Error CRASH pid: 6352, tid: 6513, name: UnityMain  >>> com.robotec.racetrack <<<
    10. 2022/11/05 20:24:38.594 6352 6513 Error CRASH uid: 10551
    11. 2022/11/05 20:24:38.594 6352 6513 Error CRASH signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x70
    12. 2022/11/05 20:24:38.594 6352 6513 Error CRASH Cause: null pointer dereference
    13. 2022/11/05 20:24:38.594 6352 6513 Error CRASH     r0  00000070  r1  00000008  r2  d748a300  r3  00000000
    14. 2022/11/05 20:24:38.594 6352 6513 Error CRASH     r4  00000008  r5  00000000  r6  00000070  r7  b93484e8
    15. 2022/11/05 20:24:38.594 6352 6513 Error CRASH     r8  00000000  r9  b93486c0  r10 b567ffe8  r11 00000000
    16. 2022/11/05 20:24:38.594 6352 6513 Error CRASH     ip  bb72fb38  sp  b93484d8  lr  bb396731  pc  eadf851c
    17.  
     
    Last edited: Nov 5, 2022
    DavidZobrist likes this.
  16. Robotec555

    Robotec555

    Joined:
    Feb 11, 2022
    Posts:
    5
    What did you do to solve this issue? Did you find any workaround?
     
    DavidZobrist likes this.
  17. DavidZobrist

    DavidZobrist

    Joined:
    Sep 3, 2017
    Posts:
    239
    I never did. I am working on another project now.
     
    DustinMatthew likes this.
  18. victornor

    victornor

    Joined:
    Jan 17, 2014
    Posts:
    91
    This is still a major issue for me. Any news on this error?
    Code (CSharp):
    1. 2024/02/26 23:49:48.552 20442 20575 Verbose SwappyVk SwappyVk initialized for VkDevice 0x71f2adcd60 using VK_GOOGLE_display_timing on Android
    2. 2024/02/26 23:49:48.552 20442 20575 Info SwappyVk Returning refresh duration of 16666666 nsec (approx 60.000002 Hz)
    3. 2024/02/26 23:49:48.553 20442 20574 Warn Adreno-GSL <gsl_ldd_control:549>: ioctl fd 82 code 0xc040094a (IOCTL_KGSL_GPU_COMMAND) failed: errno 35 Resource deadlock would occur
    4. 2024/02/26 23:49:48.553 20442 20574 Warn Adreno-GSL <log_gpu_snapshot:458>: panel.gpuSnapshotPath is not set.not generating user snapshot
    5. 2024/02/26 23:49:48.555 20442 20574 Error SwappyVk Failed to vkQueueSubmit 5
    6. 2024/02/26 23:49:48.555 20442 21408 Error SwappyVk Failed to wait for fence 2
    7. 2024/02/26 23:49:48.567 20442 20574 Warn Adreno-GSL <gsl_ldd_control:549>: ioctl fd 82 code 0xc040094a (IOCTL_KGSL_GPU_COMMAND) failed: errno 35 Resource deadlock would occur
    8. 2024/02/26 23:49:48.567 20442 20574 Warn Adreno-GSL <log_gpu_snapshot:458>: panel.gpuSnapshotPath is not set.not generating user snapshot
    9.  
     
    Belke likes this.