Open MateuszSalski opened 4 years ago
Now calling obs_frontend_set_current_scene always from a new thread. Can you test if that fixes it for you?
Sorry for late response. For sure OBS does not hangs now. Thanks. Unfortunately it looks that replay is not played, but maybe I configured something in a wrong way. I will check it and let you now.
I am using: OBS 25.0.06 on Ubuntu 18.4.
The issue happens only if a replay source has "Load Replay Switch Scene" set to parent scene of the replay source.
Scenario:
Sources configuration:
When sending:
{ "request-type":"SetSourceSettings", "message-id": "LoadReplay", "sourceName": "Replay source", "sourceSettings": { "execute_action": "Load" } }
OBS hangs.Analysis This is because before calling
replay_source_update
thedata->sources_mutex
is locked.replay_source_update
callsobs_frontend_set_current_scene
which invokes new thread forTransitionToScene
event and waits for it.TransitionToEvent
callsobs_context_data_insert
which also locks&obs->data.sources_mutex
, what makes a deadlock. See: call_stacks.txtFix proposition I will prepare my proposition how this can be fixed in https://github.com/MateuszSalski/obs-replay-source
It will be change in replay-source.c: