Fix CoreAudio driver crash when starting input with uninitialized device#112404
Merged
Repiteo merged 1 commit intogodotengine:masterfrom Nov 5, 2025
Merged
Fix CoreAudio driver crash when starting input with uninitialized device#112404Repiteo merged 1 commit intogodotengine:masterfrom
Repiteo merged 1 commit intogodotengine:masterfrom
Conversation
bruvzg
reviewed
Nov 5, 2025
bruvzg
approved these changes
Nov 5, 2025
Member
bruvzg
left a comment
There was a problem hiding this comment.
Please squash the commits, see The interactive rebase.
Member
|
Your commit seems not to be missing username and not linked to GitHub account. See Why are my commits linked to the wrong user?. |
Initialize input device if null before starting audio input to prevent crashes when input_unit is not yet initialized.
Contributor
|
Thanks! Congratulations on your first merged contribution! 🎉 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Initialize input device if null before starting audio input to prevent crashes when input_unit is not yet initialized.
In the game we are building, we noticed a frequent crash caused with following stack trace:
It's really strange since we already set the audio/driver/enable_input to false. After digging, we noticed some third-party sdk like Facebook, and firebase will try to start audio recording inside, which causes the crash.
And after read related source code across multiple platforms, I noticed iOS's audio driver doesn't check null in AudioDriverCoreAudio::input_start, by adding this fix, we can see it does the trick, no more crash.