Skip to content

[raudio] Fix crash on CloseAudioDevice: uninit device before mutex - #6039

Merged
raysan5 merged 1 commit into
raysan5:masterfrom
get-charlie:fix/audio-close-order
Aug 7, 2026
Merged

[raudio] Fix crash on CloseAudioDevice: uninit device before mutex#6039
raysan5 merged 1 commit into
raysan5:masterfrom
get-charlie:fix/audio-close-order

Conversation

@get-charlie

Copy link
Copy Markdown
Contributor

On Android (AAudio) the callback thread could still run when the mutex was destroyed, causing a SIGABRT (pthread_mutex_lock on a destroyed mutex). Uninit the device first so its callback thread stops before ma_mutex_uninit.

On Android (AAudio) the callback thread could still run when the mutex was
destroyed, causing a SIGABRT (pthread_mutex_lock on a destroyed mutex).
Uninit the device first so its callback thread stops before ma_mutex_uninit.
@get-charlie get-charlie changed the title Fix crash on CloseAudioDevice: uninit device before mutex [raudio] Fix crash on CloseAudioDevice: uninit device before mutex Aug 6, 2026
@raysan5

raysan5 commented Aug 7, 2026

Copy link
Copy Markdown
Owner

@mackron Please, could you take a look to this PR?

@mackron

mackron commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

This change is good. Recommend merging.

@raysan5
raysan5 merged commit 1893226 into raysan5:master Aug 7, 2026
@raysan5

raysan5 commented Aug 7, 2026

Copy link
Copy Markdown
Owner

@get-charlie thanks for the improvement and thanks @mackron for the quick review

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.

3 participants