Crash on device language change in android Cocos2dJS

Crash on device language change in android Cocos2dJS

Hi everyone,

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.

1 Like

Stack trace from adb logcat for same 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: [] Renderer process (6454) crash detected (code -1).
01-31 12:10:58.026  6212  6212 E chromium: [] 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)"

@slackmoehrle @pandamicro @R101 & all, please do share any solution or a direction to look into this issue.

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.

1 Like

@R101 yes we have cpp game too, we checked its not happening. it’s issue with JS Code only.

@R101 @slackmoehrle Hi all, Any thoughts on the above issue? Any inputs will be greatly appreciated. If you need anymore info, please let us know.

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.

1 Like

I am not sure how to help with this. It’s a weird crash and I know we wont be releasing any bug fixes to Cocos2d-js.

Thanks for your reply. It is dishearting to know cocos2d-js won’t be supported. We just moved to cocos2d-js from another framework

Please move to Cocos Creator!

It’s very feature rich and enjoyable to use.

1 Like