SDKBox AdMob Crash

SDKBox AdMob Crash
0

Bit long. This is what I am getting as exception.

@nite Please help me on this.

07-06 14:13:46.583 4688-4749/in.firstseed.breakpots A/art: art/runtime/check_jni.cc:65] JNI DETECTED ERROR IN APPLICATION: thread Thread[23,tid=4749,Native,Thread*=0xb78f55c0,peer=0x12c34090,"GLThread 9837"] using JNIEnv* from thread Thread[29,tid=4779,Runnable,Thread*=0xb7c72f20,peer=0x12f35520,"pool-2-thread-2"]
07-06 14:13:46.583 4688-4749/in.firstseed.breakpots A/art: art/runtime/check_jni.cc:65]     in call to GetStringUTFChars
07-06 14:13:46.583 4688-4749/in.firstseed.breakpots A/art: art/runtime/check_jni.cc:65]     from void com.sdkbox.jnibridge.NativeBridge.emitNative(long, java.lang.String, java.lang.Object)
07-06 14:13:46.583 4688-4749/in.firstseed.breakpots A/art: art/runtime/check_jni.cc:65] "GLThread 9837" prio=5 tid=23 Runnable
07-06 14:13:46.583 4688-4749/in.firstseed.breakpots A/art: art/runtime/check_jni.cc:65]   | group="main" sCount=0 dsCount=0 obj=0x12c34090 self=0xb78f55c0
07-06 14:13:46.583 4688-4749/in.firstseed.breakpots A/art: art/runtime/check_jni.cc:65]   | sysTid=4749 nice=0 cgrp=apps sched=0/0 handle=0xb78fa9e8
07-06 14:13:46.583 4688-4749/in.firstseed.breakpots A/art: art/runtime/check_jni.cc:65]   | state=R schedstat=( 0 0 0 ) utm=2209 stm=277 core=1 HZ=100
07-06 14:13:46.583 4688-4749/in.firstseed.breakpots A/art: art/runtime/check_jni.cc:65]   | stack=0xa5318000-0xa531a000 stackSize=1036KB
07-06 14:13:46.583 4688-4749/in.firstseed.breakpots A/art: art/runtime/check_jni.cc:65]   | held mutexes= "mutator lock"(shared held)
07-06 14:13:46.583 4688-4749/in.firstseed.breakpots A/art: art/runtime/check_jni.cc:65]   native: #00 pc 00004f60  /system/lib/libbacktrace_libc++.so (UnwindCurrent::Unwind(unsigned int, ucontext*)+23)
07-06 14:13:46.583 4688-4749/in.firstseed.breakpots A/art: art/runtime/check_jni.cc:65]   native: #01 pc 00003665  /system/lib/libbacktrace_libc++.so (Backtrace::Unwind(unsigned int, ucontext*)+8)
07-06 14:13:46.583 4688-4749/in.firstseed.breakpots A/art: art/runtime/check_jni.cc:65]   native: #02 pc 00256ad1  /system/lib/libart.so (art::DumpNativeStack(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, int, char const*, art::mirror::ArtMethod*)+84)
07-06 14:13:46.583 4688-4749/in.firstseed.breakpots A/art: art/runtime/check_jni.cc:65]   native: #03 pc 00239687  /system/lib/libart.so (art::Thread::Dump(std::__1::basic_ostream<char, std::__1::char_traits<char> >&) const+158)
07-06 14:13:46.583 4688-4749/in.firstseed.breakpots A/art: art/runtime/check_jni.cc:65]   native: #04 pc 000b1a2b  /system/lib/libart.so (art::JniAbort(char const*, char const*)+610)
07-06 14:13:46.583 4688-4749/in.firstseed.breakpots A/art: art/runtime/check_jni.cc:65]   native: #05 pc 000b2165  /system/lib/libart.so (art::JniAbortF(char const*, char const*, ...)+68)
07-06 14:13:46.583 4688-4749/in.firstseed.breakpots A/art: art/runtime/check_jni.cc:65]   native: #06 pc 000b5387  /system/lib/libart.so (art::ScopedCheck::ScopedCheck(_JNIEnv*, int, char const*)+1194)
07-06 14:13:46.583 4688-4749/in.firstseed.breakpots A/art: art/runtime/check_jni.cc:65]   native: #07 pc 000be325  /system/lib/libart.so (art::CheckJNI::GetStringUTFChars(_JNIEnv*, _jstring*, unsigned char*)+44)
07-06 14:13:46.583 4688-4749/in.firstseed.breakpots A/art: art/runtime/check_jni.cc:65]   native: #08 pc 001a1cdd  /data/app/in.firstseed.breakpots-1/lib/arm/libcocos2dcpp.so (sdkbox::JNIUtils::NewStringFromJString(_jstring*, _JNIEnv*)+52)
07-06 14:13:46.583 4688-4749/in.firstseed.breakpots A/art: art/runtime/check_jni.cc:65]   native: #09 pc 001a0f3f  /data/app/in.firstseed.breakpots-1/lib/arm/libcocos2dcpp.so (_ZN6sdkbox15JNIInvokeStaticISsIEEET_PKcS3_DpT0_+86)
07-06 14:13:46.583 4688-4749/in.firstseed.breakpots A/art: art/runtime/check_jni.cc:65]   native: #10 pc 001a1035  /data/app/in.firstseed.breakpots-1/lib/arm/libcocos2dcpp.so (sdkbox::SdkboxCore::getLongitude() const+12)
07-06 14:13:46.583 4688-4749/in.firstseed.breakpots A/art: art/runtime/check_jni.cc:65]   native: #11 pc 0019d731  /data/app/in.firstseed.breakpots-1/lib/arm/libcocos2dcpp.so (sdkbox::Tracking::getDefaultPairs() const+548)
07-06 14:13:46.583 4688-4749/in.firstseed.breakpots A/art: art/runtime/check_jni.cc:65]   native: #12 pc 0019d8fb  /data/app/in.firstseed.breakpots-1/lib/arm/libcocos2dcpp.so (sdkbox::Tracking::getDefaultPairs(std::string const&, std::string const&) const+14)
07-06 14:13:46.583 4688-4749/in.firstseed.breakpots A/art: art/runtime/check_jni.cc:65]   native: #13 pc 0019d99d  /data/app/in.firstseed.breakpots-1/lib/arm/libcocos2dcpp.so (sdkbox::Tracking::trackEvent(std::string const&, std::string const&, std::string const&, sdkbox::Json const&) const+28)
07-06 14:13:46.583 4688-4749/in.firstseed.breakpots A/art: art/runtime/check_jni.cc:65]   native: #14 pc 0017ace4  /data/app/in.firstseed.breakpots-1/lib/arm/libcocos2dcpp.so (sdkbox::PluginSdkboxAdsNativeBridgeAdObserver::operator()(std::string const&, _jobject*)+712)
07-06 14:13:46.583 4688-4749/in.firstseed.breakpots A/art: art/runtime/check_jni.cc:65]   native: #15 pc 001768e8  /data/app/in.firstseed.breakpots-1/lib/arm/libcocos2dcpp.so (std::_Function_handler<void (std::string const&, _jobject*), sdkbox::PluginSdkboxAdsNativeBridgeAdObserver>::_M_invoke(std::_Any_data const&, std::string const&, _jobject*)+80)
07-06 14:13:46.583 4688-4749/in.firstseed.breakpots A/art: art/runtime/check_jni.cc:65]   native: #16 pc 001a2fdb  /data/app/in.firstseed.breakpots-1/lib/arm/libcocos2dcpp.so (Java_com_sdkbox_jnibridge_NativeBridge_emitNative+42)
07-06 14:13:46.583 4688-4749/in.firstseed.breakpots A/art: art/runtime/check_jni.cc:65]   native: #17 pc 00288867  /data/dalvik-cache/arm/data@app@in.firstseed.breakpots-1@base.apk@classes.dex (Java_com_sdkbox_jnibridge_NativeBridge_emitNative__JLjava_lang_String_2Ljava_lang_Object_2+146)
07-06 14:13:46.583 4688-4749/in.firstseed.breakpots A/art: art/runtime/check_jni.cc:65]   at com.sdkbox.jnibridge.NativeBridge.emitNative(Native method)
07-06 14:13:46.583 4688-4749/in.firstseed.breakpots A/art: art/runtime/check_jni.cc:65]   at com.sdkbox.jnibridge.NativeBridge.emit(NativeBridge.java:62)
07-06 14:13:46.583 4688-4749/in.firstseed.breakpots A/art: art/runtime/check_jni.cc:65]   - locked <0x2adfff8d> (a java.lang.Object)
07-06 14:13:46.583 4688-4749/in.firstseed.breakpots A/art: art/runtime/check_jni.cc:65]   at com.sdkbox.plugin.PluginSdkboxAds.onPlayAdResult(PluginSdkboxAds.java:390)
07-06 14:13:46.583 4688-4749/in.firstseed.breakpots A/art: art/runtime/check_jni.cc:65]   at com.sdkbox.plugin.AbstractAdUnit.notifyPlayAdResult(AbstractAdUnit.java:60)
07-06 14:13:46.583 4688-4749/in.firstseed.breakpots A/art: art/runtime/check_jni.cc:65]   at com.sdkbox.plugin.PluginAdMobUnitListener$4.run(PluginAdMobUnitListener.java:45)
07-06 14:13:46.583 4688-4749/in.firstseed.breakpots A/art: art/runtime/check_jni.cc:65]   at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1462)
07-06 14:13:46.583 4688-4749/in.firstseed.breakpots A/art: art/runtime/check_jni.cc:65]   at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1239)

