Open Davidobot opened 4 years ago
Hello. I just encountered this issue. I was able to pinpoint the source of my game's crashes to this function call. You can look at a version of my project with this issue, in game.lua, line 595 in Game:on_menu
. https://github.com/Yolwoocle/bugscraper/tree/765f52a21382f89833d99e14e1694926d1c5b12d
Calling love.audio.stop() with multiple sources or with no parameters, meaning it applies to all sources, causes love.js to crash if one of the sources that it's being applied to is currently playing. Similarly using love.audio.pause in the same way doesn't cause a crash, but doesn't do anything at all. The issue comes from this emscripten bug I believe https://github.com/emscripten-core/emscripten/pull/16633 which has been patched since, but I don't think love.js is using a recent enough version of emscripten to have receiced the fix as the issue stills persists in the most recent version of love.js.
I noticed that according to https://github.com/Davidobot/love.js/issues/56 love.js might be stuck on emscripten 2.0.3 due to later versions missing the getMemory function. Perhaps if it can't be updated anytime soon, the pull request that fixed this issue could be included in the version of emscripten that love.js does currently use?
I'm experiencing this crash as well. If anyone else is losing their minds searching for a solution, a valid workaround is to call nameOfAudioFile:stop() for each audio file that could possibly be playing. Pretty janky but at least it eliminates the crash!
love.audio.stop()
seems to error when called without arguments.EDIT: running the function on its own doesn't do anything. Need to pin-point the issue further.