Page 2 of 3

Re: 11.1 app randomly crashes when looping an OGG file

Posted: Sun Dec 23, 2018 6:19 pm
by slime
Is there a small .love or something that will let me easily reproduce the issues?

Re: 11.1 app randomly crashes when looping an OGG file

Posted: Mon Dec 24, 2018 1:04 pm
by Jaston
I will try to make one. Issue was in my game which had so many files. All sounds that I had as streaming I changed to static. I havent had a crash since then. Will report back if that is the issue.

Note the sounds i had were short clips that i play thousands of times. My game had 3 music tracks that are playing constantly during the game.

Re: 11.1 app randomly crashes when looping an OGG file

Posted: Mon Dec 24, 2018 1:19 pm
by slime
Jaston wrote: Mon Dec 24, 2018 1:04 pm I will try to make one. Issue was in my game which had so many files. All sounds that I had as streaming I changed to static. I havent had a crash since then. Will report back if that is the issue.
I'm also interested in anything that causes pops when it loops if it's loaded as a streaming source.

Re: 11.1 app randomly crashes when looping an OGG file

Posted: Sat Dec 29, 2018 1:29 pm
by ivan
Looks like this might be a GC-related issue because it's very random.
Right now I'm using the following code and it seems to crash less frequently:

Code: Select all

function playMusic(fn)
    local file = love.filesystem.newFile(fn)
    local src = love.audio.newSource(file, "stream")
    src:play()
    music = { file, src } -- stores the references
end

Re: 11.1 app randomly crashes when looping an OGG file

Posted: Sat Dec 29, 2018 4:54 pm
by slime
I haven't been able to reproduce any of these issues locally yet. Can someone upload a test .love, even if it only demonstrates one of the issues and it doesn't reliably do so? That'll help me figure out where the problem is, and whether the fact that I can't reproduce anything yet is because of the sound files I'm using, or something about my Lua code, or something to do with my external testing environment (e.g. macOS versus Windows), or if I'm just not testing enough, etc.

Re: 11.1 app randomly crashes when looping an OGG file

Posted: Sun Dec 30, 2018 10:28 am
by ivan
Can't reproduce the crash consistently, but it is definitely related to the streamed sources.
I'm running Windows 10, ogg files, between 2-3 MB in size, playing in a loop.
The crash usually happens 5-10 minutes after launching the app.
BTW, this issue was introduced in 11.1 and remains in 11.2. Not present in earlier versions of Love2D.

Re: 11.1 app randomly crashes when looping an OGG file

Posted: Sun Dec 30, 2018 5:28 pm
by slime
ivan wrote: Sun Dec 30, 2018 10:28 am I'm running Windows 10, ogg files, between 2-3 MB in size, playing in a loop.
Can you upload a .love which does that with those specific files, so I can test?

If you don't want to share the audio files publicly you can send me a private message with it.

Re: 11.1 app randomly crashes when looping an OGG file

Posted: Wed Jan 02, 2019 10:59 pm
by Jaston
Ok I figured out more. The more streaming sources you make and play at the same time the faster it crashes :).
You can take the example I made and make it play 30 of those looping sounds and it will crash in a min or less :).

Re: 11.1 app randomly crashes when looping an OGG file

Posted: Wed Jan 02, 2019 11:03 pm
by zorg
I sense some reading comprehension failure here gentlemen (and everyone else);

slime can't reproduce the issue with code only so he's asking for the audio files you guys use that have been proven by you to make löve crash.

Without one of those, this is gonna stick in limbo...

Re: 11.1 app randomly crashes when looping an OGG file

Posted: Thu Jan 03, 2019 2:12 am
by Jaston
I gave him code and files via PM. He will be able to reproduce and fix hopefully :)