Unity mobile game crashes on Android - android

Unity game is crashing on some androids. After a few minutes game starts lagging and then crashes. Here is Stack trace from Google Play Console, does someone know how to fix that?
*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
pid: 0, tid: 0 >>> com.MAPSGames.FingerEscape <<<
backtrace:
#00 pc 0x0000000000051b7c /apex/com.android.runtime/lib64/bionic/libc.so (abort+168)
#01 pc 0x00000000006d157c /apex/com.android.art/lib64/libart.so (art::Runtime::Abort(char const*)+668)
#02 pc 0x000000000001695c /apex/com.android.art/lib64/libbase.so (android::base::SetAborter(std::__1::function<void (char const*)>&&)::$_3::__invoke(char const*)+76)
#03 pc 0x0000000000015f8c /apex/com.android.art/lib64/libbase.so (android::base::LogMessage::~LogMessage()+364)
#04 pc 0x00000000002857ec /apex/com.android.art/lib64/libart.so (art::JavaVMExt::AddGlobalRef(art::Thread*, art::ObjPtr<art::mirror::Object>)+1924)
#05 pc 0x000000000059add0 /apex/com.android.art/lib64/libart.so (art::JNI<false>::NewGlobalRef(_JNIEnv*, _jobject*)+272)
#06 pc 0x0000000002586cfc /data/app/~~TWASomDJJoLgoJ0Ii_lylw==/com.google.android.trichromelibrary_524912634-mVCqI3Yv_FjomGEuf0ULyQ==/base.apk!libmonochrome_64.so
#07 pc 0x00000000025869fc /data/app/~~TWASomDJJoLgoJ0Ii_lylw==/com.google.android.trichromelibrary_524912634-mVCqI3Yv_FjomGEuf0ULyQ==/base.apk!libmonochrome_64.so
#08 pc 0x0000000003799f0c /data/app/~~TWASomDJJoLgoJ0Ii_lylw==/com.google.android.trichromelibrary_524912634-mVCqI3Yv_FjomGEuf0ULyQ==/base.apk!libmonochrome_64.so
#09 pc 0x0000000004a0367c /data/app/~~TWASomDJJoLgoJ0Ii_lylw==/com.google.android.trichromelibrary_524912634-mVCqI3Yv_FjomGEuf0ULyQ==/base.apk!libmonochrome_64.so
#10 pc 0x0000000004a03614 /data/app/~~TWASomDJJoLgoJ0Ii_lylw==/com.google.android.trichromelibrary_524912634-mVCqI3Yv_FjomGEuf0ULyQ==/base.apk!libmonochrome_64.so (Java_J_N_MLlibBXh+28)
#11 pc 0x0000000000180b14 /data/app/~~5n5gC1GuTVMuUN0apQKPDA==/com.google.android.webview-uUIe4oNpEtr-Yp44RGU08w==/oat/arm64/base.odex (art_jni_trampoline+116)
#12 pc 0x00000000003221b0 /data/app/~~5n5gC1GuTVMuUN0apQKPDA==/com.google.android.webview-uUIe4oNpEtr-Yp44RGU08w==/oat/arm64/base.odex (org.chromium.base.JavaExceptionReporter.uncaughtException+80)
#13 pc 0x000000000020aec4 /apex/com.android.art/lib64/libart.so (nterp_helper+7636)
#14 pc 0x00000000000ec490 /apex/com.android.art/javalib/core-oj.jar (java.lang.ThreadGroup.uncaughtException+28)
#15 pc 0x000000000020a044 /apex/com.android.art/lib64/libart.so (nterp_helper+3924)
#16 pc 0x00000000000ec47c /apex/com.android.art/javalib/core-oj.jar (java.lang.ThreadGroup.uncaughtException+8)
#17 pc 0x000000000020ae64 /apex/com.android.art/lib64/libart.so (nterp_helper+7540)
#18 pc 0x00000000000ed702 /apex/com.android.art/javalib/core-oj.jar (java.lang.Thread.dispatchUncaughtException+30)
#19 pc 0x00000000002ca764 /apex/com.android.art/lib64/libart.so (art_quick_invoke_stub+548)
#20 pc 0x0000000000430030 /apex/com.android.art/lib64/libart.so (art::JValue art::InvokeVirtualOrInterfaceWithVarArgs<art::ArtMethod*>(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, art::ArtMethod*, std::__va_list)+880)
#21 pc 0x00000000005ab80c /apex/com.android.art/lib64/libart.so (art::JNI<false>::CallVoidMethodV(_JNIEnv*, _jobject*, _jmethodID*, std::__va_list)+300)
#22 pc 0x000000000045b87c /apex/com.android.art/lib64/libart.so (_JNIEnv::CallVoidMethod(_jobject*, _jmethodID*, ...)+120)
#23 pc 0x000000000045b2e0 /apex/com.android.art/lib64/libart.so (art::Thread::HandleUncaughtExceptions(art::ScopedObjectAccessAlreadyRunnable&)+216)
#24 pc 0x00000000004594cc /apex/com.android.art/lib64/libart.so (art::Thread::Destroy()+456)
#25 pc 0x00000000004587a8 /apex/com.android.art/lib64/libart.so (art::ThreadList::Unregister(art::Thread*)+132)
#26 pc 0x00000000003da814 /apex/com.android.art/lib64/libart.so (art::Runtime::DetachCurrentThread()+128)
#27 pc 0x000000000058fccc /apex/com.android.art/lib64/libart.so (art::JII::DetachCurrentThread(_JavaVM*)+48)
#28 pc 0x00000000000c71b8 /system/lib64/libandroid_runtime.so (android::AndroidRuntime::start(char const*, android::Vector<android::String8> const&, bool)+984)
#29 pc 0x00000000000025a8 /system/bin/app_process64 (main+1360)
#30 pc 0x000000000004a040 /apex/com.android.runtime/lib64/bionic/libc.so (__libc_init+100)

