Game crashing when new audio plays.

Discussion and feedback on Construct 2

Post » Sun Dec 29, 2013 6:26 pm

Yesterday I updated to the newest version of Construct 2 and ever since then have been having this problem.

Basically I have the game set up to change songs when a specific NPC is on the screen. It seems the game crashes now when it has to load the song. Depending on the browser some sound effects don't play or sometimes no music at all as well.

Here is a link to the .capx

It happens if you just walk left after running the file. Mostly in Firefox.

The error that pops up says:
"Javascript error! TypeError: this.gainNode is null http://localhost:50000/Audio_plugin.js, line 1432 (col undefined) This is either a bug in Construct 2 or a problem in a third party plugin or behavior - please report it to the developer!"
B
5
Posts: 29
Reputation: 758

Post » Sun Dec 29, 2013 7:19 pm

I had no problems ran. the game almost a dozen times. Just walked left. watched the debug to see if the music started playing. and no problems with crashing.


However when you want to play earthbound franky. REMOVE THE EVERY TICK condition.

Also as a suggestions.

Make one Ground sprite and use frames instead of a different sprite for every ground block.

Use PLAY not Positional Play for music. Unless of course you want your music to have area effect. However most of time that's not really the case. As an example. walking into a Night Club with a band or music speakers; then you would use positional audio to represent the band having a position and distance.

Didn't you file this first as a BUG report?

jayderyu2013-12-29 19:23:01
B
92
S
18
G
9
Posts: 2,455
Reputation: 15,113

Post » Sun Dec 29, 2013 8:04 pm

Yeah I initially posted there because the error said I should report it. Sorry if I shouldn't have. It was only afterwards did I think that I should double check first.

Thanks for the help though, especially with the ground tiles that should probably keep things from slowing down later on.

For the music I was trying to get the Positional Play working initially but I couldn't figure it out so I just tried Play when on Screen. Positional audio would make it so the music would fade depending on how close you were right? That was what I was trying for.

I guess I'll just continue working with the audio disabled for now though.
B
5
Posts: 29
Reputation: 758

Post » Sun Dec 29, 2013 10:54 pm

as mentioned "remove the EveryTick for you condition" when playing the sound. That's the reason the music stops and can certainly lead to your system crashing.

so I answered your question to the problem at hand. So why do you need to disable the audio?
B
92
S
18
G
9
Posts: 2,455
Reputation: 15,113

Post » Mon Dec 30, 2013 1:08 pm

If you think it's a bug please report it to the Bugs forum following all the guidelines.
Scirra Founder
B
402
S
238
G
89
Posts: 24,637
Reputation: 196,071


Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 2 guests