[SOLVED]Sdkbox facebook crash game when call cc.game.restart()

Hello everyone, I have an issue and need help:

In my project, I have installed the sdkbox facebook(version 2.3.17.5) and notice that it’s crashed on android when I call cc.game.restart () method

oh, I realize not only every sdkbox facebook but also just install a sdkbox plugin (like facebook, onesignal …), all are crashed when calling cc.game.restart().

in AppDelegate.cpp:
.
.
.
#ifdef SDKBOX_ENABLED
sc->addRegisterCallback(register_all_PluginFacebookJS);
sc->addRegisterCallback(register_all_PluginFacebookJS_helper);
.
.
.
#endif
sc->addRegisterCallback(register_all_SpriteExJS);
sc->start();
sc->runScript(“script/jsb_boot.js”);
.
.
.

i meet same error. i fixed it
in ScriptingCore.cpp:

void ScriptingCore::cleanup()

if(iter->first.compare(0,8,“N6sdkbox”) != 0){
free(iter->second->jsclass);
free(iter->second);
}

1 Like

@mailaminh12 Thanks for your test case.
@dancermaster01 Thanks for your solution.

I’ll try it ASAP.

you use creator? which version?

Hi @mailaminh12 and @dancermaster01

We can not reproduce this issue with creator 1.8, but reproduce it in cocos2d-x javascript version.
Fixed it in our staging server, plz wait 4 hours to check this issue again.

sdkbox update --forcedownload --forcecopy --staging

Thanks @htlxyz

i don’t use creator, i use cocos2d-x javascript 3.10

thanks, but this error sdkbox update --forcedownload --forcecopy --staging (#FATAL: The network is offline, can’t execute the command “update”. ). I use sdkbox v1.0.1.30

I don’t know what do you mean? Can u talk more about this

plz try the command again until u download the plugin.