Related
I'm trying to get the Sony Stock Camera from their tama devices working on Android 12.
I'm getting the following backtrace:
*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
Build fingerprint: 'Sony/H8324/H8324:10/52.1.A.3.49/052001A003004902006556692:user/release-keys'
Revision: '0'
ABI: 'arm64'
Timestamp: 2022-08-16 20:04:11.168778323+0200
Process uptime: 0s
Cmdline: com.sonyericsson.android.camera
pid: 3646, tid: 3678, name: ImageReader >>> com.sonyericsson.android.camera <<<
uid: 10133
signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0
Cause: null pointer dereference
x0 0000007c7081b5d0 x1 0000007ee0a7f7cc x2 0000000000000000 x3 0000000000000010
x4 0000000000000000 x5 0000007bce6a9fa8 x6 0000007f020ff000 x7 0000000000001ac8
x8 0000007eebfefa38 x9 0000007eebfb6d00 x10 0000007eebfefa28 x11 000000007081b5e8
x12 0000ffff00000eff x13 00000000db4450c6 x14 003b7c4575e22800 x15 0000e787a5a92f54
x16 0000007ef28a97f8 x17 0000007ee09e4c78 x18 0000007bce16e000 x19 ffffffff9d042408
x20 0000007da07ef240 x21 00000000ce6aa260 x22 0000000000000000 x23 0000007bce6ab000
x24 0000007c4d808d00 x25 0000007bce6aa470 x26 0000007bce6aa484 x27 0000007bce6aa470
x28 0000007bce6aa360 x29 0000007bce6aa210
lr 0000007eebfac2b8 sp 0000007bce6aa200 pc 0000007eebfac2dc pst 0000000060000000
backtrace:
#00 pc 00000000000e22dc /system/lib64/libgui.so (android::Surface::Surface(android::sp<android::IGraphicBufferProducer> const&, bool, android::sp<android::IBinder> const&)+128) (BuildId: 5f0e35ac67a320ebbf7dbfedaba3b4f3)
#01 pc 000000000000103c /system/system_ext/lib64/libgui_shim.so (android::Surface::Surface(android::sp<android::IGraphicBufferProducer> const&, bool)+40) (BuildId: f763096071886df8dfce73855c765827)
#02 pc 0000000000011eb4 /system/lib64/libimageprocessorjni.so (BypassCameraBurstBufferManager_initializeSurface+216) (BuildId: c3128a7b0c9351c6fe96247d3e3c35b7)
#03 pc 000000000000e8c4 /system/lib64/libimageprocessorjni.so (BypassCameraPhoto_prepareSnapshot+84) (BuildId: c3128a7b0c9351c6fe96247d3e3c35b7)
#04 pc 000000000000c580 /system/lib64/libimageprocessorjni.so (Java_com_sonymobile_imageprocessor_bypasscamera2_BypassCamera_nativeRequestPrepareSnapshot+24) (BuildId: c3128a7b0c9351c6fe96247d3e3c35b7)
#05 pc 0000000000222244 /apex/com.android.art/lib64/libart.so (art_quick_generic_jni_trampoline+148) (BuildId: 143d4d521718f1d1b0005e86eb8ae170)
#06 pc 0000000000212b80 /apex/com.android.art/lib64/libart.so (nterp_helper+5648) (BuildId: 143d4d521718f1d1b0005e86eb8ae170)
#07 pc 000000000068c7bc /system/priv-app/SemcCameraUI-xxhdpi-release/SemcCameraUI-xxhdpi-release.apk (com.sonymobile.imageprocessor.bypasscamera2.BypassCamera.requestPrepareSnapshot+4)
#08 pc 00000000002124c4 /apex/com.android.art/lib64/libart.so (nterp_helper+3924) (BuildId: 143d4d521718f1d1b0005e86eb8ae170)
#09 pc 00000000005c3c84 /system/priv-app/SemcCameraUI-xxhdpi-release/SemcCameraUI-xxhdpi-release.apk (com.sonyericsson.android.camera.device.BypassCameraController.requestPrepareSnapshot+184)
#10 pc 00000000002124c4 /apex/com.android.art/lib64/libart.so (nterp_helper+3924) (BuildId: 143d4d521718f1d1b0005e86eb8ae170)
#11 pc 00000000005c2b28 /system/priv-app/SemcCameraUI-xxhdpi-release/SemcCameraUI-xxhdpi-release.apk (com.sonyericsson.android.camera.device.BypassCameraController.access$5400+0)
#12 pc 00000000002115a4 /apex/com.android.art/lib64/libart.so (nterp_helper+52) (BuildId: 143d4d521718f1d1b0005e86eb8ae170)
#13 pc 00000000005c0652 /system/priv-app/SemcCameraUI-xxhdpi-release/SemcCameraUI-xxhdpi-release.apk (com.sonyericsson.android.camera.device.BypassCameraController$1.run+474)
#14 pc 0000000000519190 /system/framework/arm64/boot-framework.oat (android.os.Handler.dispatchMessage+80) (BuildId: 37e0b9b91b95ea25a00d76a0661686229fcf1085)
#15 pc 000000000051c08c /system/framework/arm64/boot-framework.oat (android.os.Looper.loopOnce+1148) (BuildId: 37e0b9b91b95ea25a00d76a0661686229fcf1085)
#16 pc 000000000051bb74 /system/framework/arm64/boot-framework.oat (android.os.Looper.loop+516) (BuildId: 37e0b9b91b95ea25a00d76a0661686229fcf1085)
#17 pc 000000000051b058 /system/framework/arm64/boot-framework.oat (android.os.HandlerThread.run+536) (BuildId: 37e0b9b91b95ea25a00d76a0661686229fcf1085)
#18 pc 0000000000218964 /apex/com.android.art/lib64/libart.so (art_quick_invoke_stub+548) (BuildId: 143d4d521718f1d1b0005e86eb8ae170)
#19 pc 0000000000284208 /apex/com.android.art/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+188) (BuildId: 143d4d521718f1d1b0005e86eb8ae170)
#20 pc 000000000061fab0 /apex/com.android.art/lib64/libart.so (art::JValue art::InvokeVirtualOrInterfaceWithJValues<art::ArtMethod*>(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, art::ArtMethod*, jvalue const*)+460) (BuildId: 143d4d521718f1d1b0005e86eb8ae170)
#21 pc 000000000066e674 /apex/com.android.art/lib64/libart.so (art::Thread::CreateCallback(void*)+1184) (BuildId: 143d4d521718f1d1b0005e86eb8ae170)
#22 pc 00000000000b1810 /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+264) (BuildId: 6bfaf10f10e5ff343703efae2f1bdbdb)
#23 pc 00000000000512f0 /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+64) (BuildId: 6bfaf10f10e5ff343703efae2f1bdbdb)
Since libimageprocessorjni.so is closed source and there's no updated lib which matches the new Surface constructor I had to create a shim:
#include <cutils/log.h>
#include <gui/IGraphicBufferProducer.h>
#define LOG_TAG "libgui_shim"
extern "C" void _ZN7android7SurfaceC1ERKNS_2spINS_22IGraphicBufferProducerEEEbRKNS1_INS_7IBinderEEE(
const android::sp<android::IGraphicBufferProducer>& bufferProducer, bool controlledByApp = false,
const android::sp<android::IBinder>& surfaceControlHandle = nullptr);
extern "C" void _ZN7android7SurfaceC1ERKNS_2spINS_22IGraphicBufferProducerEEEb(
const android::sp<android::IGraphicBufferProducer>& bufferProducer, bool controlledByApp) {
if (bufferProducer == nullptr) {
ALOGE("bufferProducer == nullptr");
}
_ZN7android7SurfaceC1ERKNS_2spINS_22IGraphicBufferProducerEEEbRKNS1_INS_7IBinderEEE(bufferProducer, controlledByApp);
}
As you can see I've already tried to figure out where the null pointer happens exactly (It isn't bufferProducer because there's no bufferProducer == nullptr in the log).
I don't think it's the surfaceControlHandle but the method definition in my shim exactly matches the one from libgui: https://android.googlesource.com/platform/frameworks/native/+/refs/tags/android-12.1.0_r22/libs/gui/include/gui/Surface.h#93
Running addr2line is not that helpful either:
$ aarch64-linux-android-addr2line -e libgui.so -s -f -C 00000000000e22dc
aarch64-linux-android-addr2line: libgui.so: don't know how to handle section `.relr.dyn' [0x 13]
sp
StrongPointer.h:273
Checking StrongPointer.h at line 273 (https://android.googlesource.com/platform/system/core/+/refs/tags/android-12.1.0_r22/libutils/include/utils/StrongPointer.h#273) I can see that other must be NULL.
Is there any convenient way to find out what other is and how to solve my null pointer dereference?
EDIT: The partial output from stack by reading in the tombstone as described here:
Stack Trace:
RELADDR FUNCTION FILE:LINE
v--------------> android::sp<android::IGraphicBufferProducer>::sp(android::sp<android::IGraphicBufferProducer> const&) system/core/libutils/include/utils/StrongPointer.h:273
00000000000e22dc android::Surface::Surface(android::sp<android::IGraphicBufferProducer> const&, bool, android::sp<android::IBinder> const&)+128 frameworks/native/libs/gui/Surface.cpp:67
000000000000103c android::Surface::Surface(android::sp<android::IGraphicBufferProducer> const&, bool)+40 device/sony/tama-common/libshims/gui_shim.cpp:10 (discriminator 2)
0000000000011eb4 BypassCameraBurstBufferManager_initializeSurface+216) (BuildId: c3128a7b0c9351c6fe96247d3e3c35b7 /system/lib64/libimageprocessorjni.so
000000000000e8c4 BypassCameraPhoto_prepareSnapshot+84) (BuildId: c3128a7b0c9351c6fe96247d3e3c35b7 /system/lib64/libimageprocessorjni.so
000000000000c580 Java_com_sonymobile_imageprocessor_bypasscamera2_BypassCamera_nativeRequestPrepareSnapshot+24) (BuildId: c3128a7b0c9351c6fe96247d3e3c35b7 /system/lib64/libimageprocessorjni.so
0000000000222244 art_quick_generic_jni_trampoline+148) (BuildId: 143d4d521718f1d1b0005e86eb8ae170 /apex/com.android.art/lib64/libart.so
0000000000212b80 nterp_helper+5648) (BuildId: 143d4d521718f1d1b0005e86eb8ae170 /apex/com.android.art/lib64/libart.so
000000000068c7bc com.sonymobile.imageprocessor.bypasscamera2.BypassCamera.requestPrepareSnapshot+4 /system/priv-app/SemcCameraUI-xxhdpi-release/SemcCameraUI-xxhdpi-release.apk
00000000002124c4 nterp_helper+3924) (BuildId: 143d4d521718f1d1b0005e86eb8ae170 /apex/com.android.art/lib64/libart.so
00000000005c3c84 com.sonyericsson.android.camera.device.BypassCameraController.requestPrepareSnapshot+184 /system/priv-app/SemcCameraUI-xxhdpi-release/SemcCameraUI-xxhdpi-release.apk
00000000002124c4 nterp_helper+3924) (BuildId: 143d4d521718f1d1b0005e86eb8ae170 /apex/com.android.art/lib64/libart.so
00000000005c2b28 com.sonyericsson.android.camera.device.BypassCameraController.access$5400+0 /system/priv-app/SemcCameraUI-xxhdpi-release/SemcCameraUI-xxhdpi-release.apk
00000000002115a4 nterp_helper+52) (BuildId: 143d4d521718f1d1b0005e86eb8ae170 /apex/com.android.art/lib64/libart.so
00000000005c0652 com.sonyericsson.android.camera.device.BypassCameraController$1.run+474 /system/priv-app/SemcCameraUI-xxhdpi-release/SemcCameraUI-xxhdpi-release.apk
0000000000519190 android.os.Handler.dispatchMessage+80) (BuildId: 37e0b9b91b95ea25a00d76a0661686229fcf1085 /system/framework/arm64/boot-framework.oat
000000000051c08c android.os.Looper.loopOnce+1148) (BuildId: 37e0b9b91b95ea25a00d76a0661686229fcf1085 /system/framework/arm64/boot-framework.oat
000000000051bb74 android.os.Looper.loop+516) (BuildId: 37e0b9b91b95ea25a00d76a0661686229fcf1085 /system/framework/arm64/boot-framework.oat
000000000051b058 android.os.HandlerThread.run+536) (BuildId: 37e0b9b91b95ea25a00d76a0661686229fcf1085 /system/framework/arm64/boot-framework.oat
0000000000218964 art_quick_invoke_stub+548) (BuildId: 143d4d521718f1d1b0005e86eb8ae170 /apex/com.android.art/lib64/libart.so
0000000000284208 art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+188) (BuildId: 143d4d521718f1d1b0005e86eb8ae170 /apex/com.android.art/lib64/libart.so
000000000061fab0 art::JValue art::InvokeVirtualOrInterfaceWithJValues<art::ArtMethod*>(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, art::ArtMethod*, jvalue const*)+460) (BuildId: 143d4d521718f1d1b0005e86eb8ae170 /apex/com.android.art/lib64/libart.so
000000000066e674 art::Thread::CreateCallback(void*)+1184) (BuildId: 143d4d521718f1d1b0005e86eb8ae170 /apex/com.android.art/lib64/libart.so
00000000000b1810 __pthread_start(void*)+264) (BuildId: 6bfaf10f10e5ff343703efae2f1bdbdb /apex/com.android.runtime/lib64/bionic/libc.so
00000000000512f0 __start_thread+64) (BuildId: 6bfaf10f10e5ff343703efae2f1bdbdb
So this must be the bufferPRoducer somehow. If i use patchelf to replace libgui with the stock version from Android 10 and a bunch of related other libs the error is gone. It must be somehow possible to use shims to get the old behavior back instead of pushing 25 old stock libs on my device.
I am getting one ANR when app is ideal for some minutes in foreground mode. This screen is having text input box (signup process). here I am just filling whole form and keeping app in ideal state. then getting this ANR and app closes that screen and came back to previous screen.
2022-02-11 15:14:50.568 32014-32014/? A/DEBUG: Build fingerprint: 'HUAWEI/MAR-LX2/HWMAR:10/HUAWEIMAR-L22A/10.0.0.279C675:user/release-keys'
2022-02-11 15:14:50.568 32014-32014/? A/DEBUG: Revision: '0'
2022-02-11 15:14:50.568 32014-32014/? A/DEBUG: ABI: 'arm64'
2022-02-11 15:14:50.568 32014-32014/? A/DEBUG: Timestamp: 2022-02-11 17:44:50+0800
2022-02-11 15:14:50.568 32014-32014/? A/DEBUG: pid: 31015, tid: 31028, name: HeapTaskDaemon >>> com.feo <<<
2022-02-11 15:14:50.568 32014-32014/? A/DEBUG: uid: 11298
2022-02-11 15:14:50.569 32014-32014/? A/DEBUG: signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x10
2022-02-11 15:14:50.569 32014-32014/? A/DEBUG: Cause: null pointer dereference
2022-02-11 15:14:50.569 32014-32014/? A/DEBUG: x0 00000071c16bd400 x1 00000071b5e13a98 x2 0000000000000008 x3 0000000070f38b10
2022-02-11 15:14:50.569 32014-32014/? A/DEBUG: x4 000000000000044c x5 000000001338ca2c x6 12c4274012c42f58 x7 0000000070f61c80
2022-02-11 15:14:50.569 32014-32014/? A/DEBUG: x8 0000000000000000 x9 cdaede85033c2750 x10 0000000052c00000 x11 0000000000000008
2022-02-11 15:14:50.569 32014-32014/? A/DEBUG: x12 000000000000000b x13 000009fd00000071 x14 0006ae0246258983 x15 0000126e86b54941
2022-02-11 15:14:50.569 32014-32014/? A/DEBUG: x16 00000071c15fb000 x17 0000007242f42b40 x18 000000715d798000 x19 00000071b5e13a98
2022-02-11 15:14:50.569 32014-32014/? A/DEBUG: x20 0000000070f38b10 x21 0000000000000008 x22 00000000716ab790 x23 00000000716aa070
2022-02-11 15:14:50.569 32014-32014/? A/DEBUG: x24 0000000000000028 x25 0000000000002828 x26 00000071b5e15020 x27 0000000000001720
2022-02-11 15:14:50.569 32014-32014/? A/DEBUG: x28 00000000716aa088 x29 00000071b5e13a80
2022-02-11 15:14:50.569 32014-32014/? A/DEBUG: sp 00000071b5e13a10 lr 00000071c1236f6c pc 00000071c1236f48
2022-02-11 15:14:50.723 32014-32014/? A/DEBUG: backtrace:
2022-02-11 15:14:50.724 32014-32014/? A/DEBUG: #00 pc 000000000022ff48 /apex/com.android.runtime/lib64/libart.so (_ZN3art6mirror6Object15VisitReferencesILb1ELNS_17VerifyObjectFlagsE0ELNS_17ReadBarrierOptionE1ENS_2gc9collector17ConcurrentCopying16RefFieldsVisitorILb0EEES9_EEvRKT2_RKT3_+2828) (BuildId: 602edb11a79b9a18b1585382d06c7450)
2022-02-11 15:14:50.724 32014-32014/? A/DEBUG: #01 pc 000000000021fd10 /apex/com.android.runtime/lib64/libart.so (art::gc::collector::ConcurrentCopying::ImmuneSpaceScanObjVisitor::Callback(art::mirror::Object*, void*)+112) (BuildId: 602edb11a79b9a18b1585382d06c7450)
2022-02-11 15:14:50.724 32014-32014/? A/DEBUG: #02 pc 000000000020e188 /apex/com.android.runtime/lib64/libart.so (art::gc::accounting::ModUnionTableReferenceCache::VisitObjects(void (*)(art::mirror::Object*, void*), void*)+292) (BuildId: 602edb11a79b9a18b1585382d06c7450)
2022-02-11 15:14:50.724 32014-32014/? A/DEBUG: #03 pc 000000000021a9dc /apex/com.android.runtime/lib64/libart.so (art::gc::collector::ConcurrentCopying::CopyingPhase()+1236) (BuildId: 602edb11a79b9a18b1585382d06c7450)
2022-02-11 15:14:50.724 32014-32014/? A/DEBUG: #04 pc 00000000002188c4 /apex/com.android.runtime/lib64/libart.so (art::gc::collector::ConcurrentCopying::RunPhases()+1148) (BuildId: 602edb11a79b9a18b1585382d06c7450)
2022-02-11 15:14:50.724 32014-32014/? A/DEBUG: #05 pc 0000000000236f48 /apex/com.android.runtime/lib64/libart.so (art::gc::collector::GarbageCollector::Run(art::gc::GcCause, bool)+288) (BuildId: 602edb11a79b9a18b1585382d06c7450)
2022-02-11 15:14:50.724 32014-32014/? A/DEBUG: #06 pc 0000000000255fd4 /apex/com.android.runtime/lib64/libart.so (art::gc::Heap::CollectGarbageInternal(art::gc::collector::GcType, art::gc::GcCause, bool)+3196) (BuildId: 602edb11a79b9a18b1585382d06c7450)
2022-02-11 15:14:50.724 32014-32014/? A/DEBUG: #07 pc 000000000026838c /apex/com.android.runtime/lib64/libart.so (art::gc::Heap::ConcurrentGC(art::Thread*, art::gc::GcCause, bool)+124) (BuildId: 602edb11a79b9a18b1585382d06c7450)
2022-02-11 15:14:50.724 32014-32014/? A/DEBUG: #08 pc 000000000026df58 /apex/com.android.runtime/lib64/libart.so (art::gc::Heap::ConcurrentGCTask::Run(art::Thread*)+36) (BuildId: 602edb11a79b9a18b1585382d06c7450)
2022-02-11 15:14:50.724 32014-32014/? A/DEBUG: #09 pc 000000000029b2f8 /apex/com.android.runtime/lib64/libart.so (art::gc::TaskProcessor::RunAllTasks(art::Thread*)+64) (BuildId: 602edb11a79b9a18b1585382d06c7450)
2022-02-11 15:14:50.724 32014-32014/? A/DEBUG: #10 pc 0000000000067aec /system/framework/arm64/boot-core-libart.oat (art_jni_trampoline+124) (BuildId: cd6043ddfff407b4835c3e45be96dbab5a0b3a9b)
2022-02-11 15:14:50.724 32014-32014/? A/DEBUG: #11 pc 0000000000144334 /apex/com.android.runtime/lib64/libart.so (art_quick_invoke_stub+548) (BuildId: 602edb11a79b9a18b1585382d06c7450)
2022-02-11 15:14:50.724 32014-32014/? A/DEBUG: #12 pc 00000000001531a4 /apex/com.android.runtime/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+252) (BuildId: 602edb11a79b9a18b1585382d06c7450)
2022-02-11 15:14:50.724 32014-32014/? A/DEBUG: #13 pc 00000000002ee6d8 /apex/com.android.runtime/lib64/libart.so (art::interpreter::ArtInterpreterToCompiledCodeBridge(art::Thread*, art::ArtMethod*, art::ShadowFrame*, unsigned short, art::JValue*)+384) (BuildId: 602edb11a79b9a18b1585382d06c7450)
2022-02-11 15:14:50.724 32014-32014/? A/DEBUG: #14 pc 00000000002e99a8 /apex/com.android.runtime/lib64/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+912) (BuildId: 602edb11a79b9a18b1585382d06c7450)
2022-02-11 15:14:50.724 32014-32014/? A/DEBUG: #15 pc 00000000005bb284 /apex/com.android.runtime/lib64/libart.so (MterpInvokeVirtual+648) (BuildId: 602edb11a79b9a18b1585382d06c7450)
2022-02-11 15:14:50.724 32014-32014/? A/DEBUG: #16 pc 000000000013e814 /apex/com.android.runtime/lib64/libart.so (mterp_op_invoke_virtual+20) (BuildId: 602edb11a79b9a18b1585382d06c7450)
2022-02-11 15:14:50.724 32014-32014/? A/DEBUG: #17 pc 00000000001b47c2 /apex/com.android.runtime/javalib/core-libart.jar (java.lang.Daemons$HeapTaskDaemon.runInternal+38)
2022-02-11 15:14:50.724 32014-32014/? A/DEBUG: #18 pc 00000000005bb594 /apex/com.android.runtime/lib64/libart.so (MterpInvokeVirtual+1432) (BuildId: 602edb11a79b9a18b1585382d06c7450)
2022-02-11 15:14:50.724 32014-32014/? A/DEBUG: #19 pc 000000000013e814 /apex/com.android.runtime/lib64/libart.so (mterp_op_invoke_virtual+20) (BuildId: 602edb11a79b9a18b1585382d06c7450)
2022-02-11 15:14:50.724 32014-32014/? A/DEBUG: #20 pc 00000000001b3fa6 /apex/com.android.runtime/javalib/core-libart.jar (java.lang.Daemons$Daemon.run+50)
2022-02-11 15:14:50.724 32014-32014/? A/DEBUG: #21 pc 00000000005bcd94 /apex/com.android.runtime/lib64/libart.so (MterpInvokeInterface+1752) (BuildId: 602edb11a79b9a18b1585382d06c7450)
2022-02-11 15:14:50.724 32014-32014/? A/DEBUG: #22 pc 000000000013ea14 /apex/com.android.runtime/lib64/libart.so (mterp_op_invoke_interface+20) (BuildId: 602edb11a79b9a18b1585382d06c7450)
2022-02-11 15:14:50.724 32014-32014/? A/DEBUG: #23 pc 00000000000eabdc /apex/com.android.runtime/javalib/core-oj.jar (java.lang.Thread.run+8)
2022-02-11 15:14:50.724 32014-32014/? A/DEBUG: #24 pc 00000000002bf314 /apex/com.android.runtime/lib64/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadERKNS_20CodeItemDataAccessorERNS_11ShadowFrameENS_6JValueEbb.llvm.17950311261770437987+240) (BuildId: 602edb11a79b9a18b1585382d06c7450)
2022-02-11 15:14:50.724 32014-32014/? A/DEBUG: #25 pc 00000000005a6470 /apex/com.android.runtime/lib64/libart.so (artQuickToInterpreterBridge+1012) (BuildId: 602edb11a79b9a18b1585382d06c7450)
2022-02-11 15:14:50.724 32014-32014/? A/DEBUG: #26 pc 000000000014d468 /apex/com.android.runtime/lib64/libart.so (art_quick_to_interpreter_bridge+88) (BuildId: 602edb11a79b9a18b1585382d06c7450)
2022-02-11 15:14:50.724 32014-32014/? A/DEBUG: #27 pc 0000000000144334 /apex/com.android.runtime/lib64/libart.so (art_quick_invoke_stub+548) (BuildId: 602edb11a79b9a18b1585382d06c7450)
2022-02-11 15:14:50.724 32014-32014/? A/DEBUG: #28 pc 00000000001531a4 /apex/com.android.runtime/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+252) (BuildId: 602edb11a79b9a18b1585382d06c7450)
2022-02-11 15:14:50.724 32014-32014/? A/DEBUG: #29 pc 00000000004c6ec0 /apex/com.android.runtime/lib64/libart.so (art::(anonymous namespace)::InvokeWithArgArray(art::ScopedObjectAccessAlreadyRunnable const&, art::ArtMethod*, art::(anonymous namespace)::ArgArray*, art::JValue*, char const*)+104) (BuildId: 602edb11a79b9a18b1585382d06c7450)
2022-02-11 15:14:50.724 32014-32014/? A/DEBUG: #30 pc 00000000004c7f54 /apex/com.android.runtime/lib64/libart.so (art::InvokeVirtualOrInterfaceWithJValues(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, _jmethodID*, jvalue const*)+416) (BuildId: 602edb11a79b9a18b1585382d06c7450)
2022-02-11 15:14:50.724 32014-32014/? A/DEBUG: #31 pc 0000000000507f24 /apex/com.android.runtime/lib64/libart.so (art::Thread::CreateCallback(void*)+1176) (BuildId: 602edb11a79b9a18b1585382d06c7450)
2022-02-11 15:14:50.724 32014-32014/? A/DEBUG: #32 pc 00000000000ce1b0 /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+36) (BuildId: 95e03d8a9f101c0f1d3d9458688aa085)
2022-02-11 15:14:50.724 32014-32014/? A/DEBUG: #33 pc 0000000000070ba8 /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+64) (BuildId: 95e03d8a9f101c0f1d3d9458688aa085)
Anyone having any idea what I need to check or monitor in app for this ? any code level changes I can make in this case ?
Thank you!
I found a similiar error from here: https://blog.csdn.net/zgz9949/article/details/111641415
It gave out a solution: delete the folder /data/local/tmp/perfd. You can backup it if you are worried about the result.
We used official guideline to implement text translation feature with ML Kit on Android. Current version of the library is 'com.google.mlkit:translate:16.1.2'.
It works as expected in the debug build but it crashes in the release build with the crash from native code:
Fatal signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x78f4752a0a in tid 5897
If we mark release build as debuggable, crash does not occur.
Any ideas what could go wrong?
Additional files requested in comments:
stacktrace:
--------- beginning of crash
2021-08-18 14:09:40.411 5897-5897 A/libc: Fatal signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x78f4752a0a in tid 5897 (homegate.mobile), pid 5897 (homegate.mobile)
2021-08-18 14:09:40.556 6304-6304 I/crash_dump64: obtaining output fd from tombstoned, type: kDebuggerdTombstone
2021-08-18 14:09:40.556 979-979 I/tombstoned: received crash request for pid 5897
2021-08-18 14:09:40.564 6304-6304 I/crash_dump64: performing dump of process 5897 (target tid = 5897)
2021-08-18 14:09:40.570 5897-6189 I/Counters: exceeded sample count in FrameTime
2021-08-18 14:09:40.575 6304-6304 *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
2021-08-18 14:09:40.576 6304-6304 Build fingerprint: 'google/sargo/sargo:11/RQ3A.210805.001.A1/7474174:user/release-keys'
2021-08-18 14:09:40.576 6304-6304 Revision: 'MP1.0'
2021-08-18 14:09:40.576 6304-6304 ABI: 'arm64'
2021-08-18 14:09:40.576 6304-6304 Timestamp: 2021-08-18 14:09:40+0200
2021-08-18 14:09:40.576 6304-6304 pid: 5897, tid: 5897, name: homegate.mobile >>> ch.homegate.mobile <<<
2021-08-18 14:09:40.576 6304-6304 uid: 10072
2021-08-18 14:09:40.576 6304-6304 signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x78f4752a0a
2021-08-18 14:09:40.576 6304-6304 x0 0000000000000000 x1 00000000000008fc x2 000000788245bc71 x3 0000000000000000
2021-08-18 14:09:40.576 6304-6304 x4 0000000000000010 x5 00000079e5cf2df0 x6 0000007945c71120 x7 3cea0ea100000634
2021-08-18 14:09:40.576 6304-6304 x8 00000079c5c93070 x9 00000078f4755c6d x10 0000000000000000 x11 00000078f47520c8
2021-08-18 14:09:40.576 6304-6304 x12 0000000000000009 x13 0000000000000000 x14 0000000000000061 x15 000000000000000c
2021-08-18 14:09:40.576 6304-6304 x16 00000078824caef8 x17 0000007b9607ead4 x18 0000007b9b5f4000 x19 0000007fe00de598
2021-08-18 14:09:40.576 6304-6304 x20 0000000000000000 x21 00000079b5cb3f70 x22 00000079c5c93070 x23 00000079b5cb3f78
2021-08-18 14:09:40.576 6304-6304 x24 0000000000000009 x25 00000000000004a1 x26 0000000000000012 x27 000000000000005f
2021-08-18 14:09:40.576 6304-6304 x28 0000007975d22ee0 x29 0000000000000000
2021-08-18 14:09:40.576 6304-6304 lr 0000007882485964 sp 0000007fe00de3a0 pc 00000078824867c0 pst 0000000060000000
2021-08-18 14:09:40.581 5897-6189 I/Counters: exceeded sample count in FrameTime
2021-08-18 14:09:40.761 1022-1239 D/VSC: # 92931.790: [WO] isFlat() nearest_rotation: 0, flat_angle: 65
2021-08-18 14:09:40.762 1022-1239 D/VSC: # 92931.790: [WO] orientation angle 17, orientation 0
2021-08-18 14:09:40.762 1022-1239 D/VSC: # 92931.790: [WO] rejected by isOrientationAngleAcceptable
2021-08-18 14:09:40.861 6304-6304 backtrace:
2021-08-18 14:09:40.861 6304-6304 #00 pc 000000000003c7c0 /data/app/~~agM6IoX_2TvQjEyG25sAfQ==/ch.homegate.mobile-VNjMAk_4GEv45vV5JSrgmw==/lib/arm64/liblanguage_id_jni.so (BuildId: 859ec0ec2000a39e6ae8ed42e1704f46)
2021-08-18 14:09:40.861 6304-6304 #01 pc 000000000003b960 /data/app/~~agM6IoX_2TvQjEyG25sAfQ==/ch.homegate.mobile-VNjMAk_4GEv45vV5JSrgmw==/lib/arm64/liblanguage_id_jni.so (BuildId: 859ec0ec2000a39e6ae8ed42e1704f46)
2021-08-18 14:09:40.861 6304-6304 #02 pc 000000000003bb48 /data/app/~~agM6IoX_2TvQjEyG25sAfQ==/ch.homegate.mobile-VNjMAk_4GEv45vV5JSrgmw==/lib/arm64/liblanguage_id_jni.so (BuildId: 859ec0ec2000a39e6ae8ed42e1704f46)
2021-08-18 14:09:40.861 6304-6304 #03 pc 000000000003bafc /data/app/~~agM6IoX_2TvQjEyG25sAfQ==/ch.homegate.mobile-VNjMAk_4GEv45vV5JSrgmw==/lib/arm64/liblanguage_id_jni.so (BuildId: 859ec0ec2000a39e6ae8ed42e1704f46)
2021-08-18 14:09:40.861 6304-6304 #04 pc 0000000000036c98 /data/app/~~agM6IoX_2TvQjEyG25sAfQ==/ch.homegate.mobile-VNjMAk_4GEv45vV5JSrgmw==/lib/arm64/liblanguage_id_jni.so (BuildId: 859ec0ec2000a39e6ae8ed42e1704f46)
2021-08-18 14:09:40.861 6304-6304 #05 pc 00000000000324a4 /data/app/~~agM6IoX_2TvQjEyG25sAfQ==/ch.homegate.mobile-VNjMAk_4GEv45vV5JSrgmw==/lib/arm64/liblanguage_id_jni.so (BuildId: 859ec0ec2000a39e6ae8ed42e1704f46)
2021-08-18 14:09:40.861 6304-6304 #06 pc 0000000000031b5c /data/app/~~agM6IoX_2TvQjEyG25sAfQ==/ch.homegate.mobile-VNjMAk_4GEv45vV5JSrgmw==/lib/arm64/liblanguage_id_jni.so (Java_com_google_mlkit_nl_languageid_internal_LanguageIdentificationJni_nativeIdentifyLanguage+100) (BuildId: 859ec0ec2000a39e6ae8ed42e1704f46)
2021-08-18 14:09:40.861 6304-6304 #07 pc 000000000007a6a8 /data/app/~~agM6IoX_2TvQjEyG25sAfQ==/ch.homegate.mobile-VNjMAk_4GEv45vV5JSrgmw==/oat/arm64/base.odex (art_jni_trampoline+168)
2021-08-18 14:09:40.861 6304-6304 #08 pc 0000000000133564 /apex/com.android.art/lib64/libart.so (art_quick_invoke_stub+548) (BuildId: 0183cc6150704cdc371a87b659800e56)
2021-08-18 14:09:40.861 6304-6304 #09 pc 00000000001a8a78 /apex/com.android.art/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+200) (BuildId: 0183cc6150704cdc371a87b659800e56)
2021-08-18 14:09:40.861 6304-6304 #10 pc 000000000031831c /apex/com.android.art/lib64/libart.so (art::interpreter::ArtInterpreterToCompiledCodeBridge(art::Thread*, art::ArtMethod*, art::ShadowFrame*, unsigned short, art::JValue*)+376) (BuildId: 0183cc6150704cdc371a87b659800e56)
2021-08-18 14:09:40.861 6304-6304 #11 pc 000000000030e648 /apex/com.android.art/lib64/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+996) (BuildId: 0183cc6150704cdc371a87b659800e56)
2021-08-18 14:09:40.861 6304-6304 #12 pc 0000000000682f88 /apex/com.android.art/lib64/libart.so (MterpInvokeVirtualQuick+672) (BuildId: 0183cc6150704cdc371a87b659800e56)
2021-08-18 14:09:40.861 6304-6304 #13 pc 0000000000131594 /apex/com.android.art/lib64/libart.so (mterp_op_invoke_virtual_quick+20) (BuildId: 0183cc6150704cdc371a87b659800e56)
2021-08-18 14:09:40.861 6304-6304 #14 pc 0000000000e077fc /data/app/~~agM6IoX_2TvQjEyG25sAfQ==/ch.homegate.mobile-VNjMAk_4GEv45vV5JSrgmw==/oat/arm64/base.vdex (qk.d.call+124)
2021-08-18 14:09:40.861 6304-6304 #15 pc 000000000067e21c /apex/com.android.art/lib64/libart.so (MterpInvokeInterface+1808) (BuildId: 0183cc6150704cdc371a87b659800e56)
2021-08-18 14:09:40.861 6304-6304 #16 pc 000000000012da14 /apex/com.android.art/lib64/libart.so (mterp_op_invoke_interface+20) (BuildId: 0183cc6150704cdc371a87b659800e56)
2021-08-18 14:09:40.861 6304-6304 #17 pc 0000000000ae1432 /data/app/~~agM6IoX_2TvQjEyG25sAfQ==/ch.homegate.mobile-VNjMAk_4GEv45vV5JSrgmw==/oat/arm64/base.vdex (com.google.android.gms.internal.ads.f20.run+1686)
2021-08-18 14:09:40.861 6304-6304 #18 pc 000000000067e21c /apex/com.android.art/lib64/libart.so (MterpInvokeInterface+1808) (BuildId: 0183cc6150704cdc371a87b659800e56)
2021-08-18 14:09:40.861 6304-6304 #19 pc 000000000012da14 /apex/com.android.art/lib64/libart.so (mterp_op_invoke_interface+20) (BuildId: 0183cc6150704cdc371a87b659800e56)
2021-08-18 14:09:40.861 6304-6304 #20 pc 0000000000e00892 /data/app/~~agM6IoX_2TvQjEyG25sAfQ==/ch.homegate.mobile-VNjMAk_4GEv45vV5JSrgmw==/oat/arm64/base.vdex (qh.q.run+794)
2021-08-18 14:09:40.861 6304-6304 #21 pc 000000000067e21c /apex/com.android.art/lib64/libart.so (MterpInvokeInterface+1808) (BuildId: 0183cc6150704cdc371a87b659800e56)
2021-08-18 14:09:40.861 6304-6304 #22 pc 000000000012da14 /apex/com.android.art/lib64/libart.so (mterp_op_invoke_interface+20) (BuildId: 0183cc6150704cdc371a87b659800e56)
2021-08-18 14:09:40.861 6304-6304 #23 pc 0000000000e0d854 /data/app/~~agM6IoX_2TvQjEyG25sAfQ==/ch.homegate.mobile-VNjMAk_4GEv45vV5JSrgmw==/oat/arm64/base.vdex (rk.a.execute+52)
2021-08-18 14:09:40.861 6304-6304 #24 pc 000000000067e21c /apex/com.android.art/lib64/libart.so (MterpInvokeInterface+1808) (BuildId: 0183cc6150704cdc371a87b659800e56)
2021-08-18 14:09:40.861 6304-6304 #25 pc 000000000012da14 /apex/com.android.art/lib64/libart.so (mterp_op_invoke_interface+20) (BuildId: 0183cc6150704cdc371a87b659800e56)
2021-08-18 14:09:40.861 6304-6304 #26 pc 0000000000de4294 /data/app/~~agM6IoX_2TvQjEyG25sAfQ==/ch.homegate.mobile-VNjMAk_4GEv45vV5JSrgmw==/oat/arm64/base.vdex (ok.o.execute+16)
2021-08-18 14:09:40.861 6304-6304 #27 pc 000000000067e21c /apex/com.android.art/lib64/libart.so (MterpInvokeInterface+1808) (BuildId: 0183cc6150704cdc371a87b659800e56)
2021-08-18 14:09:40.861 6304-6304 #28 pc 000000000012da14 /apex/com.android.art/lib64/libart.so (mterp_op_invoke_interface+20) (BuildId: 0183cc6150704cdc371a87b659800e56)
2021-08-18 14:09:40.861 6304-6304 #29 pc 0000000000de4034 /data/app/~~agM6IoX_2TvQjEyG25sAfQ==/ch.homegate.mobile-VNjMAk_4GEv45vV5JSrgmw==/oat/arm64/base.vdex (ok.k.a+56)
2021-08-18 14:09:40.861 6304-6304 #30 pc 0000000000683228 /apex/com.android.art/lib64/libart.so (MterpInvokeVirtualQuick+1344) (BuildId: 0183cc6150704cdc371a87b659800e56)
2021-08-18 14:09:40.861 6304-6304 #31 pc 0000000000131594 /apex/com.android.art/lib64/libart.so (mterp_op_invoke_virtual_quick+20) (BuildId: 0183cc6150704cdc371a87b659800e56)
2021-08-18 14:09:40.861 6304-6304 #32 pc 0000000000cecc44 /data/app/~~agM6IoX_2TvQjEyG25sAfQ==/ch.homegate.mobile-VNjMAk_4GEv45vV5JSrgmw==/oat/arm64/base.vdex (com.google.mlkit.common.sdkinternal.a.a+124)
2021-08-18 14:09:40.861 6304-6304 #33 pc 0000000000683228 /apex/com.android.art/lib64/libart.so (MterpInvokeVirtualQuick+1344) (BuildId: 0183cc6150704cdc371a87b659800e56)
2021-08-18 14:09:40.861 6304-6304 #34 pc 0000000000131594 /apex/com.android.art/lib64/libart.so (mterp_op_invoke_virtual_quick+20) (BuildId: 0183cc6150704cdc371a87b659800e56)
2021-08-18 14:09:40.861 6304-6304 #35 pc 000000000039286a /data/app/~~agM6IoX_2TvQjEyG25sAfQ==/ch.homegate.mobile-VNjMAk_4GEv45vV5JSrgmw==/oat/arm64/base.vdex (ch.homegate.mobile.main.usecase.MlKitTranslationUseCaseImpl.a+482)
2021-08-18 14:09:40.861 6304-6304 #36 pc 000000000067e21c /apex/com.android.art/lib64/libart.so (MterpInvokeInterface+1808) (BuildId: 0183cc6150704cdc371a87b659800e56)
2021-08-18 14:09:40.861 6304-6304 #37 pc 000000000012da14 /apex/com.android.art/lib64/libart.so (mterp_op_invoke_interface+20) (BuildId: 0183cc6150704cdc371a87b659800e56)
2021-08-18 14:09:40.861 6304-6304 #38 pc 000000000036c462 /data/app/~~agM6IoX_2TvQjEyG25sAfQ==/ch.homegate.mobile-VNjMAk_4GEv45vV5JSrgmw==/oat/arm64/base.vdex (ch.homegate.mobile.main.detail.DetailViewModel.d+2602)
2021-08-18 14:09:40.861 6304-6304 #39 pc 000000000067f740 /apex/com.android.art/lib64/libart.so (MterpInvokeStatic+1224) (BuildId: 0183cc6150704cdc371a87b659800e56)
2021-08-18 14:09:40.861 6304-6304 #40 pc 000000000012d994 /apex/com.android.art/lib64/libart.so (mterp_op_invoke_static+20) (BuildId: 0183cc6150704cdc371a87b659800e56)
2021-08-18 14:09:40.861 6304-6304 #41 pc 000000000036a0ae /data/app/~~agM6IoX_2TvQjEyG25sAfQ==/ch.homegate.mobile-VNjMAk_4GEv45vV5JSrgmw==/oat/arm64/base.vdex (ch.homegate.mobile.main.detail.DetailViewModel$loadDetail$1$invokeSuspend$$inlined$collect$1.emit+774)
2021-08-18 14:09:40.861 6304-6304 #42 pc 000000000067e21c /apex/com.android.art/lib64/libart.so (MterpInvokeInterface+1808) (BuildId: 0183cc6150704cdc371a87b659800e56)
2021-08-18 14:09:40.861 6304-6304 #43 pc 000000000012da14 /apex/com.android.art/lib64/libart.so (mterp_op_invoke_interface+20) (BuildId: 0183cc6150704cdc371a87b659800e56)
2021-08-18 14:09:40.861 6304-6304 #44 pc 0000000001339b64 /data/app/~~agM6IoX_2TvQjEyG25sAfQ==/ch.homegate.mobile-VNjMAk_4GEv45vV5JSrgmw==/oat/arm64/base.vdex (kotlinx.coroutines.flow.FlowKt__ErrorsKt$catchImpl$$inlined$collect$1.emit+128)
2021-08-18 14:09:40.861 6304-6304 #45 pc 000000000067e21c /apex/com.android.art/lib64/libart.so (MterpInvokeInterface+1808) (BuildId: 0183cc6150704cdc371a87b659800e56)
2021-08-18 14:09:40.861 6304-6304 #46 pc 000000000012da14 /apex/com.android.art/lib64/libart.so (mterp_op_invoke_interface+20) (BuildId: 0183cc6150704cdc371a87b659800e56)
2021-08-18 14:09:40.861 6304-6304 #47 pc 0000000001337d90 /data/app/~~agM6IoX_2TvQjEyG25sAfQ==/ch.homegate.mobile-VNjMAk_4GEv45vV5JSrgmw==/oat/arm64/base.vdex (kotlinx.coroutines.flow.FlowKt__ChannelsKt.a+284)
2021-08-18 14:09:40.861 6304-6304 #48 pc 000000000067f740 /apex/com.android.art/lib64/libart.so (MterpInvokeStatic+1224) (BuildId: 0183cc6150704cdc371a87b659800e56)
2021-08-18 14:09:40.861 6304-6304 #49 pc 000000000012d994 /apex/com.android.art/lib64/libart.so (mterp_op_invoke_static+20) (BuildId: 0183cc6150704cdc371a87b659800e56)
2021-08-18 14:09:40.861 6304-6304 #50 pc 0000000001337c42 /data/app/~~agM6IoX_2TvQjEyG25sAfQ==/ch.homegate.mobile-VNjMAk_4GEv45vV5JSrgmw==/oat/arm64/base.vdex (kotlinx.coroutines.flow.FlowKt__ChannelsKt$emitAllImpl$1.invokeSuspend+22)
2021-08-18 14:09:40.861 6304-6304 #51 pc 0000000000305c44 /apex/com.android.art/lib64/libart.so (art::interpreter::Execute(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame&, art::JValue, bool, bool) (.llvm.6432830707213048161)+268) (BuildId: 0183cc6150704cdc371a87b659800e56)
2021-08-18 14:09:40.861 6304-6304 #52 pc 000000000066b24c /apex/com.android.art/lib64/libart.so (artQuickToInterpreterBridge+780) (BuildId: 0183cc6150704cdc371a87b659800e56)
2021-08-18 14:09:40.862 6304-6304 #53 pc 000000000013cff8 /apex/com.android.art/lib64/libart.so (art_quick_to_interpreter_bridge+88) (BuildId: 0183cc6150704cdc371a87b659800e56)
2021-08-18 14:09:40.862 6304-6304 #54 pc 00000000021b00d4 /memfd:jit-cache (deleted) (offset 0x2000000) (kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith+276)
2021-08-18 14:09:40.862 6304-6304 #55 pc 0000000000133564 /apex/com.android.art/lib64/libart.so (art_quick_invoke_stub+548) (BuildId: 0183cc6150704cdc371a87b659800e56)
2021-08-18 14:09:40.862 6304-6304 #56 pc 00000000001a8a78 /apex/com.android.art/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+200) (BuildId: 0183cc6150704cdc371a87b659800e56)
2021-08-18 14:09:40.862 6304-6304 #57 pc 000000000031831c /apex/com.android.art/lib64/libart.so (art::interpreter::ArtInterpreterToCompiledCodeBridge(art::Thread*, art::ArtMethod*, art::ShadowFrame*, unsigned short, art::JValue*)+376) (BuildId: 0183cc6150704cdc371a87b659800e56)
2021-08-18 14:09:40.862 6304-6304 #58 pc 000000000030e648 /apex/com.android.art/lib64/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+996) (BuildId: 0183cc6150704cdc371a87b659800e56)
2021-08-18 14:09:40.862 6304-6304 #59 pc 000000000067df14 /apex/com.android.art/lib64/libart.so (MterpInvokeInterface+1032) (BuildId: 0183cc6150704cdc371a87b659800e56)
2021-08-18 14:09:40.862 6304-6304 #60 pc 000000000012da14 /apex/com.android.art/lib64/libart.so (mterp_op_invoke_interface+20) (BuildId: 0183cc6150704cdc371a87b659800e56)
2021-08-18 14:09:40.862 6304-6304 #61 pc 00000000013a739c /data/app/~~agM6IoX_2TvQjEyG25sAfQ==/ch.homegate.mobile-VNjMAk_4GEv45vV5JSrgmw==/oat/arm64/base.vdex (sl.p0.run+244)
2021-08-18 14:09:40.862 6304-6304 #62 pc 0000000000305c44 /apex/com.android.art/lib64/libart.so (art::interpreter::Execute(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame&, art::JValue, bool, bool) (.llvm.6432830707213048161)+268) (BuildId: 0183cc6150704cdc371a87b659800e56)
2021-08-18 14:09:40.862 6304-6304 #63 pc 000000000066b24c /apex/com.android.art/lib64/libart.so (artQuickToInterpreterBridge+780) (BuildId: 0183cc6150704cdc371a87b659800e56)
2021-08-18 14:09:40.862 6304-6304 #64 pc 000000000013cff8 /apex/com.android.art/lib64/libart.so (art_quick_to_interpreter_bridge+88) (BuildId: 0183cc6150704cdc371a87b659800e56)
2021-08-18 14:09:40.862 6304-6304 #65 pc 0000000000634c8c /system/framework/arm64/boot-framework.oat (android.os.Handler.dispatchMessage+76) (BuildId: c796a34e8ce906ec2c393327c9700abd6e60ca15)
2021-08-18 14:09:40.862 6304-6304 #66 pc 00000000006381ec /system/framework/arm64/boot-framework.oat (android.os.Looper.loop+1516) (BuildId: c796a34e8ce906ec2c393327c9700abd6e60ca15)
2021-08-18 14:09:40.862 6304-6304 #67 pc 00000000003fbaa0 /system/framework/arm64/boot-framework.oat (android.app.ActivityThread.main+752) (BuildId: c796a34e8ce906ec2c393327c9700abd6e60ca15)
2021-08-18 14:09:40.862 6304-6304 #68 pc 00000000001337e8 /apex/com.android.art/lib64/libart.so (art_quick_invoke_static_stub+568) (BuildId: 0183cc6150704cdc371a87b659800e56)
2021-08-18 14:09:40.862 6304-6304 #69 pc 00000000001a8a94 /apex/com.android.art/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+228) (BuildId: 0183cc6150704cdc371a87b659800e56)
2021-08-18 14:09:40.862 6304-6304 #70 pc 0000000000555748 /apex/com.android.art/lib64/libart.so (art::InvokeMethod(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, _jobject*, _jobject*, unsigned long)+1364) (BuildId: 0183cc6150704cdc371a87b659800e56)
2021-08-18 14:09:40.862 6304-6304 #71 pc 00000000004d4ef0 /apex/com.android.art/lib64/libart.so (art::Method_invoke(_JNIEnv*, _jobject*, _jobject*, _jobjectArray*)+52) (BuildId: 0183cc6150704cdc371a87b659800e56)
2021-08-18 14:09:40.862 6304-6304 #72 pc 00000000000896f4 /apex/com.android.art/javalib/arm64/boot.oat (art_jni_trampoline+180) (BuildId: ceb5e62f6d91c45ea99526daec5879eba39c6a54)
2021-08-18 14:09:40.862 6304-6304 #73 pc 000000000088bfd8 /system/framework/arm64/boot-framework.oat (com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run+136) (BuildId: c796a34e8ce906ec2c393327c9700abd6e60ca15)
2021-08-18 14:09:40.862 6304-6304 #74 pc 0000000000894708 /system/framework/arm64/boot-framework.oat (com.android.internal.os.ZygoteInit.main+2280) (BuildId: c796a34e8ce906ec2c393327c9700abd6e60ca15)
2021-08-18 14:09:40.862 6304-6304 #75 pc 00000000001337e8 /apex/com.android.art/lib64/libart.so (art_quick_invoke_static_stub+568) (BuildId: 0183cc6150704cdc371a87b659800e56)
2021-08-18 14:09:40.862 6304-6304 #76 pc 00000000001a8a94 /apex/com.android.art/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+228) (BuildId: 0183cc6150704cdc371a87b659800e56)
2021-08-18 14:09:40.862 6304-6304 #77 pc 0000000000554184 /apex/com.android.art/lib64/libart.so (art::JValue art::InvokeWithVarArgs<art::ArtMethod*>(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, art::ArtMethod*, std::__va_list)+448) (BuildId: 0183cc6150704cdc371a87b659800e56)
2021-08-18 14:09:40.862 6304-6304 #78 pc 0000000000554638 /apex/com.android.art/lib64/libart.so (art::JValue art::InvokeWithVarArgs<_jmethodID*>(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, _jmethodID*, std::__va_list)+92) (BuildId: 0183cc6150704cdc371a87b659800e56)
2021-08-18 14:09:40.862 6304-6304 #79 pc 0000000000438b08 /apex/com.android.art/lib64/libart.so (art::JNI<true>::CallStaticVoidMethodV(_JNIEnv*, _jclass*, _jmethodID*, std::__va_list)+656) (BuildId: 0183cc6150704cdc371a87b659800e56)
2021-08-18 14:09:40.862 6304-6304 #80 pc 0000000000099424 /system/lib64/libandroid_runtime.so (_JNIEnv::CallStaticVoidMethod(_jclass*, _jmethodID*, ...)+124) (BuildId: 1dec5134a09522f9c83c48dae0aec3be)
2021-08-18 14:09:40.862 6304-6304 #81 pc 00000000000a08b0 /system/lib64/libandroid_runtime.so (android::AndroidRuntime::start(char const*, android::Vector<android::String8> const&, bool)+836) (BuildId: 1dec5134a09522f9c83c48dae0aec3be)
2021-08-18 14:09:40.862 6304-6304 #82 pc 0000000000003580 /system/bin/app_process64 (main+1336) (BuildId: 8b041fc279d5108900e48324bafa5142)
2021-08-18 14:09:40.862 6304-6304 #83 pc 000000000004988c /apex/com.android.runtime/lib64/bionic/libc.so (__libc_init+108) (BuildId: 49090ae59e6ae37f8beae53c551820ad)
2021-08-18 14:09:40.869 3080-3104 D/DeviceStateHelper: Audo mode: 0
2021-08-18 14:09:41.170 1639-6307 W/ActivityTaskManager: Force finishing activity ch.homegate.mobile/.main.MainActivity
build.gradle
buildscript {
dependencies {
classpath "org.jetbrains.kotlin:kotlin-allopen:$Versions.kotlin"
}
}
plugins {
id 'com.android.application'
id 'kotlin-android'
id 'kotlin-kapt'
id 'kotlin-parcelize'
}
apply plugin: 'com.google.gms.google-services'
apply plugin: 'com.google.firebase.crashlytics'
apply plugin: "kotlin-allopen"
android {
compileSdkVersion rootProject.compileSdk
defaultConfig {
applicationId "ch.homegate.mobile"
minSdkVersion rootProject.minSdk
targetSdkVersion rootProject.targetSdk
versionCode rootProject.versionCode
versionName rootProject.versionName
vectorDrawables.useSupportLibrary = true
resConfigs "de", "en", "it", "fr"
lintOptions {
checkReleaseBuilds false
}
testInstrumentationRunnerArguments clearPackageData: 'true'
}
testOptions {
execution "ANDROIDX_TEST_ORCHESTRATOR"
unitTests {
returnDefaultValues true
includeAndroidResources true
all {
jvmArgs '-noverify'
reports {
junitXml.enabled = true
html.enabled = true
}
}
}
}
buildFeatures {
viewBinding true
}
compileOptions {
sourceCompatibility JAVA_VERSION
targetCompatibility JAVA_VERSION
}
kotlinOptions {
jvmTarget = "1.8"
}
lintOptions {
abortOnError false
warning 'RestrictedApi'
}
buildTypes {
release {
signingConfig releaseSigningConfig
minifyEnabled true
zipAlignEnabled true
}
debug {
ext.enableCrashlytics = false
ext.alwaysUpdateBuildId = false
debuggable true
minifyEnabled false
}
}
bundle {
language {
// Specifies that the app bundle should not support
// configuration APKs for language resources. These
// resources are instead packaged with each base and
// dynamic feature APK.
enableSplit = false
}
density {
// This property is set to true by default.
enableSplit = true
}
abi {
// This property is set to true by default.
enableSplit = true
}
}
packagingOptions {
// added this line to be able to create release apk from android studio
exclude 'classes.dex'
pickFirst("META-INF/atomicfu.kotlin_module")
pickFirst("META-INF/ui_release.kotlin_module")
}
}
dependencies {
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:${Dependencies.kotlinx}"
implementation "org.jetbrains.kotlin:kotlin-reflect:${Dependencies.kotlin}"
debugImplementation "com.squareup.okhttp3:logging-interceptor:${Dependencies.okhttp}"
implementation "pub.devrel:easypermissions:${Dependencies.easypermissions}"
implementation platform("com.google.firebase:firebase-bom:${Dependencies.firebaseBoM}")
implementation "com.google.firebase:firebase-config"
implementation "com.google.firebase:firebase-perf-ktx"
implementation "com.google.android.gms:play-services-location:${Dependencies.googlePlayServicesLocation}"
implementation "com.google.android.gms:play-services-auth:${Dependencies.googlePlayServicesAuth}"
implementation "com.google.android.gms:play-services-maps:${Dependencies.googlePlayServicesMaps}"
implementation "com.google.maps.android:android-maps-utils:${Dependencies.mapsUtils}"
implementation "com.google.android.material:material:${Dependencies.material}"
implementation "androidx.constraintlayout:constraintlayout:${Dependencies.constraintLayout}"
implementation "androidx.recyclerview:recyclerview:${Dependencies.recyclerView}"
implementation "androidx.cardview:cardview:${Dependencies.cardView}"
implementation "androidx.recyclerview:recyclerview-selection:${Dependencies.recyclerViewSelection}"
implementation "androidx.swiperefreshlayout:swiperefreshlayout:${Dependencies.swipeToRefresh}"
implementation "androidx.dynamicanimation:dynamicanimation:${Dependencies.animations}"
implementation "androidx.work:work-runtime-ktx:${Dependencies.workManager}"
androidTestImplementation "androidx.work:work-testing:${Dependencies.workManager}"
implementation "androidx.core:core-ktx:${Dependencies.coreKtx}"
implementation "androidx.activity:activity-ktx:${Dependencies.activityKtx}"
implementation "androidx.lifecycle:lifecycle-livedata-ktx:${Dependencies.livedata}"
implementation("androidx.lifecycle:lifecycle-extensions:${Dependencies.lifecycle}") {
exclude group: 'com.google.code.gson'
}
kapt "androidx.lifecycle:lifecycle-common-java8:${Dependencies.lifecycle}"
implementation "androidx.paging:paging-runtime:${Dependencies.pagingVersion}"
implementation "com.fasterxml.jackson.module:jackson-module-kotlin:${Dependencies.jacksonVersion}"
implementation "com.fasterxml.jackson.core:jackson-databind:${Dependencies.jacksonVersion}"
implementation "com.fasterxml.jackson.core:jackson-annotations:${Dependencies.jacksonVersion}"
implementation "com.fasterxml.jackson.core:jackson-core:${Dependencies.jacksonVersion}"
implementation "com.squareup.retrofit2:converter-jackson:${Dependencies.retrofitJacksonVersion}"
implementation "com.google.android.flexbox:flexbox:${Dependencies.flexboxVersion}"
implementation "androidx.preference:preference-ktx:${Dependencies.preferenceManager}"
implementation("com.google.firebase:firebase-crashlytics") {
transitive = true
}
implementation "com.github.PGrube26:RangeSeekBar:${Dependencies.rangeBar}"
implementation "com.facebook.shimmer:shimmer:${Dependencies.facebookShimmer}"
implementation "com.jakewharton.threetenabp:threetenabp:${Dependencies.threetenabp}"
implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:${Dependencies.viewModelScope}"
implementation "androidx.lifecycle:lifecycle-runtime-ktx:${Dependencies.lifecycleScope}"
implementation "com.github.bumptech.glide:glide:${Dependencies.glide}"
implementation "com.jakewharton.timber:timber:${Dependencies.timberVersion}"
implementation "org.locationtech.jts:jts-core:${Dependencies.jts}"
implementation "com.github.chrisbanes:PhotoView:${Dependencies.photoView}"
implementation "uk.co.samuelwall:material-tap-target-prompt:${Dependencies.materialTapTargetPrompt}"
implementation "androidx.test.espresso:espresso-idling-resource:${Dependencies.espressoVersion}"
implementation "com.google.mlkit:language-id:${Dependencies.mlLanguage}"
implementation "com.google.mlkit:translate:${Dependencies.mlTranslate}"
implementation "com.android.installreferrer:installreferrer:${Dependencies.installReferrer}"
implementation "com.comscore:android-analytics:${Dependencies.comscore}"
implementation "com.google.android.gms:play-services-ads:${Dependencies.ads}"
implementation "com.android.support:support-annotations:${Dependencies.supportAnnotation}"
implementation "com.yarolegovich:discrete-scrollview:${Dependencies.discreteScrollView}"
implementation("com.appelium:feedback:2.1.1:release#aar") {
transitive = true
}
}
And regarding the device info, it was tested on the Pixel 3a (Android version 11)
17.0.0 is crashed too
Workaround:
Replace standalone version of the kit with dynamic model from Google Play Services. I.e. replace 'com.google.mlkit:language-id:17.0.0' with 'com.google.android.gms:play-services-mlkit-language-id:16.0.0-beta1' in Gradle dependencies.
More info:
https://developers.google.com/ml-kit/language/identification/android
Google posted workaround for this issue.
For temporary workarounds for the existing SDKs, you need to add this rule
For language-id 16.1.1
-keep class com.google.mlkit.nl.languageid.internal.LanguageIdentificationJni { *; }
For language-id 17.0.0+
-keep class com.google.mlkit.nl.languageid.internal.ThickLanguageIdentifier { *; }
Was it the same crash error by 17.0.0? Could you share the error log with me to take a look?
Glad to see that 'com.google.android.gms:play-services-mlkit-language-id:16.0.0-beta1' works and it will save APK size by downloading model from Google Play Services.
It seems this is R8 optimizer issue.
I posted on R8 issue tracker for this.
https://issuetracker.google.com/issues/203573699
Our Android application encounters random native crash in monkey test. We have some jni and native C++ code and have made some modification to try to solve the issue, but that didn't help. The crash stack don't have enough information to help to find the cause.
I could only static review the jni and C++ code, which is slow and helpless. The problem still exists after review. I am a Java developer and not so good at C++, so it is possible that I missed the problematic code. The C++ codebase is large because we used some open source project source code.
Following are some stacks:
/ CRASH: com.my.app (pid 27393)
// Short Msg: Native crash
// Long Msg: Native crash: Segmentation fault
// Build Label: Lenovo/heart/heart:10/QKQ1.191014.001/11.5.250_200614:userdebug/test-keys
// Build Changelist: 11.5.250_200614
// Build Time: 1592147934000
// *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
// Build fingerprint: 'Lenovo/heart/heart:10/QKQ1.191014.001/11.5.250_200614:userdebug/test-keys'
// Revision: '0'
// ABI: 'arm'
// Timestamp: 2020-10-15 22:44:46+0800
// pid: 27393, tid: 27407, name: ReferenceQueueD >>> com.my.app <<<
// uid: 10291
// signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x4
// Cause: null pointer dereference
// r0 b7e49de0 r1 00000000 r2 f087cd15 r3 00000000
// r4 f087cd15 r5 139b8330 r6 139b8330 r7 139b82c8
// r8 00000000 r9 eb15f600 r10 70ea2bd8 r11 139b8308
// ip e5b72bd5 sp c7e43dc0 lr 71c713bb pc f087cd1c
//
// backtrace:
// #00 pc 000add1c /system/lib/libandroid_runtime.so (android::CanvasJNI::delete_canvas(android::Canvas*)+8) (BuildId: 474c53cb68297e45cf00595c65e14fff)
// #01 pc 0004a3b9 /system/framework/arm/boot-core-libart.oat (art_jni_trampoline+120) (BuildId: 533d0af7f4307f5a947d9059c8a7d3c40eb37d1b)
// #02 pc 000bb60f /system/framework/arm/boot-core-libart.oat (libcore.util.NativeAllocationRegistry$CleanerThunk.run+78) (BuildId: 533d0af7f4307f5a947d9059c8a7d3c40eb37d1b)
// #03 pc 0024574b /system/framework/arm/boot.oat (sun.misc.Cleaner.clean+90) (BuildId: 625e004ba4396bf9751878502697218d94469522)
// #04 pc 000d3849 /system/framework/arm/boot.oat (java.lang.ref.ReferenceQueue.enqueueLocked+168) (BuildId: 625e004ba4396bf9751878502697218d94469522)
// #05 pc 000d3925 /system/framework/arm/boot.oat (java.lang.ref.ReferenceQueue.enqueuePending+148) (BuildId: 625e004ba4396bf9751878502697218d94469522)
// #06 pc 000ef941 /system/framework/arm/boot-core-libart.oat (java.lang.Daemons$ReferenceQueueDaemon.runInternal+232) (BuildId: 533d0af7f4307f5a947d9059c8a7d3c40eb37d1b)
// #07 pc 0009e263 /system/framework/arm/boot-core-libart.oat (java.lang.Daemons$Daemon.run+146) (BuildId: 533d0af7f4307f5a947d9059c8a7d3c40eb37d1b)
// #08 pc 00173691 /system/framework/arm/boot.oat (java.lang.Thread.run+64) (BuildId: 625e004ba4396bf9751878502697218d94469522)
// #09 pc 000d7bc5 /apex/com.android.runtime/lib/libart.so (art_quick_invoke_stub_internal+68) (BuildId: 78cb259cd8aba2a9f6063413910ab653)
// #10 pc 0043d13d /apex/com.android.runtime/lib/libart.so (art_quick_invoke_stub+248) (BuildId: 78cb259cd8aba2a9f6063413910ab653)
// #11 pc 000dff81 /apex/com.android.runtime/lib/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+168) (BuildId: 78cb259cd8aba2a9f6063413910ab653)
// #12 pc 0037d507 /apex/com.android.runtime/lib/libart.so (art::(anonymous namespace)::InvokeWithArgArray(art::ScopedObjectAccessAlreadyRunnable const&, art::ArtMethod*, art::(anonymous namespace)::ArgArray*, art::JValue*, char const*)+54) (BuildId: 78cb259cd8aba2a9f6063413910ab653)
// #13 pc 0037e29b /apex/com.android.runtime/lib/libart.so (art::InvokeVirtualOrInterfaceWithJValues(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, _jmethodID*, jvalue const*)+302) (BuildId: 78cb259cd8aba2a9f6063413910ab653)
// #14 pc 003afeff /apex/com.android.runtime/lib/libart.so (art::Thread::CreateCallback(void*)+1018) (BuildId: 78cb259cd8aba2a9f6063413910ab653)
// #15 pc 000ab3bd /apex/com.android.runtime/lib/bionic/libc.so (__pthread_start(void*)+20) (BuildId: b8ea1bc56f976308b1ee7e2335b3127e)
// #16 pc 00061989 /apex/com.android.runtime/lib/bionic/libc.so (__start_thread+30) (BuildId: b8ea1bc56f976308b1ee7e2335b3127e)
// CRASH: com.my.app (pid 10788)
// Short Msg: Native crash
// Long Msg: Native crash: Segmentation fault
// Build Label: Lenovo/heart/heart:10/QKQ1.191014.001/11.5.250_200614:userdebug/test-keys
// Build Changelist: 11.5.250_200614
// Build Time: 1592147934000
// *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
// Build fingerprint: 'Lenovo/heart/heart:10/QKQ1.191014.001/11.5.250_200614:userdebug/test-keys'
// Revision: '0'
// ABI: 'arm'
// Timestamp: 2020-10-16 01:51:56+0800
// pid: 10788, tid: 11437, name: RenderThread >>> com.my.app <<<
// uid: 10291
// signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x38
// Cause: null pointer dereference
// r0 c5ddb380 r1 00000000 r2 c607d148 r3 00000000
// r4 bebe9710 r5 c607d148 r6 00000000 r7 bebe9000
// r8 ef9a30c0 r9 ef9a30e4 r10 ef9a30e8 r11 f050c018
// ip ef9a3a28 sp c607d070 lr ef98611b pc ef95e6b8
//
// backtrace:
// #00 pc 0005a6b8 /system/lib/libgui.so (android::HpGraphicBufferProducer::query(int, int*)+4) (BuildId: 4aade65846c0a0844ffc6abd2cfae7f4)
// #01 pc 00082119 /system/lib/libgui.so (android::Surface::query(int, int*) const+132) (BuildId: 4aade65846c0a0844ffc6abd2cfae7f4)
// #02 pc 001f9073 /system/lib/libhwui.so (android::uirenderer::renderthread::CanvasContext::getNextFrameSize() const+20) (BuildId: 27f32025e8036c1421e970591d6452bf)
// #03 pc 001f9045 /system/lib/libhwui.so (android::uirenderer::TreeInfo::TreeInfo(android::uirenderer::TreeInfo::TraversalMode, android::uirenderer::renderthread::CanvasContext&)+104) (BuildId: 27f32025e8036c1421e970591d6452bf)
// #04 pc 001f8da7 /system/lib/libhwui.so (android::uirenderer::renderthread::DrawFrameTask::run()+74) (BuildId: 27f32025e8036c1421e970591d6452bf)
// #05 pc 0020742d /system/lib/libhwui.so (android::uirenderer::WorkQueue::process()+164) (BuildId: 27f32025e8036c1421e970591d6452bf)
// #06 pc 0020727f /system/lib/libhwui.so (android::uirenderer::renderthread::RenderThread::threadLoop()+54) (BuildId: 27f32025e8036c1421e970591d6452bf)
// #07 pc 0000d96f /system/lib/libutils.so (android::Thread::_threadLoop(void*)+210) (BuildId: 303a9d221465f0db9b5d760e0a0c6abe)
// #08 pc 000ab3bd /apex/com.android.runtime/lib/bionic/libc.so (__pthread_start(void*)+20) (BuildId: b8ea1bc56f976308b1ee7e2335b3127e)
// #09 pc 00061989 /apex/com.android.runtime/lib/bionic/libc.so (__start_thread+30) (BuildId: b8ea1bc56f976308b1ee7e2335b3127e)
// CRASH: com.my.app (pid 7417)
// Short Msg: Native crash
// Long Msg: Native crash: Segmentation fault
// Build Label: Lenovo/heart/heart:10/QKQ1.191014.001/11.5.250_200614:userdebug/test-keys
// Build Changelist: 11.5.250_200614
// Build Time: 1592147934000
// *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
// Build fingerprint: 'Lenovo/heart/heart:10/QKQ1.191014.001/11.5.250_200614:userdebug/test-keys'
// Revision: '0'
// ABI: 'arm'
// Timestamp: 2020-10-16 07:57:24+0800
// pid: 7417, tid: 28261, name: speakLocal tts >>> com.my.app <<<
// uid: 10291
// signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0xfffffff4
// r0 df8becc0 r1 00000000 r2 00000000 r3 00000001
// r4 df81ad20 r5 b356b6e0 r6 ef17a9b1 r7 000000a8
// r8 00000000 r9 ef1a4ad4 r10 ef1a4d08 r11 0065c5c0
// ip ef1a4ec4 sp b356b690 lr ef1933fd pc ef1935b4
//
// backtrace:
// #00 pc 000445b4 /system/lib/libmedia.so (android::IMediaDeathNotifier::getMediaPlayerService()+476) (BuildId: 4c77835059177de2000d6c39f9539962)
// #01 pc 0002b9cf /system/lib/libmedia.so (android::MediaPlayer::setDataSource(int, long long, long long)+30) (BuildId: 4c77835059177de2000d6c39f9539962)
// #02 pc 0003b873 /system/lib/libmedia_jni.so (android_media_MediaPlayer_setDataSourceFD(_JNIEnv*, _jobject*, _jobject*, long long, long long)+118) (BuildId: c190a7c755ffba7708c716e1dd16c0a1)
// #03 pc 0029c637 /system/framework/arm/boot-framework.oat (art_jni_trampoline+126) (BuildId: 39c685939f0d8867d4162c7a38d63ad3600807fd)
// #04 pc 006ce41b /system/framework/arm/boot-framework.oat (android.media.MediaPlayer.setDataSource+58) (BuildId: 39c685939f0d8867d4162c7a38d63ad3600807fd)
// #05 pc 006ce365 /system/framework/arm/boot-framework.oat (android.media.MediaPlayer.setDataSource+172) (BuildId: 39c685939f0d8867d4162c7a38d63ad3600807fd)
// #06 pc 000d7bc5 /apex/com.android.runtime/lib/libart.so (art_quick_invoke_stub_internal+68) (BuildId: 78cb259cd8aba2a9f6063413910ab653)
// #07 pc 0043d13d /apex/com.android.runtime/lib/libart.so (art_quick_invoke_stub+248) (BuildId: 78cb259cd8aba2a9f6063413910ab653)
// #08 pc 000dff81 /apex/com.android.runtime/lib/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+168) (BuildId: 78cb259cd8aba2a9f6063413910ab653)
// #09 pc 00214673 /apex/com.android.runtime/lib/libart.so (art::interpreter::ArtInterpreterToCompiledCodeBridge(art::Thread*, art::ArtMethod*, art::ShadowFrame*, unsigned short, art::JValue*)+270) (BuildId: 78cb259cd8aba2a9f6063413910ab653)
// #10 pc 00210867 /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*)+738) (BuildId: 78cb259cd8aba2a9f6063413910ab653)
// #11 pc 00437927 /apex/com.android.runtime/lib/libart.so (MterpInvokeVirtualQuick+458) (BuildId: 78cb259cd8aba2a9f6063413910ab653)
// #12 pc 000d6594 /apex/com.android.runtime/lib/libart.so (mterp_op_invoke_virtual_quick+20) (BuildId: 78cb259cd8aba2a9f6063413910ab653)
// #13 pc 00455d68 /data/app/com.lenovo.menu_assistant-XzP2MzG5jMAB7n94-EP3IQ==/oat/arm/base.vdex (sy.B+1356)
// #14 pc 00437b91 /apex/com.android.runtime/lib/libart.so (MterpInvokeVirtualQuick+1076) (BuildId: 78cb259cd8aba2a9f6063413910ab653)
// #15 pc 000d6594 /apex/com.android.runtime/lib/libart.so (mterp_op_invoke_virtual_quick+20) (BuildId: 78cb259cd8aba2a9f6063413910ab653)
// #16 pc 004555cc /data/app/com.lenovo.menu_assistant-XzP2MzG5jMAB7n94-EP3IQ==/oat/arm/base.vdex (sy.e)
// #17 pc 00434c9f /apex/com.android.runtime/lib/libart.so (MterpInvokeStatic+934) (BuildId: 78cb259cd8aba2a9f6063413910ab653)
// #18 pc 000d2994 /apex/com.android.runtime/lib/libart.so (mterp_op_invoke_static+20) (BuildId: 78cb259cd8aba2a9f6063413910ab653)
// #19 pc 00453e6c /data/app/com.lenovo.menu_assistant-XzP2MzG5jMAB7n94-EP3IQ==/oat/arm/base.vdex (sy$g.run+12)
// #20 pc 001f068f /apex/com.android.runtime/lib/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadERKNS_20CodeItemDataAccessorERNS_11ShadowFrameENS_6JValueEbb.llvm.8590219860024250152+166) (BuildId: 78cb259cd8aba2a9f6063413910ab653)
// #21 pc 001f50a3 /apex/com.android.runtime/lib/libart.so (art::interpreter::EnterInterpreterFromEntryPoint(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame*)+122) (BuildId: 78cb259cd8aba2a9f6063413910ab653)
// #22 pc 00426b97 /apex/com.android.runtime/lib/libart.so (artQuickToInterpreterBridge+866) (BuildId: 78cb259cd8aba2a9f6063413910ab653)
// #23 pc 000dc5a1 /apex/com.android.runtime/lib/libart.so (art_quick_to_interpreter_bridge+32) (BuildId: 78cb259cd8aba2a9f6063413910ab653)
// #24 pc 00173691 /system/framework/arm/boot.oat (java.lang.Thread.run+64) (BuildId: 625e004ba4396bf9751878502697218d94469522)
// #25 pc 000d7bc5 /apex/com.android.runtime/lib/libart.so (art_quick_invoke_stub_internal+68) (BuildId: 78cb259cd8aba2a9f6063413910ab653)
// #26 pc 0043d13d /apex/com.android.runtime/lib/libart.so (art_quick_invoke_stub+248) (BuildId: 78cb259cd8aba2a9f6063413910ab653)
// #27 pc 000dff81 /apex/com.android.runtime/lib/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+168) (BuildId: 78cb259cd8aba2a9f6063413910ab653)
// #28 pc 0037d507 /apex/com.android.runtime/lib/libart.so (art::(anonymous namespace)::InvokeWithArgArray(art::ScopedObjectAccessAlreadyRunnable const&, art::ArtMethod*, art::(anonymous namespace)::ArgArray*, art::JValue*, char const*)+54) (BuildId: 78cb259cd8aba2a9f6063413910ab653)
// #29 pc 0037e29b /apex/com.android.runtime/lib/libart.so (art::InvokeVirtualOrInterfaceWithJValues(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, _jmethodID*, jvalue const*)+302) (BuildId: 78cb259cd8aba2a9f6063413910ab653)
// #30 pc 003afeff /apex/com.android.runtime/lib/libart.so (art::Thread::CreateCallback(void*)+1018) (BuildId: 78cb259cd8aba2a9f6063413910ab653)
// #31 pc 000ab3bd /apex/com.android.runtime/lib/bionic/libc.so (__pthread_start(void*)+20) (BuildId: b8ea1bc56f976308b1ee7e2335b3127e)
// #32 pc 00061989 /apex/com.android.runtime/lib/bionic/libc.so (__start_thread+30) (BuildId: b8ea1bc56f976308b1ee7e2335b3127e)
I am new to android development. I developed an android application which was working perfectly fine before enabling R8. After obfuscating the application, I am getting the following error. I have no idea where am I going wrong.
Following is the Logcat console:
2020-01-28 16:16:09.404 5206-5206/? A/DEBUG: *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
2020-01-28 16:16:09.405 5206-5206/? A/DEBUG: Build fingerprint: 'samsung/j6ltecis/j6lte:9/PPR1.180610.011/J600FXXU5BSH5:user/release-keys'
2020-01-28 16:16:09.405 5206-5206/? A/DEBUG: Revision: '2'
2020-01-28 16:16:09.405 5206-5206/? A/DEBUG: ABI: 'arm'
2020-01-28 16:16:09.405 5206-5206/? A/DEBUG: pid: 5073, tid: 5073, name: e.peopleconnect >>> pk.com.ke.peopleconnect <<<
2020-01-28 16:16:09.405 5206-5206/? A/DEBUG: signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
2020-01-28 16:16:09.405 5206-5206/? A/DEBUG: Abort message: 'interpreter_common.h:269] Check failed: receiver->GetClass()->ShouldHaveEmbeddedVTable() '
2020-01-28 16:16:09.405 5206-5206/? A/DEBUG: r0 00000000 r1 000013d1 r2 00000006 r3 00000008
2020-01-28 16:16:09.405 5206-5206/? A/DEBUG: r4 000013d1 r5 000013d1 r6 fff98dac r7 0000010c
2020-01-28 16:16:09.405 5206-5206/? A/DEBUG: r8 0000000b r9 efecd000 r10 d4dfe09c r11 fff98ed0
2020-01-28 16:16:09.405 5206-5206/? A/DEBUG: ip 00000041 sp fff98d98 lr f3233115 pc f3229fce
2020-01-28 16:16:09.441 3242-3316/? D/SensorService: [SO] -1.307 4.961 9.835
2020-01-28 16:16:09.441 3242-3316/? D/SensorService: [SO] [0 -> 255]
2020-01-28 16:16:09.469 2818-26162/? V/APM_AudioPolicyManager: getAudioPolicyConfig: audioParam;outDevice
2020-01-28 16:16:09.470 2818-26162/? V/APM_AudioPolicyManager: getNewOutputDevice() selected device 0
2020-01-28 16:16:09.470 2818-26162/? V/APM_AudioPolicyManager: ### curdevice : 2
2020-01-28 16:16:09.592 3242-3384/? D/WifiTrafficPoller: TrafficStats TxPkts=394436 RxPkts=647369 TxBytes=46490190 RxBytes=822657331 , Foreground uid=10240 pkgName=pk.com.ke.peopleconnect TxPackets=84 RxPackets=73 TxBytes=12001 RxBytes=49973
2020-01-28 16:16:09.604 5206-5206/? A/DEBUG: backtrace:
2020-01-28 16:16:09.604 5206-5206/? A/DEBUG: #00 pc 0001cfce /system/lib/libc.so (abort+58)
2020-01-28 16:16:09.604 5206-5206/? A/DEBUG: #01 pc 0035e2ff /system/lib/libart.so (art::Runtime::Abort(char const*)+1034)
2020-01-28 16:16:09.604 5206-5206/? A/DEBUG: #02 pc 000071c3 /system/lib/libbase.so (android::base::LogMessage::~LogMessage()+506)
2020-01-28 16:16:09.605 5206-5206/? A/DEBUG: #03 pc 003f68fd /system/lib/libart.so (MterpInvokeVirtualQuick+548)
2020-01-28 16:16:09.605 5206-5206/? A/DEBUG: #04 pc 00417814 /system/lib/libart.so (ExecuteMterpImpl+29972)
2020-01-28 16:16:09.605 5206-5206/? A/DEBUG: #05 pc 001f309c /data/app/pk.com.ke.peopleconnect-3XBY7V7mKYeci83RcRrdaA==/oat/arm/base.vdex (pk.com.ke.peopleconnect.activities.K.a+116)
2020-01-28 16:16:09.605 5206-5206/? A/DEBUG: #06 pc 001cc457 /system/lib/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadERKNS_20CodeItemDataAccessorERNS_11ShadowFrameENS_6JValueEb.llvm.2255586636+354)
2020-01-28 16:16:09.605 5206-5206/? A/DEBUG: #07 pc 001d0d8f /system/lib/libart.so (art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame*, art::JValue*)+146)
2020-01-28 16:16:09.605 5206-5206/? A/DEBUG: #08 pc 001e7b3f /system/lib/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+762)
2020-01-28 16:16:09.605 5206-5206/? A/DEBUG: #09 pc 003f688b /system/lib/libart.so (MterpInvokeVirtualQuick+434)
2020-01-28 16:16:09.605 5206-5206/? A/DEBUG: #10 pc 00417814 /system/lib/libart.so (ExecuteMterpImpl+29972)
2020-01-28 16:16:09.605 5206-5206/? A/DEBUG: #11 pc 001f3010 /data/app/pk.com.ke.peopleconnect-3XBY7V7mKYeci83RcRrdaA==/oat/arm/base.vdex (pk.com.ke.peopleconnect.activities.K.success+4)
2020-01-28 16:16:09.605 5206-5206/? A/DEBUG: #12 pc 001cc457 /system/lib/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadERKNS_20CodeItemDataAccessorERNS_11ShadowFrameENS_6JValueEb.llvm.2255586636+354)
2020-01-28 16:16:09.605 5206-5206/? A/DEBUG: #13 pc 001d0d8f /system/lib/libart.so (art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame*, art::JValue*)+146)
2020-01-28 16:16:09.605 5206-5206/? A/DEBUG: #14 pc 001e7b3f /system/lib/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+762)
2020-01-28 16:16:09.605 5206-5206/? A/DEBUG: #15 pc 003f5001 /system/lib/libart.so (MterpInvokeInterface+1024)
2020-01-28 16:16:09.605 5206-5206/? A/DEBUG: #16 pc 00413c94 /system/lib/libart.so (ExecuteMterpImpl+14740)
2020-01-28 16:16:09.605 5206-5206/? A/DEBUG: #17 pc 001fcdd8 /data/app/pk.com.ke.peopleconnect-3XBY7V7mKYeci83RcRrdaA==/oat/arm/base.vdex (retrofit.CallbackRunnable$1.run+28)
2020-01-28 16:16:09.605 5206-5206/? A/DEBUG: #18 pc 001cc457 /system/lib/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadERKNS_20CodeItemDataAccessorERNS_11ShadowFrameENS_6JValueEb.llvm.2255586636+354)
2020-01-28 16:16:09.605 5206-5206/? A/DEBUG: #19 pc 001d0cdb /system/lib/libart.so (art::interpreter::EnterInterpreterFromEntryPoint(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame*)+82)
2020-01-28 16:16:09.605 5206-5206/? A/DEBUG: #20 pc 003e7ccb /system/lib/libart.so (artQuickToInterpreterBridge+882)
2020-01-28 16:16:09.605 5206-5206/? A/DEBUG: #21 pc 004252ff /system/lib/libart.so (art_quick_to_interpreter_bridge+30)
2020-01-28 16:16:09.605 5206-5206/? A/DEBUG: #22 pc 00987251 /system/framework/arm/boot-framework.oat (offset 0x3fd000) (android.os.Handler.dispatchMessage+64)
2020-01-28 16:16:09.605 5206-5206/? A/DEBUG: #23 pc 009899a3 /system/framework/arm/boot-framework.oat (offset 0x3fd000) (android.os.Looper.loop+1162)
2020-01-28 16:16:09.605 5206-5206/? A/DEBUG: #24 pc 007e30bb /system/framework/arm/boot-framework.oat (offset 0x3fd000) (android.app.ActivityThread.main+690)
2020-01-28 16:16:09.605 5206-5206/? A/DEBUG: #25 pc 00420d75 /system/lib/libart.so (art_quick_invoke_stub_internal+68)
2020-01-28 16:16:09.606 5206-5206/? A/DEBUG: #26 pc 003f988b /system/lib/libart.so (art_quick_invoke_static_stub+222)
2020-01-28 16:16:09.606 5206-5206/? A/DEBUG: #27 pc 000a181f /system/lib/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+154)
2020-01-28 16:16:09.606 5206-5206/? A/DEBUG: #28 pc 00358161 /system/lib/libart.so (art::(anonymous namespace)::InvokeWithArgArray(art::ScopedObjectAccessAlreadyRunnable const&, art::ArtMethod*, art::(anonymous namespace)::ArgArray*, art::JValue*, char const*)+52)
2020-01-28 16:16:09.606 5206-5206/? A/DEBUG: #29 pc 003595b3 /system/lib/libart.so (art::InvokeMethod(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, _jobject*, _jobject*, unsigned int)+962)
2020-01-28 16:16:09.606 5206-5206/? A/DEBUG: #30 pc 003080f5 /system/lib/libart.so (art::Method_invoke(_JNIEnv*, _jobject*, _jobject*, _jobjectArray*)+40)
2020-01-28 16:16:09.606 5206-5206/? A/DEBUG: #31 pc 0011328f /system/framework/arm/boot.oat (offset 0x10d000) (java.lang.Class.getDeclaredMethodInternal [DEDUPED]+110)
2020-01-28 16:16:09.606 5206-5206/? A/DEBUG: #32 pc 00bdcc4b /system/framework/arm/boot-framework.oat (offset 0x3fd000) (com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run+114)
2020-01-28 16:16:09.606 5206-5206/? A/DEBUG: #33 pc 00be2445 /system/framework/arm/boot-framework.oat (offset 0x3fd000) (com.android.internal.os.ZygoteInit.main+1916)
2020-01-28 16:16:09.606 5206-5206/? A/DEBUG: #34 pc 00420d75 /system/lib/libart.so (art_quick_invoke_stub_internal+68)
2020-01-28 16:16:09.606 5206-5206/? A/DEBUG: #35 pc 003f988b /system/lib/libart.so (art_quick_invoke_static_stub+222)
2020-01-28 16:16:09.606 5206-5206/? A/DEBUG: #36 pc 000a181f /system/lib/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+154)
2020-01-28 16:16:09.606 5206-5206/? A/DEBUG: #37 pc 00358161 /system/lib/libart.so (art::(anonymous namespace)::InvokeWithArgArray(art::ScopedObjectAccessAlreadyRunnable const&, art::ArtMethod*, art::(anonymous namespace)::ArgArray*, art::JValue*, char const*)+52)
2020-01-28 16:16:09.606 5206-5206/? A/DEBUG: #38 pc 00357f75 /system/lib/libart.so (art::InvokeWithVarArgs(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, _jmethodID*, std::__va_list)+300)
2020-01-28 16:16:09.606 5206-5206/? A/DEBUG: #39 pc 00299321 /system/lib/libart.so (art::JNI::CallStaticVoidMethodV(_JNIEnv*, _jclass*, _jmethodID*, std::__va_list)+476)
2020-01-28 16:16:09.606 5206-5206/? A/DEBUG: #40 pc 000712ff /system/lib/libandroid_runtime.so (_JNIEnv::CallStaticVoidMethod(_jclass*, _jmethodID*, ...)+38)
2020-01-28 16:16:09.606 5206-5206/? A/DEBUG: #41 pc 000737ab /system/lib/libandroid_runtime.so (android::AndroidRuntime::start(char const*, android::Vector<android::String8> const&, bool)+478)
2020-01-28 16:16:09.606 5206-5206/? A/DEBUG: #42 pc 00002f15 /system/bin/app_process32 (main+728)
2020-01-28 16:16:09.606 5206-5206/? A/DEBUG: #43 pc 0008de5d /system/lib/libc.so (__libc_init+48)
2020-01-28 16:16:09.606 5206-5206/? A/DEBUG: #44 pc 00002bfd /system/bin/app_process32 (_start_main+40)
2020-01-28 16:16:09.606 5206-5206/? A/DEBUG: #45 pc 00000306 <anonymous:f45d9000>
Following are default settings and dependencies used.
buildTypes {
release {
minifyEnabled true
debuggable false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
signingConfig signingConfigs.config
}
}
dependencies {
}
The issue was resolved on the R8 bug tracker, issue 148521210.