App Crashing with WKWebView and Audio Problems

Discussion and feedback on Construct 2

Post » Wed Mar 09, 2016 3:25 pm

I built my app on phonegap today to give WKWebView a try. The good news is it runs incredibly smoothly, menus open instantly, touch input is recognised immediately, dramatically improved frame rate etc. However there are some big problems.

My game crashed on multiple occasions; usually when the scene changed or I opened the menu which leads me to believe the crashes are due to intensive CPU use.

Also, when I load a save file, the game plays every sound effect the game had played up until that point simultaneously. This is very strange as it seems to be playing all the sounds from the previous scenes and nothing further.

While I'm on the topic, is it well known that webgl effects are essentially unusable in cordova apps on ios and android? Simple effects like tint don't seem too bad, but using something like blur or a warp effect will reduce the frame rate to a few frames a second.
B
11
S
3
Posts: 135
Reputation: 1,309

Post » Mon Mar 14, 2016 9:50 am

@Ashley Any idea what could be causing this? The crashing is one thing as at least I can try and find the cause of the high CPU usage, but the sound effect issue is a serious issue, I can literally save the game in a scene, load the game I just saved and every sound prior to the moment I've saved will play simultaneously. Is this a WKWebView issue out of your control?
B
11
S
3
Posts: 135
Reputation: 1,309

Post » Mon Mar 14, 2016 11:46 am

If you read the recent blog posts on WKWebView, it can use more memory, especially for music tracks. Does your game use a lot of music? I'd suspect it is crashing due to running out of memory.
Scirra Founder
B
387
S
230
G
87
Posts: 24,248
Reputation: 192,226

Post » Wed Mar 16, 2016 9:40 am

Ashley wrote:If you read the recent blog posts on WKWebView, it can use more memory, especially for music tracks. Does your game use a lot of music? I'd suspect it is crashing due to running out of memory.

It does use a lot of music, though as it seems to crash when a new scene is loaded, or when the game is paused, I suspect it has to do with my system for saving save slot screenshots to json, which happens when you pause and when the game autosaves at the start of a new scene.

Any idea why the game is playing every sound effect simultaneously? This even happens when the window is changed/device is locked for a second, and then the game is returned to.
B
11
S
3
Posts: 135
Reputation: 1,309

Post » Wed Mar 16, 2016 11:51 am

It's probably something to do with the fact normally music has to queue to play in the next touch, but that's not necessary with the Web Audio API. File a bug and I'll look in to it.
Scirra Founder
B
387
S
230
G
87
Posts: 24,248
Reputation: 192,226


Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 6 guests