@vlads Hi, I can confirm there is a bug with audio.play onComplete, it caused crashes on some android phones. Even if the function is empty, it will crash.
My previous versions had about a 10% crash rate(more than 800 crashes in less than a week).
My solution is to remove onComplete from all audio, now there are no crashes.
I have an android 11 Samsung phone, but never once encounter this crash, but on some player’s phone(same model) it crashes every few minutes.
The error on android is
signal 11 (SIGSEGV), code 2 (SEGV_ACCERR)
libcorona.so!libcorona.so (offset 0x37e000)
Rtt::ALmixerSoundCompletionEvent::~ALmixerSoundCompletionEvent()) (SourceCode: /Users/runner/work/corona/corona/librtt/Rtt_PlatformOpenALPlayer.cpp:76)
I can replicate this bug on windows, the simulator will force quit with this error
The stdin connection has closed.
the following simple code can replicate this error, and removing onComplete it will not crash.
The sound has to be short to reproduce this crash quickly, I use 0.2 second wave and let it run for a while(30 seconds to a few minutes)
mySound = audio.loadSound("mySound.wav")
soundTesting = function()
end
function checkSound ()
for j = 1, 30 do
audio.play(mySound , { onComplete=soundTesting })
end
end
Runtime:addEventListener( "enterFrame", checkSound )