We are getting crash when user changes the device language & app is in background, We are able to produce this in 2 to 3 devices like Karbon k9 (android version: 5.x), HTC One ( Android version 5.x) & Galaxy Tab A (Android version 9).
I created a new blank project to verify this crash, and in that blank project also this crash is happening. If anybody have any idea to solve this issue please reply in this thread.
Steps to produce the crash:
1] Open game
2] Go to device settings & change the language
3] open background game
4] Click the buttons ( you need to have some touch events )
game will crash.
01-31 12:10:57.814 6212 6451 W cr_ChildProcessConn: onServiceDisconnected (crash or killed by oom): pid=6454
01-31 12:10:57.998 6212 6212 E chromium: [ERROR:aw_browser_terminator.cc(125)] Renderer process (6454) crash detected (code -1).
01-31 12:10:58.026 6212 6212 E chromium: [ERROR:aw_browser_terminator.cc(90)] Render process (6454) kill (OOM or update) wasn't handed by all associated webviews, killing application.
01-31 12:10:58.183 3544 3544 I Zygote : Process 6212 exited due to signal (9)
01-31 12:10:58.201 3926 4301 I ActivityManager: Process com.x.x (pid 6212) has died: cch+1CAC (117,340)"
Have you tried out a non-JS game (just Cocos2d-x C++) to see if something similar happens? If the C++ build doesn’t crash, then that may be an indicator that it’s in the JS code.
Sorry I can’t really help much with this since I’ve never used the JS interface in Cocos2d-x. Perhaps you can add log calls in the app in onResume/onEnter and such functions that would be called when you go back to a game in the background. Also add the log calls in the Director just to see how far it gets through the calls before it crashes.