Sdkbox sdkbox::JNIUtils issue

Hi @yinjimmy @slackmoehrle we are seeing tons of the issue below in GP console, can you guys please help us fix it? Thank you!

cocos2d-x 3.17.2
sdkbox 2.6.0.1

Huawei 荣耀平板5 (HWAGS2), 4096MB RAM, Android 8.0
Report 1

*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
pid: 0, tid: 0 >>> com.foo.game <<<

backtrace:
  #00  pc 000000000006a808  /system/lib64/libc.so (tgkill+8)
  #01  pc 000000000001db50  /system/lib64/libc.so (abort+88)
  #02  pc 00000000004380d0  /system/lib64/libart.so (art::Runtime::Abort(char const*)+528)
  #03  pc 00000000004387e0  /system/lib64/libart.so (art::Runtime::Aborter(char const*)+24)
  #04  pc 0000000000523e58  /system/lib64/libart.so (android::base::LogMessage::~LogMessage()+900)
  #05  pc 0000000000463bd8  /system/lib64/libart.so (art::Thread::AssertNoPendingException() const+1144)
  #06  pc 0000000000127e88  /system/lib64/libart.so (art::ClassLinker::FindClass(art::Thread*, char const*, art::Handle<art::mirror::ClassLoader>)+64)
  #07  pc 0000000000311020  /system/lib64/libart.so (art::JNI::FindClass(_JNIEnv*, char const*)+1432)
  #08  pc 000000000084e3bc  /data/app/com.foo.game-x06g_848xcub0FHrrWYxnQ==/lib/arm64/libMyGame.so (sdkbox::JNIUtils::GetClassObjectFromName(char const*, _JNIEnv*)+48)
  #09  pc 000000000084e924  /data/app/com.foo.game-x06g_848xcub0FHrrWYxnQ==/lib/arm64/libMyGame.so (sdkbox::JNIUtils::GetJNIStaticMethodInfo(char const*, char const*, char const*, _JNIEnv*)+56)
  #10  pc 000000000084ada0  /data/app/com.foo.game-x06g_848xcub0FHrrWYxnQ==/lib/arm64/libMyGame.so (sdkbox::SdkboxCore::isGooglePlayServicesAvailable()+136)
  #11  pc 00000000008366b8  /data/app/com.foo.game-x06g_848xcub0FHrrWYxnQ==/lib/arm64/libMyGame.so
  #12  pc 0000000000833ed8  /data/app/com.foo.game-x06g_848xcub0FHrrWYxnQ==/lib/arm64/libMyGame.so (sdkbox::SdkboxCore::sessionStart()+280)
  #13  pc 0000000000833f8c  /data/app/com.foo.game-x06g_848xcub0FHrrWYxnQ==/lib/arm64/libMyGame.so (sdkbox::SdkboxCore::onStart()+36)
  #14  pc 00000000000cb0e0  /data/app/com.foo.game-x06g_848xcub0FHrrWYxnQ==/oat/arm64/base.odex (offset 0x65000)

@htlxyz plz take a look.

1 Like

I guess it is thread issue.
https://android.googlesource.com/platform/art/+/d5e4ac0abdeeb4dc13bd05a40bf496299a787536/runtime/thread.cc#1007

Any way to fix it?

Failed to find java class in JNI. Have you confused the class under com.sdkbox?

AssertNoPendingException, is there a more detailed log, before this error occurred?

We are also facing the same issue. It seems to be happening only in Huawei devices

@htlxyz I don’t have more details beside the logs above from Google Play Console.

Have you tested it on huawei pad.

Don’t have a huawei device to test. I will check with some online simulators

Saw this too and could be related to the above crash. This is also happening on Huawei pad


pid: 0, tid: 0 >>> com.tectumgames.unblock <<<

