Fix AudioStreamPlaybackMicrophone shutdown crash#116299
Conversation
b687ddb to
97aa4f3
Compare
|
I'm not sure this is the right approach to fix this. If we fix this potential error here, but in other stream playbacks, we're leaving the same kind of bug open in other spots as well. |
|
I've modified the PR to be a more generalized fix, and added a more detailed breakdown of the root cause of the bug in the bug report ( #116298 ). |
Ivorforce
left a comment
There was a problem hiding this comment.
Thanks! Looks good to me, good sleuthing work!
Reading your explanation, i guess it may actually make sense to also check for AudioServer nullptr in AudioStreamPlayback destruction, just in case someone is incorrectly destructing those after the server is shutdown.
But the fix to clean up lists before clearing the singleton is a good change anyway, and I think we should merge it.
|
Could you squash your commits? |
7842b74 to
bf95b62
Compare
|
I was attempting to squash the commits but it looks like I screwed it up. |
|
Try using the following: 7842b74 was your commit before the squash. You should be able to re-attempt a squash afterwards. |
…emoved. This allows objects requiring the singleton for cleanup avoid a null pointer de-reference. fixes godotengine#116298
|
Okay. I managed to squash all the commits down, I think. Sorry about that. |
|
I'm not sure what's going on with that failed test. Might need a re-run? |
|
Thanks! |
|
Cherry-picked for 4.6.2. |
Fixed AudioStreamPlaybackMicrophone rarely attempting to use the AudioServer singleton when it is null, on shutdown.
fixes #116298