Related

Unity, Android: a lot of crashes on devices with PowerVR GPU

Unity 2020.3.41. The problematic GPU models are GE8320, GE8322 and GE8100. The most crashable devices are Xiaomi Redmi 6A, Redmi 9C, Redmi 9A, realme C21.
Some stacktraces:
1 (Google Play Console):
*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
pid: 0, tid: 0 >>> com.fruitshake.fairyrpg <<<
backtrace:
#00 pc 0x0000000002691b1c /data/app/~~glJ5zj2YuTXCLtOwQQBW9Q==/com.google.android.trichromelibrary_530409130-5JNvmPvdeqWxll114AWxEQ==/base.apk!libmonochrome.so
#01 pc 0x0000000000dbe585 /data/app/~~glJ5zj2YuTXCLtOwQQBW9Q==/com.google.android.trichromelibrary_530409130-5JNvmPvdeqWxll114AWxEQ==/base.apk!libmonochrome.so
#02 pc 0x000000000327bfc5 /data/app/~~glJ5zj2YuTXCLtOwQQBW9Q==/com.google.android.trichromelibrary_530409130-5JNvmPvdeqWxll114AWxEQ==/base.apk!libmonochrome.so
#03 pc 0x0000000002e02caf /data/app/~~glJ5zj2YuTXCLtOwQQBW9Q==/com.google.android.trichromelibrary_530409130-5JNvmPvdeqWxll114AWxEQ==/base.apk!libmonochrome.so
#04 pc 0x0000000002e384ed /data/app/~~glJ5zj2YuTXCLtOwQQBW9Q==/com.google.android.trichromelibrary_530409130-5JNvmPvdeqWxll114AWxEQ==/base.apk!libmonochrome.so
#05 pc 0x0000000002e387c7 /data/app/~~glJ5zj2YuTXCLtOwQQBW9Q==/com.google.android.trichromelibrary_530409130-5JNvmPvdeqWxll114AWxEQ==/base.apk!libmonochrome.so
#06 pc 0x0000000002e4c1db /data/app/~~glJ5zj2YuTXCLtOwQQBW9Q==/com.google.android.trichromelibrary_530409130-5JNvmPvdeqWxll114AWxEQ==/base.apk!libmonochrome.so
#07 pc 0x0000000002e4c18d /data/app/~~glJ5zj2YuTXCLtOwQQBW9Q==/com.google.android.trichromelibrary_530409130-5JNvmPvdeqWxll114AWxEQ==/base.apk!libmonochrome.so
#08 pc 0x0000000002e4c147 /data/app/~~glJ5zj2YuTXCLtOwQQBW9Q==/com.google.android.trichromelibrary_530409130-5JNvmPvdeqWxll114AWxEQ==/base.apk!libmonochrome.so
#09 pc 0x0000000001db285f /data/app/~~glJ5zj2YuTXCLtOwQQBW9Q==/com.google.android.trichromelibrary_530409130-5JNvmPvdeqWxll114AWxEQ==/base.apk!libmonochrome.so
#10 pc 0x0000000000dc5969 /data/app/~~glJ5zj2YuTXCLtOwQQBW9Q==/com.google.android.trichromelibrary_530409130-5JNvmPvdeqWxll114AWxEQ==/base.apk!libmonochrome.so
#11 pc 0x0000000000dc5ab5 /data/app/~~glJ5zj2YuTXCLtOwQQBW9Q==/com.google.android.trichromelibrary_530409130-5JNvmPvdeqWxll114AWxEQ==/base.apk!libmonochrome.so
#12 pc 0x0000000001db285f /data/app/~~glJ5zj2YuTXCLtOwQQBW9Q==/com.google.android.trichromelibrary_530409130-5JNvmPvdeqWxll114AWxEQ==/base.apk!libmonochrome.so
#13 pc 0x0000000000dc5d87 /data/app/~~glJ5zj2YuTXCLtOwQQBW9Q==/com.google.android.trichromelibrary_530409130-5JNvmPvdeqWxll114AWxEQ==/base.apk!libmonochrome.so
#14 pc 0x0000000000dc61e7 /data/app/~~glJ5zj2YuTXCLtOwQQBW9Q==/com.google.android.trichromelibrary_530409130-5JNvmPvdeqWxll114AWxEQ==/base.apk!libmonochrome.so
#15 pc 0x0000000000dbd899 /data/app/~~glJ5zj2YuTXCLtOwQQBW9Q==/com.google.android.trichromelibrary_530409130-5JNvmPvdeqWxll114AWxEQ==/base.apk!libmonochrome.so
#16 pc 0x0000000000dbca73 /data/app/~~glJ5zj2YuTXCLtOwQQBW9Q==/com.google.android.trichromelibrary_530409130-5JNvmPvdeqWxll114AWxEQ==/base.apk!libmonochrome.so
#17 pc 0x0000000000dc267b /data/app/~~glJ5zj2YuTXCLtOwQQBW9Q==/com.google.android.trichromelibrary_530409130-5JNvmPvdeqWxll114AWxEQ==/base.apk!libmonochrome.so
#18 pc 0x0000000000db7983 /data/app/~~glJ5zj2YuTXCLtOwQQBW9Q==/com.google.android.trichromelibrary_530409130-5JNvmPvdeqWxll114AWxEQ==/base.apk!libmonochrome.so
#19 pc 0x00000000000024cd /system/lib/libwebviewchromium_plat_support.so (android::(anonymous namespace)::draw_gl(int, void*, android::uirenderer::DrawGlInfo const&)+228)
#20 pc 0x0000000000160b13 /system/lib/libhwui.so (android::uirenderer::WebViewFunctor::drawGl(android::uirenderer::DrawGlInfo const&)+34)
#21 pc 0x0000000000142539 /system/lib/libhwui.so (android::uirenderer::skiapipeline::GLFunctorDrawable::onDraw(SkCanvas*)+1720)
#22 pc 0x00000000001b8401 /system/lib/libhwui.so (SkDrawable::draw(SkCanvas*, SkMatrix const*)+44)
#23 pc 0x00000000003e0c2f /system/lib/libhwui.so (SkGpuDevice::drawDrawable(SkDrawable*, SkMatrix const*, SkCanvas*)+206)
#24 pc 0x0000000000113cb9 /system/lib/libhwui.so (android::uirenderer::skiapipeline::RenderNodeDrawable::drawContent(SkCanvas*) const+1020)
#25 pc 0x0000000000114523 /system/lib/libhwui.so (android::uirenderer::skiapipeline::RenderNodeDrawable::onDraw(SkCanvas*)+198)
#26 pc 0x000000000012a249 /system/lib/libhwui.so (android::uirenderer::$_24::__invoke(void const*, SkCanvas*, SkMatrix const&)+44)
#27 pc 0x0000000000113ced /system/lib/libhwui.so (android::uirenderer::skiapipeline::RenderNodeDrawable::drawContent(SkCanvas*) const+1072)
#28 pc 0x0000000000114523 /system/lib/libhwui.so (android::uirenderer::skiapipeline::RenderNodeDrawable::onDraw(SkCanvas*)+198)
#29 pc 0x000000000012a249 /system/lib/libhwui.so (android::uirenderer::$_24::__invoke(void const*, SkCanvas*, SkMatrix const&)+44)
#30 pc 0x0000000000113cd5 /system/lib/libhwui.so (android::uirenderer::skiapipeline::RenderNodeDrawable::drawContent(SkCanvas*) const+1048)
#31 pc 0x0000000000114523 /system/lib/libhwui.so (android::uirenderer::skiapipeline::RenderNodeDrawable::onDraw(SkCanvas*)+198)
#32 pc 0x000000000012a249 /system/lib/libhwui.so (android::uirenderer::$_24::__invoke(void const*, SkCanvas*, SkMatrix const&)+44)
#33 pc 0x0000000000113ced /system/lib/libhwui.so (android::uirenderer::skiapipeline::RenderNodeDrawable::drawContent(SkCanvas*) const+1072)
#34 pc 0x0000000000114523 /system/lib/libhwui.so (android::uirenderer::skiapipeline::RenderNodeDrawable::onDraw(SkCanvas*)+198)
#35 pc 0x000000000012a249 /system/lib/libhwui.so (android::uirenderer::$_24::__invoke(void const*, SkCanvas*, SkMatrix const&)+44)
#36 pc 0x0000000000113cd5 /system/lib/libhwui.so (android::uirenderer::skiapipeline::RenderNodeDrawable::drawContent(SkCanvas*) const+1048)
#37 pc 0x0000000000114523 /system/lib/libhwui.so (android::uirenderer::skiapipeline::RenderNodeDrawable::onDraw(SkCanvas*)+198)
#38 pc 0x000000000012a249 /system/lib/libhwui.so (android::uirenderer::$_24::__invoke(void const*, SkCanvas*, SkMatrix const&)+44)
#39 pc 0x0000000000113ced /system/lib/libhwui.so (android::uirenderer::skiapipeline::RenderNodeDrawable::drawContent(SkCanvas*) const+1072)
#40 pc 0x0000000000114523 /system/lib/libhwui.so (android::uirenderer::skiapipeline::RenderNodeDrawable::onDraw(SkCanvas*)+198)
#41 pc 0x000000000012a249 /system/lib/libhwui.so (android::uirenderer::$_24::__invoke(void const*, SkCanvas*, SkMatrix const&)+44)
#42 pc 0x0000000000113cd5 /system/lib/libhwui.so (android::uirenderer::skiapipeline::RenderNodeDrawable::drawContent(SkCanvas*) const+1048)
#43 pc 0x0000000000114523 /system/lib/libhwui.so (android::uirenderer::skiapipeline::RenderNodeDrawable::onDraw(SkCanvas*)+198)
#44 pc 0x00000000001475c7 /system/lib/libhwui.so (android::uirenderer::skiapipeline::SkiaPipeline::renderFrameImpl(SkRect const&, std::__1::vector<android::sp<android::uirenderer::RenderNode>, std::__1::allocator<android::sp<android::uirenderer::RenderNode> > > const&, bool, android::uirenderer::Rect const&, SkCanvas*, SkMatrix const&)+474)
#45 pc 0x00000000001472df /system/lib/libhwui.so (android::uirenderer::skiapipeline::SkiaPipeline::renderFrame(android::uirenderer::LayerUpdateQueue const&, SkRect const&, std::__1::vector<android::sp<android::uirenderer::RenderNode>, std::__1::allocator<android::sp<android::uirenderer::RenderNode> > > const&, bool, android::uirenderer::Rect const&, sk_sp<SkSurface>, SkMatrix const&)+94)
#46 pc 0x00000000001451bd /system/lib/libhwui.so (android::uirenderer::skiapipeline::SkiaOpenGLPipeline::draw(android::uirenderer::renderthread::Frame const&, SkRect const&, SkRect const&, android::uirenderer::LightGeometry const&, android::uirenderer::LayerUpdateQueue*, android::uirenderer::Rect const&, bool, android::uirenderer::LightInfo const&, std::__1::vector<android::sp<android::uirenderer::RenderNode>, std::__1::allocator<android::sp<android::uirenderer::RenderNode> > > const&, android::uirenderer::FrameInfoVisualizer*)+272)
#47 pc 0x000000000014bb11 /system/lib/libhwui.so (android::uirenderer::renderthread::CanvasContext::draw()+976)
#48 pc 0x000000000014d3db /system/lib/libhwui.so (_ZNSt3__110__function6__funcIZN7android10uirenderer12renderthread13DrawFrameTask11postAndWaitEvE3$_0NS_9allocatorIS6_EEFvvEEclEv$c303f2d2360db58ed70a2d0ac7ed911b+458)
#49 pc 0x000000000014059f /system/lib/libhwui.so (android::uirenderer::WorkQueue::process()+162)
#50 pc 0x00000000001573b9 /system/lib/libhwui.so (android::uirenderer::renderthread::RenderThread::threadLoop()+72)
#51 pc 0x000000000000ee95 /system/lib/libutils.so (android::Thread::_threadLoop(void*)+168)
#52 pc 0x000000000000e9dd /system/lib/libutils.so (thread_data_t::trampoline(thread_data_t const*)+256)
#53 pc 0x00000000000aacf3 /apex/com.android.runtime/lib/bionic/libc.so (__pthread_start(void*)+40)
#54 pc 0x0000000000064063 /apex/com.android.runtime/lib/bionic/libc.so (__start_thread+30)
2 (Firebase):
Crashed: Thread: SIGSEGV 0x0000000000000000
#00 pc 0x142bb0 libGLESv2_mtk.so
#01 pc 0x854d5 libGLESv2_mtk.so
#02 pc 0x3222a libGLESv2_mtk.so
#03 pc 0x27a44 libGLESv2_mtk.so
#04 pc 0x2e861 libGLESv2_mtk.so
#05 pc 0xbb2b2 libc.so
I know that the stacktraces are very obscure but I have no idea on how to make them more readable. I have uploaded my app's symbols to Firebase and Google Play.
There's a similar thread on Unity's forum.
If you have any idea on how to solve or research the issue, please help!
It's solvable via drawing 1x1px (this helped me, at least) rectangle with different color every frame. As described in Unity's thread:
florianpenzkofer: The root cause is a bug in the PowerVR driver where draw calls that the driver optimizes out leak some memory. That memory bufffer has a fixed size per framebuffer (RenderTexture) and running out of that memory causes the crash. A single draw call that is not optimized out reclaims the leaked memory, so this only leads to a problem if all draws to the same framebuffer (across multiple frames) are redundant.
Driver can't optimize this "random" draw call every frame.
Second option is to create native render plugin, there's example plugin at unity's repo. You'll need to cull glFlush, as stated in previous answer:
In our experiments it helps to call glFinish roughly every 1000 frames (or more often but it‘s expensive because it stalls the GPU).
You could try that using a native rendering plugin.
We got some more information about when affected drivers leak some memory that causes this. We will look into that to maybe come up with a better workaround.

