[r60] Audio Crash

Bugs will be moved here once resolved.

Post » Sat Oct 08, 2011 8:22 am

My TD(Tower Defense) game always crash after running it in 5 mins,
so I made 2 simple audio-events groups which simulate a crowd of TD monsters dying in one explosion or so.
One kind is ok, the other is crashy in 15 sec.

I tested it for long time and can't find what happened,
maybe you can figure out something.

http://dl.dropbox.com/u/31590694/ScirraBugReport/AudioCrash.capx
B
106
S
27
G
8
Posts: 209
Reputation: 12,525

Post » Sat Oct 08, 2011 8:30 am

And if you toggle disable the sound-play action,
the crashy example will be ok.
B
106
S
27
G
8
Posts: 209
Reputation: 12,525

Post » Sat Oct 08, 2011 9:43 am

Here are 2 relative cases of Audio crash.

This capx is ok:
http://dl.dropbox.com/u/31590694/ScirraBugReport/EmptyEventCrash_Compare.capx

This capx is crashy:
http://dl.dropbox.com/u/31590694/ScirraBugReport/EmptyEventCrash.capx

The difference between them is: the crashy one used a line of empty event.

If you want to put actions after a counting loop, you'd need an empty event,
but the crashy capx shows us that empty events may cause crash.

Maybe I should post them as a new bug report,
but still, if you toggle disable the sound-play action,
they work fine.Therefore, I think it's an audio crash problem, too.
B
106
S
27
G
8
Posts: 209
Reputation: 12,525

Post » Sat Oct 08, 2011 10:05 am

Hello, gondzdevour!

As far as I can see the problem is the "for every SoundLauncher play FootmanDeath", because you are heaving about 100 blue dots on the screen .. and the loop has to loop over 100 times every 0.2 secounds .. that's insane :>

If you set the "Play FootmanDeath" into your System every 0.2 sec at the bottom, the count rises up to over 300 without any problems

LINK

Hopefully this helps

Best regards
B
17
S
4
G
4
Posts: 94
Reputation: 3,058

Post » Sat Oct 08, 2011 3:36 pm

Thanks, but I don't think the 100+ loop is the problem.

Let's see a more extreme example.
I made the left button (Light green) loop all blue dots to play sound every 0.1 second.

(Maybe it's easier to test just on web.)
http://dl.dropbox.com/u/31590694/ScirraBugReport/index.html

We can see, the light green button loops sound more than 2000+ times every 0.1 seconds,
obviously insane but it runs ok.

And see the dark green case. It can loop only 30 times per 0.2sec, then crash.
(In dark green case, I remove all blue dots before next running.)

So it seems not the insane sound-play times cause crash.
B
106
S
27
G
8
Posts: 209
Reputation: 12,525

Post » Sun Oct 09, 2011 8:01 pm

What do you mean by 'crash'? You need to be specific. And which browser are you using? It appears Chrome sometimes freezes in one of your examples, but that is a problem with Chrome, not Construct 2. I would suggest you do not play too many sounds at once. Browsers currently do not have great audio support so you should not push them too hard or they might crash. There's nothing we can do about the browsers themselves.
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,600

Post » Mon Oct 10, 2011 3:39 am



So, I think there's something happened between objects-creating and sound-playing.

--
My TD game is another story,
I tested it today, it looks like really a browser problem.
B
106
S
27
G
8
Posts: 209
Reputation: 12,525

Post » Mon Oct 10, 2011 10:59 am

Why do you have "For each SoundLauncher: play FootmanDeath"? If you have 10 of this object, the browser will try to play 10 sounds at the same time. That's going to sound nasty and as I said before, is unnecessarily pushing the browser's audio playback. If you play a reasonable number of sounds the browser should cope just fine. As it is, it looks like the problem is in the events you are using.
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,600

Post » Mon Oct 10, 2011 5:16 pm

I am interested in it --

1. These two groups also have event:
"For each SoundLauncher: play FootmanDeath".

2. These event are all executed after "create sprite", the different is the timming of "create sprite".

3.a 1st group only pick created sprite.
3.b 2nd group pick all existed sprite.

It seems 2nd "create sprite" does not change the SOL, so that pick all sprites in "For each".

That's why the 1st group will not crash -- it only play 1 sound each time.


Maybe a tutorial to introduce the rule of setting SOL is necessary. It is implicit to me, too.rexrainbow2011-10-10 17:18:47
B
97
S
22
G
178
Posts: 4,121
Reputation: 104,049


Return to Closed bugs

Who is online

Users browsing this forum: No registered users and 0 guests