Importing Certain .WAV files Crashes on Safari

Bugs will be moved here once resolved.

Post » Sun Dec 07, 2014 7:40 pm

Problem Description
Certain sound files (this seems to happen with very short sounds, like a footstep or a "getting hit" sound) will cause the game to fail to load on mobile. The game will load fine on PC, however.

Attach a Capx
https://dl.dropboxusercontent.com/u/987 ... orked.capx

Description of Capx
There is simply an Audio object, as well as the culprit sound file (this time it happened to be a footstep from a game I'm working on) in the sounds folder. There are no events. When launched on PC it will run, but on mobile (at the very least when previewing over wifi) it will throw an error and either try to reload the page or crash.
This bug only happens if both the Audio object and a sound file exist, even if no code tells that sound to run. Without the Audio object, the crash does not happen.
If the sound file itself were bad, one would think it would have problems importing, or if not that, then both PC and Safari would crash?

Steps to Reproduce Bug
  • Create new default project.
  • Create Audio object
  • Download this example broken sound file: https://dl.dropboxusercontent.com/u/98721999/step1.wav (or just make a really short sound, maybe it'll happen?)
  • Import the sound file into Construct 2 normally
  • Launch Game on both PC and Mobile

Observed Result
PC works fine, but it crashes on mobile

Expected Result
The layout should run.

Affected Browsers
  • Safari (I only have an iPhone so I couldn't test any other mobile platform)

Operating System and Service Pack
Windows 7

Construct 2 Version ID
Version 90 (64-bit)
B
19
S
5
G
1
Posts: 96
Reputation: 2,710

Post » Mon Dec 08, 2014 2:22 pm

Hi, I think short sounds can cause errors like this. I had an issue way back where trying to import some audio files into C2 would cause the editor to hang, and it turned out to be the length of the files. I padded them out (added silence) so they were at least 00;00:001 in length and that solved the problem.

So maybe you could try padding the files, and see if it fixes your problem.

You can use Audacity to do that. It's free and awesome tool.
If it can be done, someone on the web will show you how to do it!

CDASI Games Mentality Break Splat-a-bug FlapFleet Challenge
B
35
S
13
G
7
Posts: 363
Reputation: 7,283

Post » Mon Dec 08, 2014 5:57 pm

I do think it is short sounds, but I tried lengthening the sound and it would still crash, but again just on Safari.
B
19
S
5
G
1
Posts: 96
Reputation: 2,710

Post » Tue Dec 09, 2014 7:01 pm

MadameBerry wrote:on mobile (at the very least when previewing over wifi) it will throw an error and either try to reload the page or crash.

What is the exact text of the error message? What precisely is happening here? These are vital details, please remember to include all this detail in bug reports.
Scirra Founder
B
399
S
236
G
89
Posts: 24,546
Reputation: 195,436

Post » Wed Dec 10, 2014 1:53 am

Ashley wrote:
MadameBerry wrote:on mobile (at the very least when previewing over wifi) it will throw an error and either try to reload the page or crash.

What is the exact text of the error message? What precisely is happening here? These are vital details, please remember to include all this detail in bug reports.

It tries to reload a few times, then just says "there was a repeated error loading the page at (url)."
Either that or it crashes without actually giving error text.
Really, that's it.
B
19
S
5
G
1
Posts: 96
Reputation: 2,710

Post » Wed Dec 10, 2014 12:56 pm

What version of iOS are you testing on?
Scirra Founder
B
399
S
236
G
89
Posts: 24,546
Reputation: 195,436

Post » Wed Dec 10, 2014 4:37 pm

I can reproduce on iOS 8, but it looks like a browser crash, not a problem with the C2 engine. Also Windows Media Player says the resulting .m4a file is invalid as well, which probably means the encoder failed to produce a valid .m4a file. Unfortunately we don't control the .m4a encoder and due to the patent restrictions on the format it's not easy to switch to another one. So I'm afraid we have to close this as won't fix. You may be able to work around it by using a separate tool to encode the .m4a from the .wav file, then directly import the .m4a in to C2 so it doesn't convert it itself.
Scirra Founder
B
399
S
236
G
89
Posts: 24,546
Reputation: 195,436

Post » Thu Dec 11, 2014 6:32 pm

FWIW filed a bug with Apple here: https://bugs.webkit.org/show_bug.cgi?id=139545
Scirra Founder
B
399
S
236
G
89
Posts: 24,546
Reputation: 195,436


Return to Closed bugs

Who is online

Users browsing this forum: No registered users and 2 guests