Impact

» Edit Game Info

5 years ago by Graphikos

I've had this issue plague me for what seems like months. I finally took the time to try and zero in on the issue. The problem is that sometimes the loader never finishes and the game stalls. No errors are thrown it just stops.

When I remove the load and usage of the ig.Sound used to play music it solves the issue and the loader never stalls. Other, smaller sound effect files seem to load fine despite being the same ig.Sound object.

Anyone else experience loader stalls?

This might just be a Chrome issue because other browser seem to be just fine. Really, really annoying though.

5 years ago by Joncom

I wonder if you wait long enough, if you'd get back some sort of timeout error on the loading of a particular file?

5 years ago by Graphikos

Not sure... longer than I'd ever want to wait, that's for sure. It's clearly the music that it gets hung up on looking at the dev tools.

5 years ago by fulvio

Yeah, this is absolutely horrible. I get this on my game in Chrome as well. Very very annoying.

5 years ago by lazer

I get this also, compressing the audio file made it more rare but it still shows up. It is extremely frustrating.

5 years ago by Graphikos

I came up with a pretty simple solution just by changing the order of sound formats tested and used by Impact.

ig.Sound.use = [ig.Sound.FORMAT.MP3, ig.Sound.FORMAT.OGG];

This will test and use MP3 before using .ogg which is what Chrome is choking on and seems to be fine with the MP3 version.

5 years ago by fulvio

Thanks for the recommendation Graphikos, will give this a go tonight. Fingers crossed it works.

I use node-webkit to package up my game and the music/sound works absolutely fine. I thought Chromium is based off the Google Chrome engine any way or am I wrong?

5 years ago by fulvio

Still not working for me!

I do have sound files over 5mb (ogg) and under 3mb (mp3) though.

This. Works. Fine. In. Firefox.

/nothappy

5 years ago by fulvio

This, however works fine in Chrome!

Not using .ogg files.

ig.music.add('media/music/title.mp3', 'title');
ig.music.add('media/music/cutscene.mp3', 'cutscene');
ig.music.add('media/music/lava.mp3', 'lava');
ig.music.add('media/music/laboratory.mp3', 'laboratory');

EDIT: Still stalls on large MP3 files though.

Uncaught Error: InvalidStateError: DOM Exception 11 sound.js:184
ig.Music.ig.Class.extend.stop sound.js:184
ig.Music.ig.Class.extend.play sound.js:194
ig.Game.extend.init main.js:790
Class impact.js:478
ig.System.ig.Class.extend.setGameNow system.js:63
ig.System.ig.Class.extend.setGame system.js:57
ig.Loader.ig.Class.extend.end

5 years ago by Graphikos

Seems to work reliably for me. Using a 4.1mb .ogg and a 6.17mb mp3. Chrome 25.0.1364.152 m.

EDIT: We'll it's not 100% reliable but its noticeably better. I had it stall out with mp3s this morning also.

5 years ago by DaveVoyles

I'm having the same error too. If I give the loader the option of using either format, it chokes on .ogg. Both files are ~700kb (mp3 or ogg).

I switched which format it looks for first (as illustrated above), and just comment out the sound file using .ogg and it works fine, as it only looks for and plays the mp3.

If I comment out the .mp3, and let it look for the .ogg, it finds it, and plays fine, but still throws that Dom 11 error. Odd, huh?

4 years ago by kvisle

This seems to be a problem for my users as well, but reloading seems to solve the problem.

Looking for an effective solution to the problem.

4 years ago by kvisle

Line 190 in lib/impact/sound.js can be wrapped in a try { } catch(err) {} - that seems to do the trick for me.

4 years ago by dominic

I have seen this happen from time to time, but I have yet to find a test case that reproduces this behavior somewhat reliably - i.e. at least 1 out of 10 times. It's very hard to fix without a test case :/

Maybe this problem has something to do with the web server and/or internet connection?

In any case, I'll spend some time with this. Thanks for the hint @kvisle; maybe that's all what's needed for a fix already!?

4 years ago by Graphikos

Here's hoping for a permanent solution. This issue is still alive and well.

4 years ago by ansimuz

Have find any solution on this?

I am trying to wrap my game but wont work with mp3 or ogg files.
Page 1 of 1
« first « previous next › last »

Post Reply

Please login or register to reply.