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

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

#1

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


#2

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”);
.
.
.


#3

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);
}


#4

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

I’ll try it ASAP.


#5

you use creator? which version?


#6

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


#7

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


#8

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


#10

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


#11

plz try the command again until u download the plugin.