obsproject / obsproject/obs-studio
Entering infinite wait when WASAPISource is destroyed
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 76.4k
- Forks
- 10.2k
- Avg merge
- 4d 23h
- Merged PRs (30d)
- 12
Description
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.
Steps to Reproduce
1.add audio input source
2.Switch scene collection
3.
...
Anything else we should know?
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating WASAPISource and tracing Deactivate(), Stop(), reconnectThread, idleSignal, and OnSampleReady during scene-collection switching. Reproduce the audio-source destruction path on Windows 11 and verify that WASAPISource can be destroyed normally without waiting indefinitely when no device data arrives.
Written by the indexing model from the issue text.
Assessment
- Domain
- audio-video-rtc, operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100