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.
Post Reply
User avatar
molul
Party member
Posts: 247
Joined: Sun Feb 05, 2012 6:51 pm
Location: Valencia, Spain

11.1 app randomly crashes when looping an OGG file

Post by molul » Wed Jun 13, 2018 6:06 am

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: 2325
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 » Thu Jun 14, 2018 6:01 am

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: 247
Joined: Sun Feb 05, 2012 6:51 pm
Location: Valencia, Spain

Re: 11.1 app randomly crashes when looping an OGG file

Post by molul » Sun Jun 17, 2018 9:10 am

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: 2325
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 » Sun Jun 17, 2018 10:51 am

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: 247
Joined: Sun Feb 05, 2012 6:51 pm
Location: Valencia, Spain

Re: 11.1 app randomly crashes when looping an OGG file

Post by molul » Mon Jun 18, 2018 6:52 am

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: 2325
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 » Mon Jun 18, 2018 7:15 pm

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: 1309
Joined: Fri Mar 07, 2008 1:39 pm
Contact:

Re: 11.1 app randomly crashes when looping an OGG file

Post by ivan » Sun Aug 12, 2018 10:46 am

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 » Sun Aug 12, 2018 11:08 pm

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: 1309
Joined: Fri Mar 07, 2008 1:39 pm
Contact:

Re: 11.1 app randomly crashes when looping an OGG file

Post by ivan » Wed Aug 15, 2018 10:37 am

Furthermore this issue seems to be more apparent when using several streamed sources.
Would be good to add this to the Love2D issue tracker.

Post Reply

Who is online

Users browsing this forum: Google [Bot] and 12 guests