11.1 app randomly crashes when looping an OGG file

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
User avatar
slime
Solid Snayke
Posts: 3131
Joined: Mon Aug 23, 2010 6:45 am
Location: Nova Scotia, Canada
Contact:

Re: 11.1 app randomly crashes when looping an OGG file

Post by slime »

Is there a small .love or something that will let me easily reproduce the issues?
Jaston
Prole
Posts: 18
Joined: Sun Nov 25, 2018 5:43 pm

Re: 11.1 app randomly crashes when looping an OGG file

Post 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.
User avatar
slime
Solid Snayke
Posts: 3131
Joined: Mon Aug 23, 2010 6:45 am
Location: Nova Scotia, Canada
Contact:

Re: 11.1 app randomly crashes when looping an OGG file

Post 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.
User avatar
ivan
Party member
Posts: 1911
Joined: Fri Mar 07, 2008 1:39 pm
Contact:

Re: 11.1 app randomly crashes when looping an OGG file

Post 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
User avatar
slime
Solid Snayke
Posts: 3131
Joined: Mon Aug 23, 2010 6:45 am
Location: Nova Scotia, Canada
Contact:

Re: 11.1 app randomly crashes when looping an OGG file

Post 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.
User avatar
ivan
Party member
Posts: 1911
Joined: Fri Mar 07, 2008 1:39 pm
Contact:

Re: 11.1 app randomly crashes when looping an OGG file

Post 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.
User avatar
slime
Solid Snayke
Posts: 3131
Joined: Mon Aug 23, 2010 6:45 am
Location: Nova Scotia, Canada
Contact:

Re: 11.1 app randomly crashes when looping an OGG file

Post 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.
Jaston
Prole
Posts: 18
Joined: Sun Nov 25, 2018 5:43 pm

Re: 11.1 app randomly crashes when looping an OGG file

Post 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 :).
User avatar
zorg
Party member
Posts: 3436
Joined: Thu Dec 13, 2012 2:55 pm
Location: Absurdistan, Hungary
Contact:

Re: 11.1 app randomly crashes when looping an OGG file

Post 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...
Me and my stuff :3True Neutral Aspirant. Why, yes, i do indeed enjoy sarcastically correcting others when they make the most blatant of spelling mistakes. No bullying or trolling the innocent tho.
Jaston
Prole
Posts: 18
Joined: Sun Nov 25, 2018 5:43 pm

Re: 11.1 app randomly crashes when looping an OGG file

Post by Jaston »

I gave him code and files via PM. He will be able to reproduce and fix hopefully :)
Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Google [Bot] and 50 guests