backtrace:
#00 pc 0000000000022988 /system/lib64/libc.so (abort+116)
#00 pc 000000000047a8a8 /system/lib64/libart.so (art::Runtime::Abort(char const*)+1196)
#00 pc 0000000000008d20 /system/lib64/libbase.so (android::base::LogMessage::~LogMessage()+800)
#00 pc 00000000004aaca8 /system/lib64/libart.so (art::thread::AssertNoPendingException() const+1152)
#00 pc 0000000000120940 /system/lib64/libart.so (art::ClassLinker::FindClass(art::Thread*, char const*, art::Handleart::mirror::ClassLoader)+64)
#00 pc 000000000013af38 /system/lib64/libart.so (art::ClassLinker::DoResolveType(art::dex::TypeIndex, art::Handleart::mirror::DexCache, art::Handleart::mirror::ClassLoader)+188)
#00 pc 00000000004d5058 /system/lib64/libart.so (art::verifier::MethodVerifier::ScanTryCatchBlocks()+504)
#00 pc 00000000004d226c /system/lib64/libart.so (art::verifier::MethodVerifier::Verify()+684)
#00 pc 00000000004d4b28 /system/lib64/libart.so (art::verifier::MethodVerifier::FindLocksAtDexPc()+140)
#00 pc 00000000004d4a10 /system/lib64/libart.so (art::verifier::MethodVerifier::FindLocksAtDexPc(art::ArtMethod*, unsigned int, std::__1::vector<art::verifier::MethodVerifier::DexLockInfo, std::__1::allocatorart::verifier::MethodVerifier::DexLockInfo>)+524)
#00 pc 00000000003c488c /system/lib64/libart.so (art::Monitor::VisitLocks(art::StackVisitor
, void ()(art::mirror::Object, void*), void*, bool)+812)
#00 pc 00000000004b41e8 /system/lib64/libart.so (art::MonitorObjectsStackVisitor::VisitFrame()+164)
#00 pc 00000000004944c0 /system/lib64/libart.so (void art::StackVisitor::WalkStack<(art::StackVisitor::CountTransitions)0>(bool)+1644)
#00 pc 00000000004a9aa0 /system/lib64/libart.so (art::thread::DumpJavaStack(std::__1::basic_ostream<char, std::__1::char_traits>&, bool, bool) const+320)
#00 pc 00000000004a5b7c /system/lib64/libart.so (art::thread::DumpStack(std::__1::basic_ostream<char, std::__1::char_traits>&, bool, BacktraceMap*, bool) const+376)
#00 pc 00000000004bf780 /system/lib64/libart.so (art::DumpCheckpoint::Run(art::Thread*)+844)
#00 pc 00000000004b88d0 /system/lib64/libart.so (art::ThreadList::RunCheckpoint(art::Closure*, art::Closure*)+1464)
#00 pc 00000000004b7774 /system/lib64/libart.so (art::ThreadList::Dump(std::__1::basic_ostream<char, std::__1::char_traits>&, bool)+500)
#00 pc 000000000047a580 /system/lib64/libart.so (art::Runtime::Abort(char const*)+388)
#00 pc 0000000000008d20 /system/lib64/libbase.so (android::base::LogMessage::~LogMessage()+800)
#00 pc 00000000004aaca8 /system/lib64/libart.so (art::thread::AssertNoPendingException() const+1152)
#00 pc 0000000000120940 /system/lib64/libart.so (art::ClassLinker::FindClass(art::Thread*, char const*, art::Handleart::mirror::ClassLoader)+64)
#00 pc 000000000032e8f8 /system/lib64/libart.so (art::JNI::FindClass(_JNIEnv*, char const*)+1268)
#00 pc 0000000000766898 /data/app/com.tectumgames.unblock-m8l6pohyhQg4XrMrdh-BUA==/split_config.arm64_v8a.apk (offset 0x1000) (sdkbox::JNIUtils::GetClassObjectFromName(char const*, _JNIEnv*)+48)
#00 pc 0000000000766e00 /data/app/com.tectumgames.unblock-m8l6pohyhQg4XrMrdh-BUA==/split_config.arm64_v8a.apk (offset 0x1000) (sdkbox::JNIUtils::GetJNIStaticMethodInfo(char const*, char const*, char const*, _JNIEnv*)+56)
#00 pc 0000000000762198 /data/app/com.tectumgames.unblock-m8l6pohyhQg4XrMrdh-BUA==/split_config.arm64_v8a.apk (offset 0x1000) (void sdkbox::JNIInvokeStatic<void, std::__ndk1::basic_string<char, std::__ndk1::char_traits, std::__ndk1::allocator > >(char const*, char const*, std::__ndk1::basic_string<char, std::__ndk1::char_traits, std::__ndk1::allocator >)+64)
#00 pc 0000000000763248 /data/app/com.tectumgames.unblock-m8l6pohyhQg4XrMrdh-BUA==/split_config.arm64_v8a.apk (offset 0x1000) (sdkbox::SdkboxCore::sendPlatformTrackingRequest(std::__ndk1::basic_string<char, std::__ndk1::char_traits, std::__ndk1::allocator> const&) const+92)
#00 pc 0000000000752440 /data/app/com.tectumgames.unblock-m8l6pohyhQg4XrMrdh-BUA==/split_config.arm64_v8a.apk (offset 0x1000) (sdkbox::Tracking::__trackMessageImpl(std::__ndk1::basic_string<char, std::__ndk1::char_traits, std::__ndk1::allocator> const&) const+176)
#00 pc 0000000000753454 /data/app/com.tectumgames.unblock-m8l6pohyhQg4XrMrdh-BUA==/split_config.arm64_v8a.apk (offset 0x1000)
#00 pc 0000000000755e58 /data/app/com.tectumgames.unblock-m8l6pohyhQg4XrMrdh-BUA==/split_config.arm64_v8a.apk (offset 0x1000) (sdkbox::Tracking::trackPeriodicEvent(long long)+1332)
#00 pc 00000000000b53f8 /data/app/com.tectumgames.unblock-m8l6pohyhQg4XrMrdh-BUA==/oat/arm64/base.odex (offset 0xb4000) (com.sdkbox.services.TrackingLocalStorage.periodicTrackRequest+152)
#00 pc 000000000056f24c /system/lib64/libart.so (art_quick_invoke_static_stub+604)
#00 pc 00000000000d4224 /system/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+232)
#00 pc 0000000000283fa8 /system/lib64/libart.so (art::interpreter::ArtInterpreterToCompiledCodeBridge(art::Thread*, art::ArtMethod*, art::ShadowFrame*, unsigned short, art::JValue*)+344)
#00 pc 000000000027dfb0 /system/lib64/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+968)
#00 pc 000000000053ff9c /system/lib64/libart.so (MterpInvokeStatic+204)
#00 pc 0000000000561794 /system/lib64/libart.so (ExecuteMterpImpl+14612)
#00 pc 0000000000187a14 /data/app/com.tectumgames.unblock-m8l6pohyhQg4XrMrdh-BUA==/oat/arm64/base.vdex (com.sdkbox.services.TrackingLocalStorage.access$100)
#00 pc 0000000000257cb4 /system/lib64/libart.so (art::interpreter::Execute(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame&, art::JValue, bool) (.llvm.3465030293)+488)
#00 pc 000000000025d7a8 /system/lib64/libart.so (art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame*, art::JValue*)+216)
#00 pc 000000000027df94 /system/lib64/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+940)
#00 pc 000000000053ff9c /system/lib64/libart.so (MterpInvokeStatic+204)
#00 pc 0000000000561794 /system/lib64/libart.so (ExecuteMterpImpl+14612)
#00 pc 0000000000187950 /data/app/com.tectumgames.unblock-m8l6pohyhQg4XrMrdh-BUA==/oat/arm64/base.vdex (com.sdkbox.services.TrackingLocalStorage$PeriodicTrackingAsyncTask$1.run+8)
#00 pc 0000000000257cb4 /system/lib64/libart.so (art::interpreter::Execute(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame&, art::JValue, bool) (.llvm.3465030293)+488)
#00 pc 000000000052aa88 /system/lib64/libart.so (artQuickToInterpreterBridge+1020)
#00 pc 00000000005780fc /system/lib64/libart.so (art_quick_to_interpreter_bridge+92)
#00 pc 0000000000b9a358 /system/framework/arm64/boot-framework.oat (offset 0x415000) (android.opengl.GLSurfaceView$GLThread.guardedRun+2488)
#00 pc 0000000000b9b990 /system/framework/arm64/boot-framework.oat (offset 0x415000) (android.opengl.GLSurfaceView$GLThread.run+224)
#00 pc 000000000056ef88 /system/lib64/libart.so (art_quick_invoke_stub+584)
#00 pc 00000000000d4204 /system/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+200)
#00 pc 0000000000472fd4 /system/lib64/libart.so (art::(anonymous namespace)::InvokeWithArgArray(art::ScopedObjectAccessAlreadyRunnable const&, art::ArtMethod*, art::(anonymous namespace)::ArgArray*, art::JValue*, char const*)+104)
#00 pc 0000000000474090 /system/lib64/libart.so (art::InvokeVirtualOrInterfaceWithJValues(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, _jmethodID*, jvalue*)+424)
#00 pc 000000000049f684 /system/lib64/libart.so (art::thread::CreateCallback(void*)+1120)
#00 pc 0000000000083588 /system/lib64/libc.so (__pthread_start(void*)+36)
#00 pc 00000000000241dc /system/lib64/libc.so (__start_thread+68)

thank you very much.

now, the crash just can reproduce on huawei device?

can you share me a project which will carsh on huawei?