Sound files clogging up, causing crash?

I discovered with a past project that everything could run smoothly (mostly thinking about mobile here) until I added one too many sound files. I’m not talking huge mp3s, but once a few were added to the scene, it began crashing on mobile even before it could run-- straight out of the loading screen.

For my latest project, (PlayCanvas 3D HTML5 Game Engine) sound ambience and audible extras are a pretty big part of the experience. So two questions:

Am I wrong that sound files take an especially big toll on mobile? And if so, is there a workaround?

1 Like

What devices are you testing on (model number er/name) that are crashing?

1 Like

I’ve tested on a few different apple devices, mostly an iPhone 7 (which is a little old, but I want to reach as many people as possible). I’m hearing from a variety (though still a minority) of users that it is crashing on a variety of devices.

Is there a history of audio causing issues? Or am I mis-diagnosing?

1 Like

Hi @gnormanlippert!

There is a Mac/iOS Safari Positional Sound problem reported.

I have an iPhone 12 Pro myself. As far I have tested, no crash. I also have an iPhone 7 and a iPhone X. I will test it on that devices on a later moment.


No crash on iPhone X, though the cracking from positional sounds is still there.

1 Like

@gnormanlippert just in case to rule out a memory crash, can you try on iPhone 7 with no other browser tabs open, all other applications closed.

Crashes like that usually indicate iOS decided to kill the tab due to high memory allocation.

1 Like

Isn’t that the crackling of the burning fire in the background? :see_no_evil:

1 Like

Ahah, hope so :smiley: We had similar issues (sound glitches) on iOS for so long.

I am going to update to 15.2 to see if indeed the shipped fix, fixes it on this device. But I feel this is a different issue than the crashing here.


The VRAM usage is till pretty high (this is on PC)


So maybe the audio decoding is pushing over the memory limits of the browser?


Well hmm! I will see what I can do about that…

I tested under those circumstances and no crashy-crashy. Laggy still, but here’s a strange thing: When I turned to landscape mode, everything suddenly ran smooth as silk, despite actually showing a lot more of the environment. The buttons became almost too small to use (and the text was unreadable, of course) but that’s a surprising result, isn’t it?

Indeed it is, I can’t imagine why putting it on landscape will increase performance like that. Unless the change in the camera frustum (viewport) hid part of the scene that was expensive rendering. But I don’t think that’s the case with your scene.

@yaustar any idea?

I think you need to profile the app in both cases and compare the captures to get some answers.

1 Like

I do wonder if it’s due to some resizing logic? I do want to take another look at this :thinking:

1 Like