Sorry about my English.
my game crash when i login then logout. Everything work fine but when i do it again for 3,4 time, game crash. I’m using this code:
bool BSDKManager::initSDKManager()
{
PluginFacebook::init();
PluginFacebook::setListener(this);
return true;
}
i fixed this by using facebook_lib and PluginFacebook checkout from https://github.com/sdkbox/sdkbox-sample-facebook, but that is not lastest version of sdkbok.
the problem just happen when i using “sdkbox import facebook”, i think because it take lastest version of sdkbox and import facebook-android-4.12.1.jar
hope this useful for you guys.
1 more time, sorry about my English.
i test sample and it work fine if i ignore step 2.
But when i use sdkbox update to “updating facebook v2.2.0.13 -> v2.2.5.3”. Then i test login then logout many time, it’s crash. This is nkd-stack log:
Build fingerprint: ‘Lenovo/k5fpr/A7010a48:5.1/LMY47D/A7010a48_S150_160219_ROW:user/release-keys’
pid: 29617, tid: 29671, name: GLThread 40756 >>> org.cocos2dx.clcbmainskin <<<
signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
Stack frame I/AEE/AED (30277): #00 pc 0003e1e0 /system/lib/libc.so (tgkill+12)
Stack frame I/AEE/AED (30277): #01 pc 00016e65 /system/lib/libc.so (pthread_kill+52)
Stack frame I/AEE/AED (30277): #02 pc 00017a7b /system/lib/libc.so (raise+10)
Stack frame I/AEE/AED (30277): #03 pc 0001425d /system/lib/libc.so (__libc_android_abort+36)
Stack frame I/AEE/AED (30277): #04 pc 000125b0 /system/lib/libc.so (abort+4)
Stack frame I/AEE/AED (30277): #05 pc 000a741b /system/lib/libart.so (art::LogMessage::~LogMessage()+1430)
Stack frame I/AEE/AED (30277): #06 pc 000b0ff5 /system/lib/libart.so (art::JniAbort(char const*, char const*)+1084)
Stack frame I/AEE/AED (30277): #07 pc 000b153f /system/lib/libart.so (art::JniAbortF(char const*, char const*, …)+58)
Stack frame I/AEE/AED (30277): #08 pc 000b459f /system/lib/libart.so (art::ScopedCheck::ScopedCheck(_JNIEnv*, int, char const*)+1130)
Stack frame I/AEE/AED (30277): #09 pc 000b52f5 /system/lib/libart.so (art::CheckJNI::FindClass(_JNIEnv*, char const*)+20)
Stack frame I/AEE/AED (30277): #10 pc 00b7d07b /data/app/org.cocos2dx.clcbmainskin-1/lib/arm/libcocos2dcpp.so (_JNIEnv::FindClass(char const*)+6): Routine _JNIEnv::FindClass(char const*) at /usr/local/Cellar/android-ndk/r10e/platforms/android-9/arch-arm/usr/include/jni.h:519
Stack frame I/AEE/AED (30277): #11 pc 00b7d405 /data/app/org.cocos2dx.clcbmainskin-1/lib/arm/libcocos2dcpp.so (sdkbox::JNIUtils::GetClassObjectFromName(char const*, _JNIEnv*)+20): Routine sdkbox::JNIUtils::GetClassObjectFromName(char const*, _JNIEnv*) at /Volumes/extend/jenkins/sdkbox/release/csc/protocols/proj.android/jni/src/bridge.cpp:244
Stack frame I/AEE/AED (30277): #12 pc 00b7dd63 /data/app/org.cocos2dx.clcbmainskin-1/lib/arm/libcocos2dcpp.so (sdkbox::JNIUtils::GetJNIStaticMethodInfo(char const*, char const*, char const*, _JNIEnv*)+26): Routine sdkbox::JNIUtils::GetJNIStaticMethodInfo(char const*, char const*, char const*, _JNIEnv*) at /Volumes/extend/jenkins/sdkbox/release/csc/protocols/proj.android/jni/src/bridge.cpp:344
Stack frame I/AEE/AED (30277): #13 pc 00b7c17f /data/app/org.cocos2dx.clcbmainskin-1/lib/arm/libcocos2dcpp.so (ZN6sdkbox15JNIInvokeStaticISsIEEET_PKcS3_DpT0+30): Routine ZN6sdkbox15JNIInvokeStaticISsIEEET_PKcS3_DpT0 at /Volumes/extend/jenkins/sdkbox/release/csc/protocols/proj.android/jni/src/bridge.h:709
Stack frame I/AEE/AED (30277): #14 pc 00b7c259 /data/app/org.cocos2dx.clcbmainskin-1/lib/arm/libcocos2dcpp.so (sdkbox::SdkboxCore::getAppPackageId() const+12): Routine sdkbox::SdkboxCore::getAppPackageId() const at /Volumes/extend/jenkins/sdkbox/release/csc/protocols/proj.android/jni/src/SdkboxCoreAndroid.cpp:90
Stack frame I/AEE/AED (30277): #15 pc 00b78515 /data/app/org.cocos2dx.clcbmainskin-1/lib/arm/libcocos2dcpp.so (sdkbox::Tracking::getDefaultPairs() const+348): Routine sdkbox::Tracking::getDefaultPairs() const at /Volumes/extend/jenkins/sdkbox/release/csc/protocols/proj.android/jni/…/…/share/Tracking.cpp:94
Stack frame I/AEE/AED (30277): #16 pc 00b787a7 /data/app/org.cocos2dx.clcbmainskin-1/lib/arm/libcocos2dcpp.so (sdkbox::Tracking::getDefaultPairs(std::string const&, std::string const&) const+14): Routine sdkbox::Tracking::getDefaultPairs(std::string const&, std::string const&) const at /Volumes/extend/jenkins/sdkbox/release/csc/protocols/proj.android/jni/…/…/share/Tracking.cpp:77
Stack frame I/AEE/AED (30277): #17 pc 00b788d5 /data/app/org.cocos2dx.clcbmainskin-1/lib/arm/libcocos2dcpp.so (sdkbox::Tracking::trackEvent(std::string const&, std::string const&, std::string const&, sdkbox::Json const&) const+28): Routine sdkbox::Tracking::trackEvent(std::string const&, std::string const&, std::string const&, sdkbox::Json const&) const at /Volumes/extend/jenkins/sdkbox/release/csc/protocols/proj.android/jni/…/…/share/Tracking.cpp:114
Stack frame I/AEE/AED (30277): #18 pc 008f931f /data/app/org.cocos2dx.clcbmainskin-1/lib/arm/libcocos2dcpp.so (Java_com_sdkbox_plugin_PluginFacebook_onLogin+186): Routine Java_com_sdkbox_plugin_PluginFacebook_onLogin at /Volumes/extend/jenkins/sdkbox/release/plugins/facebook/proj.android/jni/src/FacebookProxy.cpp:267
Stack frame I/AEE/AED (30277): #19 pc 001110dd /data/dalvik-cache/arm/data@app@org.cocos2dx.clcbmainskin-1@base.apk@classes.dex
I’m getting a crash on android when Logging into facebook:
02-23 14:38:51.766 18745-18781/uk.co.xafield.WoodyQuiz D/cocos2d-x debug info: ##FB onLoginClick Login
02-23 14:38:51.768 18745-18781/uk.co.xafield.WoodyQuiz D/PluginFacebook: Login with permissions: ‘public_profile’
02-23 14:38:51.785 18745-18745/uk.co.xafield.WoodyQuiz D/Cocos2dxActivity: onPause()
02-23 14:38:51.799 18745-18745/uk.co.xafield.WoodyQuiz D/Cocos2dxActivity: onWindowFocusChanged() hasFocus=false
02-23 14:38:51.842 18745-18745/uk.co.xafield.WoodyQuiz I/WebViewFactory: Loading com.google.android.webview version 55.0.2883.91 (code 288309100)
02-23 14:38:51.905 18745-18745/uk.co.xafield.WoodyQuiz I/art: Rejecting re-init on previously-failed class java.lang.Class<com.android.webview.chromium.TokenBindingManagerAdapter>
02-23 14:38:51.905 18745-18745/uk.co.xafield.WoodyQuiz I/art: Rejecting re-init on previously-failed class java.lang.Class<com.android.webview.chromium.TokenBindingManagerAdapter>
02-23 14:38:51.914 18745-18745/uk.co.xafield.WoodyQuiz I/art: Rejecting re-init on previously-failed class java.lang.Class<com.android.webview.chromium.ServiceWorkerControllerAdapter>
02-23 14:38:51.914 18745-18745/uk.co.xafield.WoodyQuiz I/art: Rejecting re-init on previously-failed class java.lang.Class<com.android.webview.chromium.ServiceWorkerControllerAdapter>
02-23 14:38:51.922 18745-18745/uk.co.xafield.WoodyQuiz I/cr_LibraryLoader: Time to load native libraries: 2 ms (timestamps 9118-9120)
02-23 14:38:51.922 18745-18745/uk.co.xafield.WoodyQuiz I/cr_LibraryLoader: Expected native library version number “55.0.2883.91”, actual native library version number “55.0.2883.91”
02-23 14:38:52.006 18745-18745/uk.co.xafield.WoodyQuiz I/cr_LibraryLoader: Expected native library version number “55.0.2883.91”, actual native library version number “55.0.2883.91”
02-23 14:38:52.007 18745-18745/uk.co.xafield.WoodyQuiz I/chromium: [INFO:library_loader_hooks.cc(163)] Chromium logging enabled: level = 0, default verbosity = 0
02-23 14:38:52.025 18745-18745/uk.co.xafield.WoodyQuiz I/cr_BrowserStartup: Initializing chromium process, singleProcess=true
02-23 14:38:52.212 18745-18745/uk.co.xafield.WoodyQuiz I/cr_Ime: ImeThread is enabled.
02-23 14:38:52.214 18745-19339/uk.co.xafield.WoodyQuiz W/cr_media: Requires BLUETOOTH permission
02-23 14:38:52.285 18745-19354/uk.co.xafield.WoodyQuiz E/libEGL: validate_display:255 error 3008 (EGL_BAD_DISPLAY)
02-23 14:38:52.357 18745-19354/uk.co.xafield.WoodyQuiz W/VideoCapabilities: Unrecognized profile/level 0/3 for video/mpeg2
02-23 14:38:52.406 18745-19354/uk.co.xafield.WoodyQuiz I/VideoCapabilities: Unsupported profile 4 for video/mp4v-es
02-23 14:38:52.445 18745-18745/uk.co.xafield.WoodyQuiz E/chromium: [ERROR:interface_registry.cc(104)] Failed to locate a binder for interface: autofill::mojom::PasswordManagerDriver
02-23 14:38:53.158 18745-18745/uk.co.xafield.WoodyQuiz W/cr_BindingManager: Cannot call determinedVisibility() - never saw a connection for the pid: 18745
02-23 14:39:08.542 18745-19347/uk.co.xafield.WoodyQuiz W/IInputConnectionWrapper: getTextAfterCursor on inactive InputConnection
02-23 14:39:08.545 18745-19347/uk.co.xafield.WoodyQuiz W/IInputConnectionWrapper: getSelectedText on inactive InputConnection
02-23 14:39:08.546 18745-19347/uk.co.xafield.WoodyQuiz W/IInputConnectionWrapper: endBatchEdit on inactive InputConnection
02-23 14:39:08.562 18745-19347/uk.co.xafield.WoodyQuiz W/IInputConnectionWrapper: beginBatchEdit on inactive InputConnection
02-23 14:39:08.563 18745-19347/uk.co.xafield.WoodyQuiz W/IInputConnectionWrapper: getTextBeforeCursor on inactive InputConnection
02-23 14:39:08.563 18745-19347/uk.co.xafield.WoodyQuiz W/IInputConnectionWrapper: getTextAfterCursor on inactive InputConnection
02-23 14:39:08.564 18745-19347/uk.co.xafield.WoodyQuiz W/IInputConnectionWrapper: getSelectedText on inactive InputConnection
02-23 14:39:08.564 18745-19347/uk.co.xafield.WoodyQuiz W/IInputConnectionWrapper: endBatchEdit on inactive InputConnection
02-23 14:39:32.957 18745-18745/uk.co.xafield.WoodyQuiz W/cr_BindingManager: Cannot call determinedVisibility() - never saw a connection for the pid: 18745
02-23 14:39:37.417 18745-18745/uk.co.xafield.WoodyQuiz W/cr_BindingManager: Cannot call determinedVisibility() - never saw a connection for the pid: 18745
02-23 14:39:37.536 18745-18745/uk.co.xafield.WoodyQuiz D/Cocos2dxActivity: onWindowFocusChanged() hasFocus=true
02-23 14:39:37.553 18745-18745/uk.co.xafield.WoodyQuiz D/Cocos2dxActivity: onResume()
02-23 14:39:37.890 18745-18781/uk.co.xafield.WoodyQuiz W/google-breakpad: ### ### ### ### ### ### ### ### ### ### ### ### ###
02-23 14:39:37.890 18745-18781/uk.co.xafield.WoodyQuiz W/google-breakpad: Chrome build fingerprint:
02-23 14:39:37.890 18745-18781/uk.co.xafield.WoodyQuiz W/google-breakpad: 1.0
02-23 14:39:37.890 18745-18781/uk.co.xafield.WoodyQuiz W/google-breakpad: 1
02-23 14:39:37.890 18745-18781/uk.co.xafield.WoodyQuiz W/google-breakpad: ### ### ### ### ### ### ### ### ### ### ### ### ###
02-23 14:39:37.892 18745-18781/uk.co.xafield.WoodyQuiz A/libc: Fatal signal 11 (SIGSEGV), code 1, fault addr 0x0 in tid 18781 (GLThread 350)
This is without the facebook app installed on the device. Is this basically broken i.e. should I be checking somehow on Android the Facebook app exists. It works without issue on iOS???
I’m happy to provide one but I only have what’s above which is coming from logcat. How can I get you more info ? This is happening on a Nexus 7 which has all the latest updates, it brings up the facebook login dialog in the “Android Sytem WebView”. You can see from the log it starts it:
If I press the close button (x) on this view or login, on close the view disappears then about 2 seconds later the app crashes. I never get any callbacks on the facebook sdk. So what I mean is the “onLogin(bool isLogin, const std::string& error)” is never called. This is called on iOS. So it looks like a problem with the Android System WebView or something within sdkbox where it calls it??? been stumped on this most of the day.
Build fingerprint: 'google/razor/flo:6.0.1/MOB30X/3036618:user/release-keys'
pid: 21512, tid: 21547, name: GLThread 3313 >>> uk.co.xafield.ThinkDog <<<
signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0
Stack frame 02-27 11:49:55.958 190 190 F DEBUG : #00 pc 00a84326 /data/app/uk.co.xafield.ThinkDog-1/lib/arm/libMyGame.so: Routine $a at libgcc2.c:?
Stack frame 02-27 11:49:55.958 190 190 F DEBUG : #01 pc 00d0adcf /data/app/uk.co.xafield.ThinkDog-1/lib/arm/libMyGame.so (Java_com_sdkbox_jnibridge_NativeBridge_emitNative+42): Routine void std::advance<__gnu_cxx::__normal_iterator<cocos2d::Node**, std::vector<cocos2d::Node*, std::allocator<cocos2d::Node*> > >, int>(__gnu_cxx::__normal_iterator<cocos2d::Node**, std::vector<cocos2d::Node*, std::allocator<cocos2d::Node*> > >&, int) at C:/dev/android-ndk-r13b-windows-x86_64/android-ndk-r13b/build//../sources/cxx-stl/gnu-libstdc++/4.9/include/bits/stl_iterator_base_funcs.h:178
Stack frame 02-27 11:49:55.958 190 190 F DEBUG : #02 pc 018f4b83 /data/app/uk.co.xafield.ThinkDog-1/oat/arm/base.odex (offset 0xbde000) (void com.sdkbox.jnibridge.NativeBridge.emitNative(long, java.lang.String, java.lang.Object)+142)
Stack frame 02-27 11:49:55.958 190 190 F DEBUG : #03 pc 018f43dd /data/app/uk.co.xafield.ThinkDog-1/oat/arm/base.odex (offset 0xbde000) (void com.sdkbox.jnibridge.NativeBridge$1.run()+688)
Stack frame 02-27 11:49:55.958 190 190 F DEBUG : #04 pc 734261e3 /data/dalvik-cache/arm/system@framework@boot.oat (offset 0x1ec9000)
Which I think indicates a memory issue somewhere within Java_com_sdkbox_jnibridge_NativeBridge I will try without multiDex the problem is my app won’t compile without it.
My game is crash when login successful, below is my log in logcat, I use cocos2d-js ver 3.14.1 and sdkbox facebook version 2.3.13.5, please help me, thank all.
05-29 11:43:58.985 5392-5473/org.cocos2dx.mygame D/PluginFacebook: Login with permissions: 'public_profile,email,read_custom_friendlists'
05-29 11:43:58.999 5392-5473/org.cocos2dx.mygame I/Timeline: Timeline: Activity_launch_request id:org.cocos2dx.mygame time:9133248
--------- beginning of system
05-29 11:43:59.019 5392-5392/org.cocos2dx.mygame D/Cocos2dxActivity: onPause()
05-29 11:43:59.020 5392-5392/org.cocos2dx.mygame W/com.facebook.appevents.AppEventsLogger: deactivateApp events are being logged automatically. There's no need to call deactivateApp, this is safe to remove.
05-29 11:43:59.027 5392-5392/org.cocos2dx.mygame D/Cocos2dxActivity: onWindowFocusChanged() hasFocus=false
05-29 11:43:59.185 5392-5392/org.cocos2dx.mygame I/Timeline: Timeline: Activity_idle id: android.os.BinderProxy@265c28a0 time:9133434
05-29 11:43:59.983 5392-5392/org.cocos2dx.mygame D/Cocos2dxActivity: onResume()
05-29 11:43:59.984 5392-5392/org.cocos2dx.mygame W/com.facebook.appevents.AppEventsLogger: activateApp events are being logged automatically. There's no need to call activateApp explicitly, this is safe to remove.
05-29 11:43:59.986 5392-5392/org.cocos2dx.mygame D/Cocos2dxActivity: onWindowFocusChanged() hasFocus=true
05-29 11:44:00.011 5392-5392/org.cocos2dx.mygame I/Timeline: Timeline: Activity_idle id: android.os.BinderProxy@3adfd51c time:9134260
--------- beginning of crash
05-29 11:44:00.249 5392-5392/org.cocos2dx.mygame A/libc: Fatal signal 11 (SIGSEGV), code 1, fault addr 0x30 in tid 5392 (