Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Audio crash on app exit while many sounds are playing #19507
Steps to Reproduce:
It happens often, but intermittently, and can be reproduced. Even if a null check is done for player, it will crash further on in the update() method since it also uses the value from _audioPlayers[audioID].
The reason ::stop() is called is because on exit, my code uncaches all audio files using this call:
I tried to trace why _audioPlayers[audioID] == null, but I couldn't find where it was being set except this section:
Any ideas as to why it would be null?
So, after looking into this a bit more, I can see that the audio player is being removed in this section of code:
Working fix (I don't think it addresses the real issue though. I still don't know why _audioPlayers[audioID] is null):
Add null checks to the
Add a null check in the