signal 11 (SIGSEGV), code 1 (SEGV_MAPERR) from /system/lib/libhwui.so

This issue arises from the android run time.
Any idea what this is ?
I am using native code here which plays an audio file in the background. When I just start to play around with the ui of the app this issue pops up.
The app works fine in android 7 but breaks on android 10 specially on samsung devices.
*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
Build fingerprint: 'google/sdk_gphone_x86/generic_x86:10/QSR1.191030.002/5978551:userdebug/dev-keys'
Revision: '0'
ABI: 'x86'
Timestamp: 2020-02-19 00:21:31+0530
pid: 10918, tid: 10933, name: ReferenceQueueD >>> com.myapp.beta <<<
uid: 10133
signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0xbe04dbc0
eax be04dbbc ebx f1f2f9ac ecx 70bc7ba8 edx 00000000
edi 12f0fb10 esi df165880
ebp cc0d15e8 esp cc0d15d0 eip f1976406
backtrace:
#00 pc 001f1406 /system/lib/libhwui.so (SkPaint::~SkPaint()+150) (BuildId: 10d1e316b7aa14d35052a448bd944fde)
#01 pc 002dbd74 /system/lib/libhwui.so (android::Paint::~Paint()+52) (BuildId: 10d1e316b7aa14d35052a448bd944fde)
#02 pc 00162bd5 /system/lib/libandroid_runtime.so (android::PaintGlue::deletePaint(android::Paint*)+37) (BuildId: 6ceb9761bceb97a18c92f8a4b7072247)
#03 pc 0003601e /apex/com.android.runtime/lib/libjavacore.so (NativeAllocationRegistry_applyFreeFunction(_JNIEnv*, _jclass*, long long, long long)+30) (BuildId: 688305bcfab3d72450178332b5c29bc2)
#04 pc 0004e652 /system/framework/x86/boot-core-libart.oat (art_jni_trampoline+178) (BuildId: 6e90a1c34e5945941f1d1cb9bac9218325a4cd49)
#05 pc 0203d82a /memfd:/jit-cache (deleted) (libcore.util.NativeAllocationRegistry$CleanerThunk.run+122)
#06 pc 0209a2cc /memfd:/jit-cache (deleted) (sun.misc.Cleaner.clean+92)
#07 pc 020a77bf /memfd:/jit-cache (deleted) (java.lang.ref.ReferenceQueue.enqueueLocked+239)
#08 pc 020aabae /memfd:/jit-cache (deleted) (java.lang.ref.ReferenceQueue.enqueuePending+174)
#09 pc 0013e9a2 /apex/com.android.runtime/lib/libart.so (art_quick_invoke_static_stub+418) (BuildId: a0a062684495092d1756e30ba2dff37d)
#10 pc 00149a7a /apex/com.android.runtime/lib/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+298) (BuildId: a0a062684495092d1756e30ba2dff37d)
#11 pc 00332502 /apex/com.android.runtime/lib/libart.so (art::interpreter::ArtInterpreterToCompiledCodeBridge(art::Thread*, art::ArtMethod*, art::ShadowFrame*, unsigned short, art::JValue*)+386) (BuildId: a0a062684495092d1756e30ba2dff37d)
#12 pc 0032c19c /apex/com.android.runtime/lib/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+988) (BuildId: a0a062684495092d1756e30ba2dff37d)
#13 pc 00684d03 /apex/com.android.runtime/lib/libart.so (MterpInvokeStatic+643) (BuildId: a0a062684495092d1756e30ba2dff37d)
#14 pc 001389a1 /apex/com.android.runtime/lib/libart.so (mterp_op_invoke_static+33) (BuildId: a0a062684495092d1756e30ba2dff37d)
#15 pc 001b4104 /apex/com.android.runtime/javalib/core-libart.jar (java.lang.Daemons$ReferenceQueueDaemon.runInternal+52)
#16 pc 00681adc /apex/com.android.runtime/lib/libart.so (MterpInvokeVirtual+1612) (BuildId: a0a062684495092d1756e30ba2dff37d)
#17 pc 00138821 /apex/com.android.runtime/lib/libart.so (mterp_op_invoke_virtual+33) (BuildId: a0a062684495092d1756e30ba2dff37d)
#18 pc 001b382e /apex/com.android.runtime/javalib/core-libart.jar (java.lang.Daemons$Daemon.run+50)
#19 pc 006837bc /apex/com.android.runtime/lib/libart.so (MterpInvokeInterface+1980) (BuildId: a0a062684495092d1756e30ba2dff37d)
#20 pc 00138a21 /apex/com.android.runtime/lib/libart.so (mterp_op_invoke_interface+33) (BuildId: a0a062684495092d1756e30ba2dff37d)
#21 pc 000ea918 /apex/com.android.runtime/javalib/core-oj.jar (java.lang.Thread.run+8)
#22 pc 002f8e0a /apex/com.android.runtime/lib/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadERKNS_20CodeItemDataAccessorERNS_11ShadowFrameENS_6JValueEbb.llvm.6689468213397061768+298) (BuildId: a0a062684495092d1756e30ba2dff37d)
#23 pc 002ffcc5 /apex/com.android.runtime/lib/libart.so (art::interpreter::EnterInterpreterFromEntryPoint(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame*)+181) (BuildId: a0a062684495092d1756e30ba2dff37d)
#24 pc 0066fbd9 /apex/com.android.runtime/lib/libart.so (artQuickToInterpreterBridge+1209) (BuildId: a0a062684495092d1756e30ba2dff37d)
#25 pc 0014503d /apex/com.android.runtime/lib/libart.so (art_quick_to_interpreter_bridge+77) (BuildId: a0a062684495092d1756e30ba2dff37d)
#26 pc 0013e7d2 /apex/com.android.runtime/lib/libart.so (art_quick_invoke_stub+338) (BuildId: a0a062684495092d1756e30ba2dff37d)
#27 pc 00149a69 /apex/com.android.runtime/lib/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+281) (BuildId: a0a062684495092d1756e30ba2dff37d)
#28 pc 0055a513 /apex/com.android.runtime/lib/libart.so (art::(anonymous namespace)::InvokeWithArgArray(art::ScopedObjectAccessAlreadyRunnable const&, art::ArtMethod*, art::(anonymous namespace)::ArgArray*, art::JValue*, char const*)+99) (BuildId: a0a062684495092d1756e30ba2dff37d)
#29 pc 0055b91a /apex/com.android.runtime/lib/libart.so (art::InvokeVirtualOrInterfaceWithJValues(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, _jmethodID*, jvalue const*)+474) (BuildId: a0a062684495092d1756e30ba2dff37d)
#30 pc 005aaa51 /apex/com.android.runtime/lib/libart.so (art::Thread::CreateCallback(void*)+1585) (BuildId: a0a062684495092d1756e30ba2dff37d)
#31 pc 0011a8e5 /apex/com.android.runtime/lib/bionic/libc.so (__pthread_start(void*)+53) (BuildId: 76290498408016ad14f4b98c3ab6c65c)
#32 pc 000af6a7 /apex/com.android.runtime/lib/bionic/libc.so (__start_thread+71) (BuildId: 76290498408016ad14f4b98c3ab6c65c)

