iOS WKWebView (XDK) music crash "servers already up" error

Bugs will be moved here once resolved.

Post » Sat Oct 29, 2016 11:41 pm

I've already emailed you but it should be filed here too so that others who may experience this issue knows about it. Also, perhaps you could give an update to the situation. I suspect it is the previous work-around for audio/music in iOS 8/9 (play music as sound etc) no longer compatible with iOS10.

Problem Description
My game (https://itunes.apple.com/app/id1088622798) compiled on r238 and exported to XDK WKWebView, on the latest version for the required Cordova plugins works for the most part, but there's random crashes and it is related to music being played or looping in a new track. The error message is always the same "servers already up", white screens and game hangs requiring force close.

Attach a Capx
You have the CAPX already.

Description of Capx
Full game, iOS build.

Steps to Reproduce Bug
  • Export Cordova, using XDK & WKWebView
  • Compile with XDK
  • Test on iDevice, fly around, going to and from planets to system. It's a random crash.

Observed Result
After playing for 5 to 30 minutes, sometimes sooner, a random crash occurs. This does NOT happen if Music is turned off (set to 0) in the options menu. It only happens with Music on.

Expected Result
Expect music to work without crashing the game.

Affected Browsers
  • WKWebView export

Operating System and Service Pack
iOS 10 (10.0.2 and 10.1)

Construct 2 Version ID
r238
B
70
S
24
G
19
Posts: 1,757
Reputation: 17,616

Post » Sun Oct 30, 2016 4:41 am

I went to the c2runtime.js file and found this line:

if (this.runtime.isWKWebView)
playMusicAsSoundWorkaround = true;

I changed that to false;

Re-compiled with XDK and tested it. No more crashes after playing an hour.

However, audio volume via tags no longer function, it plays at full.

This isn't a huge deal, since at least there's no more crashing and there's music!
B
70
S
24
G
19
Posts: 1,757
Reputation: 17,616

Post » Mon Oct 31, 2016 3:42 pm

Silverforce wrote:I went to the c2runtime.js file and found this line:

if (this.runtime.isWKWebView)
playMusicAsSoundWorkaround = true;

I changed that to false;

Re-compiled with XDK and tested it. No more crashes after playing an hour.

However, audio volume via tags no longer function, it plays at full.

This isn't a huge deal, since at least there's no more crashing and there's music!


i will test this on my game and see if its works, i export with phonegapp


update: couldnt find that line of code in mine file.
Image

Image
B
38
S
14
G
7
Posts: 408
Reputation: 8,338

Post » Mon Oct 31, 2016 10:57 pm

IJCT wrote:i will test this on my game and see if its works, i export with phonegapp
update: couldnt find that line of code in mine file.


Do you set to use WKWebView when you do the Cordova export?
B
70
S
24
G
19
Posts: 1,757
Reputation: 17,616

Post » Mon Oct 31, 2016 11:22 pm

Silverforce wrote:
IJCT wrote:i will test this on my game and see if its works, i export with phonegapp
update: couldnt find that line of code in mine file.


Do you set to use WKWebView when you do the Cordova export?


yes but it may be because you export for XDK :s
Image

Image
B
38
S
14
G
7
Posts: 408
Reputation: 8,338

Post » Tue Nov 01, 2016 12:07 am

So you have no "playMusicAsSoundWorkaround" variable in your runtime at all?

Strange!
B
70
S
24
G
19
Posts: 1,757
Reputation: 17,616

Post » Tue Nov 01, 2016 12:54 am

Silverforce wrote:So you have no "playMusicAsSoundWorkaround" variable in your runtime at all?

Strange!


Image

exactly
Image

Image
B
38
S
14
G
7
Posts: 408
Reputation: 8,338

Post » Tue Nov 01, 2016 2:09 am

Image
B
70
S
24
G
19
Posts: 1,757
Reputation: 17,616

Post » Tue Nov 01, 2016 2:34 am

weird thing is that my c2runtime is all messed up and weird :/

it maybe because of the "minify script"?
Image

Image
B
38
S
14
G
7
Posts: 408
Reputation: 8,338

Post » Tue Nov 01, 2016 2:38 am

IJCT wrote:weird thing is that my c2runtime is all messed up and weird :/

it maybe because of the "minify script"?


I don't minify. :) In fact, minifying script leads to major issues with Cordova/XDK in my experience...
B
70
S
24
G
19
Posts: 1,757
Reputation: 17,616

Next

Return to Closed bugs

Who is online

Users browsing this forum: No registered users and 1 guest