UnityRenderStreaming
UnityRenderStreaming copied to clipboard
[BUG]: Crash when trying to connect to the app from the Receiver Sample
Package version
3.1.0-exp.7
Environment
* OS: Windows 10 Pro (19045.3570)
* Unity version: 2022.3.13f1
* Graphics API: DX12
* Browser: Chrome (119.0.6045.124)
Steps To Reproduce
- Run the build player
- Run webserver.exe
- Open localhost:80 from Chrome
- Go to Receiver Sample
- Try to connect to the app using AV1 codec
Current Behavior
Application crashes right after an attempt to the local connection. The stack trace found in the Player.log below:
========== OUTPUTTING STACK TRACE ==================
0x00007FFFFA033560 (webrtc) GetUpdateTextureFunc 0x00007FFFFA1DE308 (webrtc) GetUpdateTextureFunc 0x00007FFFF9FFAD7A (webrtc) GetUpdateTextureFunc 0x00007FFFFA37143F (webrtc) GetUpdateTextureFunc 0x00007FFFFA370662 (webrtc) GetUpdateTextureFunc 0x00007FFFFA36F978 (webrtc) GetUpdateTextureFunc 0x00007FFFFA368179 (webrtc) GetUpdateTextureFunc 0x00007FFFFA036779 (webrtc) GetUpdateTextureFunc 0x00007FFFFA0D167C (webrtc) GetUpdateTextureFunc 0x00007FF8C7EB7344 (KERNEL32) BaseThreadInitThunk 0x00007FF8C95C26B1 (ntdll) RtlUserThreadStart
========== END OF STACKTRACE ===========
Expected Behavior
View from the app visible in the browser window
Anything else?
Issue occures each time when trying to connect to a asset heavy scene. When disabling part of the scene and lowering the GPU workload it happens that the connection is established but it breaks with same result (crash/same stack) after max 30 sek.
@BartoszSpitzbarthTMRW Hi, we need to replicate the crash on our environment to fix it. Can you try the package sample project to replicate the issue?
It cannot be replicated on the sample project. In this case everything works fine. Also some simple scenes created as tests worked without problems. It happens only on the particular scene we are working on. I susspect it's performance related because, as I mentioned, it seems that the delay until the crash happens seeems to depend on how much the GPU is utilized. Would it be possible to get the private symbols for the webrtc.dll to log a more verbose stack trace?
@BartoszSpitzbarthTMRW WebRTC has an API to set a log level, but it isn't provided publicly. https://github.com/Unity-Technologies/com.unity.webrtc/blob/main/Runtime/Scripts/WebRTC.cs#L644C30-L645
@karasusan Thanks for the hint! I've overwritten the settings like that:
//NativeMethods.RegisterDebugLog(DebugLog, enableNativeLog, nativeLoggingSeverity);
NativeMethods.RegisterDebugLog(DebugLog, true, NativeLoggingSeverity.Verbose);
and run the test again. It was a scaled down version of the scene. When starting the web client first and then the app.exe the streaming works for about 5 seconds and then crashes as previously. If the order is different (first the app.exe and then run the web client) the crash occures immediatly. Attaching the Player.log Player.zip
@BartoszSpitzbarthTMRW Thanks for sharing. How about the result if you change the graphics API to DX11 or Vulkan?
Hi @karasusan , unfortunatelly we are using ray-tracing in our scene, which seems to be supported only on DX12 by Unity. So changing the API is not an option in this case.
Hi, just a friendly reminder. Are there any updates on this?
@BartoszSpitzbarthTMRW Sorry to late reply. I understood that you want to use a ray-tracing feature, we don't test with the Unity project using ray-tracing. We'll add the test case which runs the ray-tracing contents.