I have developed an app using HTML5 and CREATEJS. I am encountering some issues that I cannot find a solution, for weeks. I hope someone can help.
1)On Android Google Chrome there is a problem that appears when I simply click anywhere on the screen: the FPS drops and any animation that is playing freezes for the duration of my touch. The problem is only in Mobile Chrome browser, on Android. It does not exist in other mobile browsers, neither in iPhone, neither in Safari, Firefox, etc.
I created a simple apk using webview and it doesn't have the problem either. So for some reason, the problem is only in mobile android chrome.
The code is optimized at maximum. 2 months ago we used only 1 canvas, but now we use multiple canvases and we have less animations in each canvas running everytime. While in android firefox it works perfect, but in android chrome it freezes for a single click.
I tried to disable stagemousedown/up events, because they are being triggered when I simply click anywhere in the stage. This didn't fix the problem or it is possible that there are some hidden stagetouch events that I don't know how to disable.
2)On Android Google Chrome and iPhone6 Safari, when I click the SPIN button, the game starts the SPIN, but with a delay of at least 1.5 seconds, but there is no such delay added with intention inside the code. On PC any browser, Android/iOS Mobile Firefox, this works perfect, no delay. In iOS Safari iPhone8 again it works perfect.
I created a simple apk using webview and it doesn't have this problem either. So for some reason, the problem is only in mobile android chrome.
UPDATE 11/10/19: Issue 2 has been solved by reducing canvas size and removing all shadow effects which consumed a lot of memory. Issue 1 still remains unsolved with absolutely no ideas left to try out. Any help is appreciated.
My project is 99% completed except these 2 issues. I am hoping to be able to fix them, because I really do not want to throw away months of work and switch to other javascript library for gaming, that doesn't have the problem, like PIXIJS.
I tried with RAF and RAF_SYNCHED, but still no improvement in any scenario.
Stage.update() is required for any animation. Having them on ticker is the reason why its getting slower.
To see the problem in action, please open this URL: http://www.nevergone.biz/DEMO_CODE/index.html
How to test: Open the link above in Android Google Chrome portrait mode and then click SPIN. During SPIN click above the game canvas or anywhere. Notice that everything freezes.
The code was extracted only for testing these issues, so after a few spins it may freeze. I will fix this tomorrow, but I hope someone can give some ideas for solving the problem.
Problem #1 is apparently isolated on some older devices that use Android Google Chrome. The problem is somehow caused by CREATEJS using too many listeners on the stagedown event. I am currently waiting for the developer of the framework to give an answer or for Chrome to receive a serious update.
Problem #2 was fixed by removing all text-shadow CSS effects which apparently were consuming a lot of memory.
cache might work.
var testShape=new createjs.Shape();
testShape.graphics.beginFill("red").rect(0,0,100,100);
testShape.cache(0,0,100,100);
stage.addChild(testShape);
// If you make changes and want to refresh the cache
testShape.updateCache()
We’re running into an issue where after the app “crashes” and reloads (user gets kicked back to the first screen), whenever the user presses the Android Back Button, the app gets put into the background. I was able to reproduce this with the default “Tabs” project that’s provided by CRNA on Expo 31 SDK (link: https://exp-shell-app-assets.s3.us-west-1.amazonaws.com/android/%40allen.lin/split-screen-poc-c25e728a483c4c71ba9109ac70a93ef1-signed.apk 1) with no additional code added. The current work around is to have the user open up the app switcher and kill and re-open the app.
Here are some steps to consistently reproduce it on a Google Pixel 2 Phone (or any other phone with the split-screen feature), which will cause the app the reload:
Open the app.
Tap on any of the tabs to switch to different screens (i.e. “Links”). Pressing the Android Back Button should put the user back to the “Home” tab.
From here, activate the split-screen feature by long-pressing the Square icon located at the bottom of the device (where the Back and Home buttons are). This will cause the app to crash and reload.
Get out of the split screen view by dragging the black horizontal bar at the center of the screen to the bottom of the screen so that the app is focused again. This will again cause the app to crash and reload.
Tap on the “Link” tab again.
Now press the Android Back Button. The app should be minimized.
I tried looking at ADB Logcat but there was too much noise in the logs. One line did stick out when I grep’d the logs for ‘exception’ though:
12-05 16:03:07.137 23448 23448 E j : Runtime exception in RNObject when calling method getCurrentReactContext: java.lang.NullPointerException: null receiver
I also saw some calls to moveTaskToBack() being made when the back button is pressed.
Just to be clear, this is not linked to the Split-Screen feature on Android devices. One of my colleagues was able to reproduce this on his XiaoMi A1M1 device (running Vanilla Android 8.1.0 – he’s on the Android One program) in our main Expo app (SDK 30). His device does not have the split-screen feature and he still saw this problem. I think our actual app might’ve crashed on his device due to some code problem.
Is this a known issue in Expo? Is there a workaround to avoid this Android Back Button problem?
EDIT: Being tracked by Expo engineers here: https://github.com/expo/expo/issues/1786. Main problem on Android seems to be memory pressure causing apps to get killed.
Might be a react-native issue.
I am working on adding iOS 11 support for an hybrid app build on older version. Everything works fine but I am facing issue on iPad. Unable to dismiss the pop over because it keeps on reappearing after making a selection. This also happens when the orientation changes. Has anyone faced similar issue or any pointers on why this might be happening.
I can't really paste reproduction here, because it's happening in commercial project. I will try to describe it and maybe someone had same problem.
Vue 2.x, iOS 9.x, iPad and iPod
My page (one of layouts) crashes on Safari/Chrome on iOS, immediatly after page load. On ipad it gets refreshed and works. On iPod it crashes also on other pages and doesn't get refreshed.
Can't debug anyhow. I know there was a problem with ios 9 safari with too much javascript templating/too much js at all.
Do you know anything about that issue? Is it possible to debug it somehow? I thought I just accidentaly trigger some bug in safari, but different behavior in faster/slower devices says it's more like computing bug (iPhone 6s work like ipad)
Help, I cant rewrite everything to jQuery now :D
EDIT:
I initialized vue on DOMContentLoaded and it fixed iPad problem (so problem was maybe conflicts between html rendering by vue and browser), but slow 2014 iPod breaks anyway
I develop an SPA Webapp with cordova since many year ago for iPad, started with ios 6.0, that I maintain by upgrade JavaScript library, Cordova iOS, plugin etc. for each Apple upgrade of iOS.
It is the first time during many years I have a very strange Rendering problem with iPad on iOS 10, iOS 10.0.2, iOS 10.1 but not with iOS 9 and earlier.
I think it due to CSS rendering because javascript seems work.
Background do not appear! the screen is cut into quater!
I make some screen shot, the good screen on the left side and the strange on the right.
screen 01
screen 03
When I restart the application everything returns to normal.
I continue to use UiWebview because WKWebview have many security police at this time. And I need the very Fast virtual FTS3 of Websql engine inside.
I actually use cordova iOS platform 4.2.0 but I tried with 4.2.1 I have the same occasional rendering problem. The main javascript framework is jquerymobile 1.4.5
The plugin used is:
cordova-plugin-console 1.0.4
cordova-plugin-statusbar 2.1.3 ( I trie also the least without succeed)
cordova-plugin-whitelist 1.2.
Anyone is having the same problem ?
Any workaround ?