Is there any sample code that we can look at?

JNI DETECTED ERROR IN APPLICATION: GetStringUTFChars
07-08 15:05:59.372 23737-23916/in.firstseed.breakpots A/art: art/runtime/check_jni.cc:65] from void com.sdkbox.jnibridge.NativeBridge.emitNative(long, java.lang.String, java.lang.Object)

Can you use this information to tell me something?

I am having the same issue. Made a test project with sdkboxads and a couple plugin add providers. Add providers worked fine on their own, but sdkboxads crashes the app every time an add is displayed (Android only). Tried removing the sdkboxads plugin but to no avail, Android still tries to load the plugin, fails and then crashes.

I must be missing something, will update when I have more info.

EDIT:
I managed to recreate the crash.
Fresh project created with Cocos Studio 3.1.0
(ios build pass, android build pass)

sdkbox import sdkboxads
call to sdkbox::PluginSdkboxAds::init(); in the main scene
(ios build pass, android build pass)

sdkbox import inmobi
(ios build pass, android build pass)
crashes when the first banner is presented

We will be investigating this issue and will update you as soon as there is a finding.
Thanks, Ryan

Can you show me the plugins’ version ?

sdkbox info

@firstseed

JNI DETECTED ERROR IN APPLICATION: 

thread Thread[23,tid=4749,Native,Thread*=0xb78f55c0,peer=0x12c34090,"GLThread 9837"] using JNIEnv* from 
thread Thread[29,tid=4779,Runnable,Thread*=0xb7c72f20,peer=0x12f35520,"pool-2-thread-2"]

