obsproject / obs-studio

OBS Studio - Free and open source software for live streaming and screen recording
https://obsproject.com
GNU General Public License v2.0
60.39k stars 7.99k forks source link

Entering infinite wait when WASAPISource is destroyed #11516

Open FanZR123 opened 5 days ago

FanZR123 commented 5 days ago

Operating System Info

Windows 11

Other OS

No response

OBS Studio Version

31.0.0-beta3

OBS Studio Version (Other)

No response

OBS Studio Log URL

none

OBS Studio Crash Log URL

No response

Expected Behavior

WASAPISource can be destroyed normally

Current Behavior

When switching scene collections, wsapisource will be destroyed.

Thread_41664 ->Deactivate(),close reconnectThread Thread_26716->~WASAPISource->Stop(), if reconnectThread is valid,wait idleSignal

Stop() is likely to be called before Deactivate(), so reconnectThread is valid and therefore enters the wait state. The idleSignal is only sent when the device pushes data to call OnSampleReady. If the device does not push data, the idleSignal will never be sent and stop() will always be in a waiting state.

1731484793 1731484837

Steps to Reproduce

1.add audio input source 2.Switch scene collection 3. ...

Anything else we should know?

No response