Android 7.1 and 7 Native Crash: libc.so tgkill+12

I'm seeing this native crash with the following stack trace.
I have checked other questions similar to this but doesn't found anything similar solution as I have not used TextureView or CardView and I am also sure that it is not due to any library dependencies.
Can anyone have clue, Please?
#00 pc 000000000004ae30 /system/lib/libc.so (tgkill+12)
#01 pc 00000000000485c3 /system/lib/libc.so (pthread_kill+34)
#02 pc 000000000001de5d /system/lib/libc.so (raise+10)
#03 pc 0000000000019561 /system/lib/libc.so (__libc_android_abort+34)
#04 pc 00000000000171a0 /system/lib/libc.so (abort+4)
#05 pc 000000000031e8fd /system/lib/libart.so (_ZN3art7Runtime5AbortEPKc+328)
#06 pc 00000000000b56d7 /system/lib/libart.so (_ZN3art10LogMessageD2Ev+1134)
#07 pc 00000000001be831 /system/lib/libart.so (_ZN3art22IndirectReferenceTable3AddEjPNS_6mirror6ObjectE+308)
#08 pc 000000000023c917 /system/lib/libart.so (_ZN3art9JavaVMExt16AddWeakGlobalRefEPNS_6ThreadEPNS_6mirror6ObjectE+46)
#09 pc 00000000002822ef /system/lib/libart.so (_ZN3art3JNI16NewWeakGlobalRefEP7_JNIEnvP8_jobject+418)
#10 pc 0000000000090abb /system/lib/libandroid_runtime.so
#11 pc 00000000029950cd /system/framework/arm/boot-framework.oat (android.view.RenderNode.nCreate+96)
#12 pc 0000000002994e23 /system/framework/arm/boot-framework.oat (android.view.RenderNode.<init>+70)
#13 pc 0000000002994f91 /system/framework/arm/boot-framework.oat (android.view.RenderNode.create+68)
#14 pc 00000000027526e3 /system/framework/arm/boot-framework.oat (android.view.View.<init>+750)
#15 pc 0000000002752a57 /system/framework/arm/boot-framework.oat (android.view.View.<init>+66)
#16 pc 0000000002a6d831 /system/framework/arm/boot-framework.oat (android.widget.TextView.<init>+148)
#17 pc 0000000002a6d765 /system/framework/arm/boot-framework.oat (android.widget.TextView.<init>+64)
#18 pc 0000000002a6d6f1 /system/framework/arm/boot-framework.oat (android.widget.TextView.<init>+60)
#19 pc 0000000002a6d683 /system/framework/arm/boot-framework.oat (android.widget.TextView.<init>+46)
#20 pc 000000000003bd5b /dev/ashmem/dalvik-jit-code-cache_17678_17678 (deleted)

