voxeet / comms-sdk-unreal

Dolby.io Virtual Worlds plugin for Unreal Engine
http://api-references.dolby.io/comms-sdk-unreal/
MIT License
26 stars 7 forks source link

Screen Sharing Race Condition Crash (UE5.2) #393

Closed RFCOSOCIETY closed 1 year ago

RFCOSOCIETY commented 1 year ago

Describe the bug

Sometimes when screen sharing, utilizing the texture provided by the Dolby SDK as brush for an UImage, will result in a crash. We believe it is due to a race condition.

MicrosoftTeams-image

Expected Behavior

To not crash while screen sharing.

Minimalistic code (recommended)

image

Specifications

kubaau commented 1 year ago

@RFCOSOCIETY

This is probably an easy fix, but I am curious about this because it logically should not happen. Based on "line 219" in the call stack I assume this is with regards to receiving screen share (as opposed to sharing your screen). I would appreciate some logs, preferably from both the Output Log and the ones obtained by using the Set Log Settings function. It looks like a remote_video_track_removed event is received before or at the same time as a remote_video_track_added event or it is received twice. I have never seen this so I didn't think any special attention was necessary with regards to this TMap. What is the reproduction rate for this? I may have trouble making 100% sure this is fixed if I cannot reproduce it.

@djova-dolby FYI for now

AntonIovbakDev commented 1 year ago

cppsdk-2023-09-12-08-30-11.log

AntonIovbakDev commented 1 year ago

Hi guys! Additional information. While trying to reproduce crash we made these steps:

  1. One user shared his screen
  2. Other users saw translation
  3. During the translation user closed an app with alt-F4
  4. A couple of the users, who saw the translation had a crash.

This time we have the similar call stack as in a first screenshot here, and the log I've sent.

Hope this could help somehow

kubaau commented 1 year ago

The protection against this kind of race should be improved in versions 1.1.7 and 1.2.0-beta.11.

AntonIovbakDev commented 1 year ago

We will use 1.2 beta then. Thnx for your answers