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
molul
Party member
Posts: 264
Joined: Sun Feb 05, 2012 6:51 pm
Location: Valencia, Spain
Contact:

11.1 app randomly crashes when looping an OGG file

Post by molul »

It has taken me a long time to catch this bug. I was having random crashes, and this morning, that home was silent, I noticed two consecutive crashes happening right when the ogg file I use for background music finished.

Also, before that, I noticed that sometimes the looping randomly starts with an ugly click sound. Not sure how to prepare a project to attach here to check the problem as it's really random (sometimes it happens a few times in a row and sometimes it doesn't happen for days), but I think I could ask if it has happened to anyone else, or if there's anything I should check on an OGG file that might be causing this.
User avatar
zorg
Party member
Posts: 3465
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 »

Is it only ogg files that do that to you? Do check whether its bitrate is larger than 320 kbps (ogg can go up to 450 iirc; not sure if thats an issue though)
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.
User avatar
molul
Party member
Posts: 264
Joined: Sun Feb 05, 2012 6:51 pm
Location: Valencia, Spain
Contact:

Re: 11.1 app randomly crashes when looping an OGG file

Post by molul »

I think it also happened when I tried mp3 (I switched back to ogg, because the looping event had a much more annoying beep sound).

The bitrate is 192kbps.

I'll test today with mp3 to make sure. Thanks!

EDIT
I keep getting random crashes when music loops. I'm using a mono 16bit ogg file now (it was 32bit stereo before). Should I use a different file type/settings?
User avatar
zorg
Party member
Posts: 3465
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 »

You can try to see if that narrows it down to a decoder issue, or something else; you are looping it with just setting the loop properity on the source object, right? Or are you doing more advanced shenanigans? :3
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.
User avatar
molul
Party member
Posts: 264
Joined: Sun Feb 05, 2012 6:51 pm
Location: Valencia, Spain
Contact:

Re: 11.1 app randomly crashes when looping an OGG file

Post by molul »

Hehehe. No, I'm just setting the loop property :)

I had to test with another song (and another program to encode it), but I totally forgot, sorry. I'll try a few things before coming back.

[EDIT]
It happened on several settings and formats, but I think I found a workaround: setting the audio source to static instead of stream. The "click" sound glitch when looping the song is gone, and so far I've had no random crashes (not 100% they're gone, but the lack of "click" sound might be a proof).
User avatar
zorg
Party member
Posts: 3465
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 »

The lack of a click may only mean that the static version (which is guaranteed to always just store all samplepoints with a given sampling rate) can loop more seamlessly than ogg or mp3 files could, since at least the latter stores data not exactly in that way, so it might not be able to accomplish that.

Still, i do remember this being the solution for some people, so i'm glad it worked for you; still, sadly no idea why the streaming sources have issues like this.
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.
User avatar
ivan
Party member
Posts: 1915
Joined: Fri Mar 07, 2008 1:39 pm
Contact:

Re: 11.1 app randomly crashes when looping an OGG file

Post by ivan »

Same problem here. Just upgraded my game to 11.1 and now there are random glitches, squeaks and an occasional crash.
The game just shuts down, no error message or console log.
Any tips, other than using static sources?
User avatar
DekuJuice
Prole
Posts: 14
Joined: Mon Nov 24, 2014 9:31 pm

Re: 11.1 app randomly crashes when looping an OGG file

Post by DekuJuice »

I released a demo recently and one of the testers also had the game crash without an error message. I assumed the problem was something to do with his system since nobody else reported the same issue and I couldn't recreate it myself, but this might be the cause of it. Looking into the code for streaming ogg files is probably a good start to figure out what's happening.
User avatar
ivan
Party member
Posts: 1915
Joined: Fri Mar 07, 2008 1:39 pm
Contact:

Re: 11.1 app randomly crashes when looping an OGG file

Post by ivan »

Furthermore this issue seems to be more apparent when using several streamed sources.
Would be good to add this to the Love2D issue tracker.
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 »

Both issues happen to me as well. Crashes love2d and doesnt even leave an error. Using love2D 11.2.

My game loops a bunch of ogg and wav files. Static is needed or ilI hear pops.

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 :).
Last edited by Jaston on Wed Jan 02, 2019 10:58 pm, edited 1 time in total.
Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Bing [Bot] and 1 guest