Construct 2 game crash in Android Webview

Bugs will be moved here once resolved.

Post » Sun Oct 01, 2017 11:38 am

Problem Description
every Construct 2 game that runs on android native webview crashes after a while:

1. on android 6.0.1 - about 1:30 minutes tops - every game also the empty project.
2. on android android 5.0 -
  • first time the i lunch the app the with empty project doesn't crash ( tested for 10 minutes).
  • tested the Template: Infinite jumping and it and it crashes after 1:30 minutes.
  • tested the Template: Vertical space shooter and it crashes after 1:30 minutes.

the app itself doesn't crash but the activity that has the webview does.

the reason that we suspect it is Construct 2 bug because we run a Phaser game on the same webview and it didn't crash ( i run it for 20 minutes in both version of android )

also i tried to create the same empty project in Construct 3 and the same happened.

Attach a Capx
empty project
https://drive.google.com/file/d/0B86HXLvkLvawbVNvYkNfS0VfX1E/view?usp=sharing

Template Infinte jumping
https://drive.google.com/file/d/0B86HXLvkLvawN2lZUkZWZExPUkU/view?usp=sharing

Template: Vertical space shooter
https://drive.google.com/file/d/0B86HXLvkLvawaHV4aUNsUTBhSkk/view?usp=sharing


Description of Capx
created an empty project without any object or plugin
created projects that based on the templates and didn't add anything

Attach a Game Link to uploaded project
empty project
https://bucketeer-297aee65-9d1a-494a-bc24-c72553ed097e.s3.amazonaws.com/public/362/index.html

Template: Vertical space shooter
https://bucketeer-297aee65-9d1a-494a-bc24-c72553ed097e.s3.amazonaws.com/public/355/index.html

Template: Infinite jumping
https://bucketeer-297aee65-9d1a-494a-bc24-c72553ed097e.s3.amazonaws.com/public/363/index.html


Attach a Android Application
https://drive.google.com/file/d/0B86HXLvkLvawakY4anFaSGVldVE/view?usp=sharing

Application Description
a simple app with 2 activities. you enter the url and it opens it in the new activity which contains only a webview.
Min sdk version15 ( android 4.0)
target sdk version 23 ( android 6.0)
compile sdk version 26 ( android 8.0)

Attach a Game link to Phaser Game
http://sbc.littlecolor.com/goblinrun/
please check that your screen is rotated in landscape otherwise it won't display anything.

Steps to Reproduce Bug
  • exported the game with HTML 5 website, used Minify script, and normal style
  • upload the constrcut 2 game to the server, or use local server and approve external connection
  • enter the url in the android app ( you can use what i have uploaded to the server )
  • the webview activity crashed after minute and a half or so
  • enter the url of different games with Construct 2 or with different frameworks ( like phaser )

Observed Result
the activity that has the webview crashed.

Expected Result
regular run without crashes

Affected Browsers
  • Chrome: No
  • FireFox: No
  • Internet Explorer: No
  • Microsoft Edge: No
  • Opera: No
  • NW.js: No
  • Android 6.0.1 Web View (xiamoi mi 5): Yes
  • Android 5.0 Web View (samsung note 3): Yes And No, as explain in the description

Operating System and Service Pack
Windows 10 - 64 bit ( to test in browsers on desktop)
Android 6.0.1 ( Xiamoi mi 5)
Android 5.0 ( Samsung Note 3)
Samsung S8
other android devices

Construct 2 Version ID
244 (64-bit)

Additional remarks
the next phase we want to do is to log all the important variables throughout the game life cycle.
can you please provide the list of variables and functions in c2runtime file so we can log them out.
i noticed that in c2runtime you override the console.log and error function that we can use them, correct me if i'm wrong.
also i see that you use jquery-2.1.1 and we will have to consider it as well ( although in c3 you don't use jquery so probably not)

if you have additional suggestions that we should check please let me know

i hope this won't be closed because i added items to the report template (i didn't deleted anything, only added)
check out my other projects on my portfolio website : http://madebyjacob.com
B
22
S
6
G
2
Posts: 27
Reputation: 2,022

Post » Wed Oct 11, 2017 5:52 pm

Are your C2 projects on a HTTPS url?

Here I have this problem only when the game is HTTPS

If it is HTTP it works just fine!
B
7
S
2
Posts: 31
Reputation: 947

Post » Tue Oct 17, 2017 3:53 pm

If the webview crashes, it means either the Chromium engine (or maybe the GPU driver) crashed. It's not part of Construct or our code that is crashing. I'd suggest filing this at crbug.com. Also on Android the webview updates regularly, so it might be fixed by a future Chrome update.
Scirra Founder
B
399
S
236
G
89
Posts: 24,546
Reputation: 195,436

Post » Sat Oct 21, 2017 11:12 am

some update: we added crosswalk library and it seem to stop that crashes on the game.
but we prefer not to add it, because the only engine that has this problem is construct

vicplay, you seem right about this matter, it doesn't crash, this is a short time fix, thanks!
but here some example with Phaser engine with https url that doesn't crash, but construct does
https://examples.phaser.io/embed.php?f=animation/multiple+anims.js

Ashley, you might be right, but the fact the only construct 2 crashes on the webview is suspicious, and as you can see it has to do something with the https.

Ashley, i ask of you to help use debug this problem so i can send you more information, what variables and where in the c2 runtime can i log out during the game run that will indicate something that we can use as a lead to the problem
check out my other projects on my portfolio website : http://madebyjacob.com
B
22
S
6
G
2
Posts: 27
Reputation: 2,022

Post » Sun Oct 22, 2017 12:40 pm

It just means there's a Chromium (or GPU driver) bug that only our engine runs in to. It doesn't mean it's our code that is crashing. If our code crashes it creates a JavaScript exception; if the native code crashes it closes the activity. So it's no good talking to us about it.
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 4 guests