Crash on android 9(presumably on close socket)

I have a couple of crash in google developer console on android 9 devices with backtrace:
#00 pc 0000000000021974 /system/lib64/libc.so (abort+116)
#01 pc 0000000000456cac /system/lib64/libart.so (art::Runtime::Abort(char const*)+1064)
#02 pc 0000000000008cd4 /system/lib64/libbase.so (android::base::LogMessage::~LogMessage()+724)
#03 pc 00000000002df9bc /system/lib64/libart.so (art::JavaVMExt::JniAbort(char const*, char const*)+1516)
#04 pc 0000000000348400 /system/lib64/libart.so (art::JNI::GetIntField(_JNIEnv*, _jobject*, _jfieldID*)+160)
#05 pc 000000000001e14c /system/lib64/libopenjdk.so (FileDispatcherImpl_preClose0+24)
#06 pc 000000000011562c /system/framework/arm64/boot.oat (java.lang.System.setErr0 [DEDUPED]+172)
#07 pc 00000000002ea4d4 /system/framework/arm64/boot.oat (sun.nio.ch.DatagramDispatcher.preClose [DEDUPED]+52)
#08 pc 0000000000448714 /system/framework/arm64/boot.oat (sun.nio.ch.SocketChannelImpl.implCloseSelectableChannel+180)
#09 pc 000000000043dd44 /system/framework/arm64/boot.oat (java.nio.channels.spi.AbstractSelectableChannel.implCloseChannel+52)
#10 pc 00000000003fde60 /system/framework/arm64/boot.oat (java.nio.channels.spi.AbstractInterruptibleChannel.close+128)
#11 pc 0000000000447d1c /system/framework/arm64/boot.oat (sun.nio.ch.SocketChannelImpl.finalize+92)
#12 pc 0000000000182654 /system/framework/arm64/boot-core-libart.oat (java.lang.Daemons$FinalizerDaemon.doFinalize+100)
#13 pc 00000000001828dc /system/framework/arm64/boot-core-libart.oat (java.lang.Daemons$FinalizerDaemon.runInternal+492)
#14 pc 000000000011084c /system/framework/arm64/boot-core-libart.oat (java.lang.Daemons$Daemon.run+76)
#15 pc 000000000025cfc8 /system/framework/arm64/boot.oat (java.lang.Thread.run+72)
#16 pc 0000000000545b88 /system/lib64/libart.so (art_quick_invoke_stub+584)
#17 pc 00000000000cf698 /system/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+200)
#18 pc 000000000044f524 /system/lib64/libart.so (art::(anonymous namespace)::InvokeWithArgArray(art::ScopedObjectAccessAlreadyRunnable const&, art::ArtMethod*, art::(anonymous namespace)::ArgArray*, art::JValue*, char const*)+104)
#19 pc 00000000004505f0 /system/lib64/libart.so (art::InvokeVirtualOrInterfaceWithJValues(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, _jmethodID*, jvalue*)+424)
#20 pc 000000000047ae10 /system/lib64/libart.so (art::Thread::CreateCallback(void*)+1260)
#21 pc 0000000000082264 /system/lib64/libc.so (__pthread_start(void*)+36)
#22 pc 0000000000023178 /system/lib64/libc.so (__start_thread+68)
I can't reproduce this on my own environments.
Application specific: it works with an external device. After connecting to wifi network app tries to connect to device via raw socket(via Apache MINA).
Do you have any idea about reasons(steps to reproduce) of that crash?