Seems using JNIEnv* from another thread.
Thanks for your report.

v1.0.0.14

Sorry for late reply

I’m having the same problem (among others). TL;DR: on iOS everything works. On Android the app crashes on SdkboxAds plugin loading, or after displaying a test ad from AdColony, or before displaying an AdMob interstitial ad. Sometimes an ad is shown, I clse it, the game continues and the next ad makes the game to crash (happens with both AdColony and AdMob).

I need to release the game this week, so maybe I’ll do it first on iOS and see if I can fix Android crashes…

My sdkbox info:

 Copyright (c) 2015 SDKBOX Inc. v1.0.0.15
 installed packages:
     v2.2.5.3 sdkboxads
     v2.2.5.3 admob
     v2.2.5.3 adcolony
     v2.2.5.3 googleplayservices

My project uses Cocos2d-x 3.9


Edit: This is my last NDK crash dump:

********** Crash dump: **********
Build fingerprint: 'lge/g3_global_com/g3:6.0/MRA58K/160421432533f:user/release-keys'
pid: 10259, tid: 10278, name: GLThread 16994  >>> com.studioseventiles.tappytiki <<<
signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0
Stack frame #00 pc 006c2120  /data/app/com.studioseventiles.tappytiki-1/lib/arm/libcocos2dcpp.so (sdkbox::PluginSdkboxAdsNativeBridgeAdObserver::operator()(std::string const&, _jobject*)+447)
Stack frame #01 pc 006cf0c3  /data/app/com.studioseventiles.tappytiki-1/lib/arm/libcocos2dcpp.so (Java_com_sdkbox_jnibridge_NativeBridge_emitNative+42)
Stack frame #02 pc 00bc2dc3  /data/app/com.studioseventiles.tappytiki-1/oat/arm/base.odex (offset 0x79c000) (void com.sdkbox.jnibridge.NativeBridge.emitNative(long, java.lang.String, java.lang.Object)+142)
Stack frame #03 pc 00bc2629  /data/app/com.studioseventiles.tappytiki-1/oat/arm/base.odex (offset 0x79c000) (void com.sdkbox.jnibridge.NativeBridge$1.run()+684)
Stack frame #04 pc 03d9089d  /system/framework/arm/boot.oat (offset 0x2a71000)

Something to do with SdkboxAds plugin’s JNI code? I always see this symbol on crash reports: Java_com_sdkbox_jnibridge_NativeBridge_emitNative
or this one:
sdkbox::PluginSdkboxAdsNativeBridgeAdObserver::operator()(std::string const&, _jobject*)

Hi,

could you please send me a logcat capture from the app start to the end of the crash dump ?
It is hard to figure out what the issue can be w/o a wider stack.
Thanks,

  • i

Sure! Here it is (extension changed from txt to cpp because this forum won’t allow to upload txt files):

log.cpp (27.9 KB)

Also, this crash dump:

Breakpad_microdump.cpp (32.6 KB)

The log message PLAY AGAIN BUTTON is when the user presses the replay button on Game Over, which triggers the sdkbox::PluginSdkboxAds::placement("placement-1"); and after the ad, the game scene is reloaded.

Every time I try, I can successfully play a game, then on Game Over I press the PLAY AGAIN BUTTON and the first ad is shown (I’m trying AdMob right now, but AdColony behaved similarly). Then the scene is reloaded and I play another game. The player dies, the Game Over is shown and I press again the PLAY AGAIN BUTTON. The ad shows, I close it and the crash happens.

As I said before, this is only happening on Android version. iOS version works like a charm!
Cocos2d-x 3.9, SDKBOX v1.0.0.15, v2.2.5.3 sdkboxads, v2.2.5.3 admob, v2.2.5.3 googleplayservices

@iPruch thanks for the info. We will try to repro this and let you know asap.

1 Like

@firstseed can you test with http://discuss.cocos2d-x.org/uploads/default/14434/44bce6845d89728f.zip

Thank you !
Jimmy