Search code examples
cocos2d-xcocos2d-js

Cocos2d-js: Android app crashes after sleeping time (JS_AbortIfWrongThread)


I have a cocos2d-js game in beta test now, running fine on Android, IOS and Web. Only the Android version crashes regularly after I leave the app for some time, some hours maybe. I resume it, it works for 1 minute or so and then crashes with following backtrace:

I/DEBUG ( 180): backtrace:
I/DEBUG ( 180): #00 pc 00fc8788 /data/app-lib/org.cocos2dx.hellojavascript-1/libcocos2djs.so (JS_AbortIfWrongThread(JSRuntime*)+36)
I/DEBUG ( 180): I

Any suggestions where I could start looking for this?

In version cocos2d-js 3.0 RC2 and RC3 :-(


Solution

  • No that I changed to cocos2d-js version 3.5, the bug no longer is there. Apparently it had to do with SpiderMonkey javascript engine, which was replaced. All fine now!