Android Pie: signal 11 (SIGSEGV), code 1 (SEGV_MAPERR) android::Theme::ApplyStyle(unsigned int, bool)

I am receiving the crash mentioned in the title in my play console
It present only on Android Pie and limited to Pixel XL (marlin) and Pixel (sailfish) devices
I have no idea what is causing it as I don't have anyway to reproduce this issue.
Here is the stack trace
*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
pid: 0, tid: 0 >>> sample.package.name <<<
backtrace:
#00 pc 0000000000026bcc /system/lib64/libandroidfw.so (android::Theme::ApplyStyle(unsigned int, bool)+472)
#01 pc 000000000012c080 /system/lib64/libandroid_runtime.so (android::NativeThemeApplyStyle(_JNIEnv*, _jclass*, long, long, int, unsigned char)+92)
#02 pc 00000000003d16d0 /system/framework/arm64/boot-framework.oat (android.content.res.AssetManager.nativeThemeApplyStyle [DEDUPED]+176)
#03 pc 00000000007bd0a4 /system/framework/arm64/boot-framework.oat (android.content.res.AssetManager.applyStyleToTheme+116)
#04 pc 00000000007c6918 /system/framework/arm64/boot-framework.oat (android.content.res.ResourcesImpl$ThemeImpl.rebase+232)
#05 pc 00000000007cc3a4 /system/framework/arm64/boot-framework.oat (android.content.res.ResourcesImpl.newThemeImpl+228)
#06 pc 00000000007c5fcc /system/framework/arm64/boot-framework.oat (android.content.res.Resources.setImpl+412)
#07 pc 00000000007733ac /system/framework/arm64/boot-framework.oat (android.app.ResourcesManager.updateResourcesForActivity+1916)
#08 pc 000000000087a780 /system/framework/arm64/boot-framework.oat (android.app.ActivityThread.performActivityConfigurationChanged+912)
#09 pc 000000000087ac2c /system/framework/arm64/boot-framework.oat (android.app.ActivityThread.performConfigurationChangedForActivity+220)
#10 pc 000000000087f9fc /system/framework/arm64/boot-framework.oat (android.app.ActivityThread.handleActivityConfigurationChanged+444)
#11 pc 0000000000a75450 /system/framework/arm64/boot-framework.oat (android.app.servertransaction.ActivityConfigurationChangeItem.execute+128)
#12 pc 000000000077b7f4 /system/framework/arm64/boot-framework.oat (android.app.servertransaction.TransactionExecutor.executeCallbacks+708)
#13 pc 000000000077b4b8 /system/framework/arm64/boot-framework.oat (android.app.servertransaction.TransactionExecutor.execute+280)
#14 pc 000000000086d9f4 /system/framework/arm64/boot-framework.oat (android.app.ActivityThread$H.handleMessage+308)
#15 pc 0000000000aaa594 /system/framework/arm64/boot-framework.oat (android.os.Handler.dispatchMessage+180)
#16 pc 0000000000aad690 /system/framework/arm64/boot-framework.oat (android.os.Looper.loop+1264)
#17 pc 000000000087a358 /system/framework/arm64/boot-framework.oat (android.app.ActivityThread.main+664)
#18 pc 000000000056064c /system/lib64/libart.so (art_quick_invoke_static_stub+604)
#19 pc 00000000000cf6d8 /system/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+232)
#20 pc 00000000004661e4 /system/lib64/libart.so (art::(anonymous namespace)::InvokeWithArgArray(art::ScopedObjectAccessAlreadyRunnable const&, art::ArtMethod*, art::(anonymous namespace)::ArgArray*, art::JValue*, char const*)+104)
#21 pc 0000000000467d38 /system/lib64/libart.so (art::InvokeMethod(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, _jobject*, _jobject*, unsigned long)+1440)
#22 pc 00000000003f6728 /system/lib64/libart.so (art::Method_invoke(_JNIEnv*, _jobject*, _jobject*, _jobjectArray*)+52)
#23 pc 000000000011e6d4 /system/framework/arm64/boot.oat (java.lang.Class.getDeclaredMethodInternal [DEDUPED]+180)
#24 pc 0000000000be3a78 /system/framework/arm64/boot-framework.oat (com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run+136)
#25 pc 0000000000beac60 /system/framework/arm64/boot-framework.oat (com.android.internal.os.ZygoteInit.main+3088)
#26 pc 000000000056064c /system/lib64/libart.so (art_quick_invoke_static_stub+604)
#27 pc 00000000000cf6d8 /system/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+232)
#28 pc 00000000004661e4 /system/lib64/libart.so (art::(anonymous namespace)::InvokeWithArgArray(art::ScopedObjectAccessAlreadyRunnable const&, art::ArtMethod*, art::(anonymous namespace)::ArgArray*, art::JValue*, char const*)+104)
#29 pc 0000000000465de8 /system/lib64/libart.so (art::InvokeWithVarArgs(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, _jmethodID*, std::__va_list)+424)
#30 pc 0000000000368494 /system/lib64/libart.so (art::JNI::CallStaticVoidMethodV(_JNIEnv*, _jclass*, _jmethodID*, std::__va_list)+652)
#31 pc 00000000000b1cb4 /system/lib64/libandroid_runtime.so (_JNIEnv::CallStaticVoidMethod(_jclass*, _jmethodID*, ...)+136)
#32 pc 00000000000b4640 /system/lib64/libandroid_runtime.so (android::AndroidRuntime::start(char const*, android::Vector<android::String8> const&, bool)+752)
#33 pc 000000000000219c /system/bin/app_process64 (main+1200)
#34 pc 00000000000b05d8 /system/lib64/libc.so (__libc_init+88)
Any pointers as to what might be causing this issue would be appreciated. Thanks.
What I can point out from here is that you're using a custom theme that is not supported on a real device. Happens to me so many time that the bug doesn't happen on the emulator but on actual device. I suggest to test the build with a real device (with latest android , as well as the previous two or three versions), before moving to production.
this is coming from AppCompatActivity.setTheme().
the native stack-trace without the least code makes it difficult to determine if this is caused by either:
android.support.v7.app.AppCompatActivity
androidx.appcompat.app.AppCompatActivity
migrating to androidx.appcompat might be an option - or migrating back to android.support.v7.
also, trying another theme might be worth a try - or simply not setting the theme on marlin & sailfish.

Categories

Resources