0 Favourites

Construct 2 game crash in Android Webview

  • 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)

  • 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!

  • 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.

  • Construct 3

    Buy Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Buy Now Construct 3 users don't see these ads
  • 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

  • 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.

  • I figured out that the game is failing to download resources when the url is https.

    Back in Oct 22 it was crashing, now it is triggering the Browser plugin "is Downloading Update" forever

  • I don't think that's anything to do with this report, because this report is about webview apps, and those don't use HTTPS. They load resources locally instead.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)