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

Catch std::system_error when creating and detaching melee sound thread #39112

Merged
merged 1 commit into from
Mar 29, 2020

Conversation

Qrox
Copy link
Contributor

@Qrox Qrox commented Mar 29, 2020

Summary

SUMMARY: Bugfixes "(Hopefully) fix a crash when playing melee sound"

Purpose of change

May fix #38875. Catch std::system_error so when thread creation fails, it only skips playing the sound instead of crashing.

Describe the solution

Catch std::system_error when creating and detaching thread and log an error when std::system_error is thrown.

Testing

Spawned a debug monster and attacked it for a while, and sound was played properly. Not sure if it actually fixes the crash, but the change itself looks legitimate.

@kevingranade kevingranade merged commit a0ba3c8 into CleverRaven:master Mar 29, 2020
@Qrox Qrox deleted the catch-thread-error branch March 30, 2020 11:01
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

Successfully merging this pull request may close these issues.

St12system_error crashes
2 participants