Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run auto config test several times, sometimes OBS will crash. #11693

Open
EightJay opened this issue Jan 2, 2025 · 3 comments
Open

Run auto config test several times, sometimes OBS will crash. #11693

EightJay opened this issue Jan 2, 2025 · 3 comments

Comments

@EightJay
Copy link

EightJay commented Jan 2, 2025

Operating System Info

Windows 10

Other OS

No response

OBS Studio Version

Other

OBS Studio Version (Other)

30.1.2

OBS Studio Log URL

https://obsproject.com/logs/sbdvXu44lSfULNBu

OBS Studio Crash Log URL

https://obsproject.com/logs/S5FEASeCcYNKTfLn

Expected Behavior

app will not crash.

Current Behavior

Run auto config test several times, sometimes app will crash.And the crash reasons are same, the reason is about audio_callback.
debug source code - exception unhandled

Steps to Reproduce

1.click tools
2.click Auto-Configuration Wizard
3.click Next until stream warning and click Yes
4.sometimes when the bandwitdh test, app will crash cause by audio_callback.

And I try to debug source code, I find out the root cause is ”read access violiaton“, mx was nullptr.
image
In my opinion, according to my debug analysis, other thread(ucrtbased.dll thread) destroy the obs->video.mixes_mutex, and in
audio_callback function, pthrea_mutex_unlock will get the mixes_mutex which is nullpter.And crash happened.

Anything else we should know?

No response

Tasks

Preview Give feedback
No tasks being tracked yet.
@EightJay
Copy link
Author

EightJay commented Jan 2, 2025

Maybe we have to ensure that mixes_mutex should be unlocked first and then we can destory the mixes_mutex.
AutoConfigTest will call obs_free_video function and finally destroy obs->video.mixes_mutex. But at that time, audio thread maybe hold the obs->video.mixes_mutex? I do not know how to fix this.
image

@EightJay
Copy link
Author

EightJay commented Jan 3, 2025

it is a regression, commit id is [b05a401]. In my opinion, this change may not consider that auto config test will call obs_free_video, and destroy mixes_mutex, but at that time, audio thread need use this mutex which is destroyed by other thread.So exception happened.
And i try to use OBS-Studio-30.0-rc1-Full-Installer-x64.exe (b05a401 commit is not included) to test, obs can not reproduce this issue.

@EightJay EightJay changed the title Run auto config test several times, sometimes app will crash. Run auto config test several times, sometimes OBSwill crash. Jan 3, 2025
@EightJay EightJay changed the title Run auto config test several times, sometimes OBSwill crash. Run auto config test several times, sometimes OBS will crash. Jan 3, 2025
@RytoEX
Copy link
Member

RytoEX commented Jan 6, 2025

@exeldro @Lain-B regarding the linked commit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants