Unity-Technologies / com.unity.webrtc

WebRTC package for Unity
Other
738 stars 186 forks source link

fix: workaround: Set VULKAN_USE_CRS enabled to fix release build issue #998

Closed karasusan closed 8 months ago

karasusan commented 8 months ago

related PR #975.

We are currently in the QA phase of package development and have tested and confirmed the issue under the following conditions:

When testing video streaming with the PeerConnection sample, no video is received.

This issue is occurring since the https://github.com/Unity-Technologies/com.unity.webrtc/commit/665ad1ff2a9d6f113fda95d630249e29cae0970e. We have also confirmed that enabling VULKAN_USE_CRS resolves the issue.

There is a new problem when VULKAN_USE_CRS is enabled: performance may be degraded when using VSync. Therefore, we will document this issue. I will also add this issue to the Issue.

karasusan commented 8 months ago

CI testing for Android with vulkan API is failed.

10-18 16:34:12.312 E/CRASH   ( 7929): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
10-18 16:34:12.312 E/CRASH   ( 7929): Version '2021.3.31f1 (3409e2af086f)', Build type 'Development', Scripting Backend 'il2cpp', CPU 'arm64-v8a'
10-18 16:34:12.312 E/CRASH   ( 7929): Build fingerprint: 'NVIDIA/mdarcy/mdarcy:11/RQ1A.210105.003/7825230_3167.5736:user/release-keys'
10-18 16:34:12.312 E/CRASH   ( 7929): Revision: '0'
10-18 16:34:12.312 E/CRASH   ( 7929): ABI: 'arm64'
10-18 16:34:12.312 E/CRASH   ( 7929): Timestamp: 2023-10-18 16:34:12+0100
10-18 16:34:12.312 E/CRASH   ( 7929): pid: 7929, tid: 7991, name: UnityGfxDeviceW  >>> com.UnityTestRunner.UnityTestRunner <<<
10-18 16:34:12.312 E/CRASH   ( 7929): uid: 10113
10-18 16:34:12.312 E/CRASH   ( 7929): signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0
10-18 16:34:12.312 E/CRASH   ( 7929): Cause: null pointer dereference
10-18 16:34:12.312 E/CRASH   ( 7929):     x0  0000000000000001  x1  0000003306065598  x2  000000000000008c  x3  ffffffff9ad00bee
10-18 16:34:12.312 E/CRASH   ( 7929):     x4  0013260bb3000000  x5  00000000ffffffff  x6  0000002eed80c000  x7  000000000007935a
10-18 16:34:12.312 E/CRASH   ( 7929):     x8  0000000000000002  x9  0000002fd3fdee08  x10 0000000000000001  x11 0000000000000000
10-18 16:34:12.312 E/CRASH   ( 7929):     x12 0000000000000018  x13 00000000652ffaf4  x14 000f05346116e000  x15 00005d94e8bf66ad
10-18 16:34:12.312 E/CRASH   ( 7929):     x16 0000003304c247b0  x17 0000002ef01f1ce0  x18 0000003306a88000  x19 0000002ff3ff7e10
10-18 16:34:12.312 E/CRASH   ( 7929):     x20 0000002ff402f120  x21 0000000000000500  x22 000000332e757040  x23 00000000000002d0
10-18 16:34:12.312 E/CRASH   ( 7929):     x24 0000002ff402f0e8  x25 0000000000000000  x26 0000000000000000  x27 000000332e757040
10-18 16:34:12.312 E/CRASH   ( 7929):     x28 00000000ffffffff  x29 00000033060657b0
10-18 16:34:12.312 E/CRASH   ( 7929):     sp  0000003306065720  lr  0000003303fac18c  pc  0000003303fac250
10-18 16:34:12.312 E/CRASH   ( 7929): backtrace:
10-18 16:34:12.312 E/CRASH   ( 7929):       #00 pc 000000000012c250  /data/app/~~UHy39CIqx8tZi7Cbkq5G0Q==/com.UnityTestRunner.UnityTestRunner-kSlrYSih4dQ9QktDLqauUQ==/lib/arm64/libwebrtc.so (unity::webrtc::UnityVideoRenderer::ConvertVideoFrameToTextureAndWriteToBuffer(int, int, libyuv::FourCC)+436)
10-18 16:34:12.312 E/CRASH   ( 7929):       #01 pc 00000000001184d0  /data/app/~~UHy39CIqx8tZi7Cbkq5G0Q==/com.UnityTestRunner.UnityTestRunner-kSlrYSih4dQ9QktDLqauUQ==/lib/arm64/libwebrtc.so (TextureUpdateCallback(int, void*)+692)
10-18 16:34:12.312 E/CRASH   ( 7929):       #02 pc 00000000014de20c  /data/app/~~UHy39CIqx8tZi7Cbkq5G0Q==/com.UnityTestRunner.UnityTestRunner-kSlrYSih4dQ9QktDLqauUQ==/lib/arm64/libunity.so (GfxDeviceVK::InsertPluginTextureUpdateCallback(void (*)(int, void*), UnityRenderingExtTextureUpdateParamsInternal&)+268) (BuildId: 4ed415fafe3a732b4619d4e9ecf94c83149e4775)
10-18 16:34:12.312 E/CRASH   ( 7929):       #03 pc 00000000016377dc  /data/app/~~UHy39CIqx8tZi7Cbkq5G0Q==/com.UnityTestRunner.UnityTestRunner-kSlrYSih4dQ9QktDLqauUQ==/lib/arm64/libunity.so (GfxDeviceWorker::RunCommand(ThreadedStreamBuffer&)+23268) (BuildId: 4ed415fafe3a732b4619d4e9ecf94c83149e4775)
10-18 16:34:12.312 E/CRASH   ( 7929):       #04 pc 000000000163a048  /data/app/~~UHy39CIqx8tZi7Cbkq5G0Q==/com.UnityTestRunner.UnityTestRunner-kSlrYSih4dQ9QktDLqauUQ==/lib/arm64/libunity.so (GfxDeviceWorker::RunExt(ThreadedStreamBuffer&)+84) (BuildId: 4ed415fafe3a732b4619d4e9ecf94c83149e4775)
10-18 16:34:12.312 E/CRASH   ( 7929):       #05 pc 0000000001639fe8  /data/app/~~UHy39CIqx8tZi7Cbkq5G0Q==/com.UnityTestRunner.UnityTestRunner-kSlrYSih4dQ9QktDLqauUQ==/lib/arm64/libunity.so (GfxDeviceWorker::Run()+140) (BuildId: 4ed415fafe3a732b4619d4e9ecf94c83149e4775)
10-18 16:34:12.312 E/CRASH   ( 7929):       #06 pc 0000000001631ae0  /data/app/~~UHy39CIqx8tZi7Cbkq5G0Q==/com.UnityTestRunner.UnityTestRunner-kSlrYSih4dQ9QktDLqauUQ==/lib/arm64/libunity.so (GfxDeviceWorker::RunGfxDeviceWorker(void*)+4) (BuildId: 4ed415fafe3a732b4619d4e9ecf94c83149e4775)
10-18 16:34:12.312 E/CRASH   ( 7929):       #07 pc 0000000000b3c194  /data/app/~~UHy39CIqx8tZi7Cbkq5G0Q==/com.UnityTestRunner.UnityTestRunner-kSlrYSih4dQ9QktDLqauUQ==/lib/arm64/libunity.so (Thread::RunThreadWrapper(void*)+796) (BuildId: 4ed415fafe3a732b4619d4e9ecf94c83149e4775)
10-18 16:34:12.312 E/CRASH   ( 7929):       #08 pc 00000000000afd4c  /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+64) (BuildId: 45994aaacbd3639b43f2bde9e3052edc)
10-18 16:34:12.312 E/CRASH   ( 7929):       #09 pc 0000000000050288  /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+64) (BuildId: 45994aaacbd3639b43f2bde9e3052edc)
10-18 16:34:12.634 E/CRASH   ( 7929): Forwarding signal 11