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
Related
am trying to activate the payment gateway in my app. after getting all data needed to open the payment page ( this includes all necessary data like token first name.... etc. ) . after that I should display a page. in this page the user must enter his card info.
my issue is: when trying to or when trying to open page using the WebView() am getting error like
java.lang.IllegalStateException: Platform view hasn't been initialized from the platform view channel.
I have already added the permission of using the internet in the manifesto file.
also, i set the minSdkVersion to 19 & compileSdkVersion 32 . in addention to that i run the flutter clean many times but this did not solve the issue .
my code below :
import 'dart:async';
import 'dart:io';
import 'package:flutter/material.dart';
import 'package:flutter/src/foundation/key.dart';
import 'package:flutter/src/widgets/framework.dart';
import 'package:webview_flutter/webview_flutter.dart';
import '../../shared/components/components.dart';
import '../../shared/components/const.dart';
class VisaCard extends StatefulWidget {
const VisCard({Key? key}) : super(key: key);
#override
State<VisCard> createState() => _VisCardState();
}
class _VisCardState extends State<VisCard> {
final Completer<WebViewController> _controller =
Completer<WebViewController>();
void initState() {
super.initState();
if (Platform.isAndroid) {
WebView.platform = SurfaceAndroidWebView();
}
}
#override
Widget build(BuildContext context) {
return Scaffold(
body: WebView(
initialUrl:"https://xxxxxxx/api/acceptance/iframes/684162?payment_token=${paymobFinalTokenCard}",
javascriptMode: JavascriptMode.unrestricted,
onWebViewCreated: (WebViewController webViewController) {
_controller.complete(webViewController);
},
// onProgress: (int progress) {
// print('WebView is loading (progress : $progress%)');
// },
javascriptChannels: <JavascriptChannel>{
_toasterJavascriptChannel(context),
},
onPageFinished: (String url) {
print('Page finished loading: $url');
},
gestureNavigationEnabled: true,
backgroundColor: const Color(0x00000000),
),
);
}
JavascriptChannel _toasterJavascriptChannel(BuildContext context) {
return JavascriptChannel(
name: 'Toaster',
onMessageReceived: (JavascriptMessage message) {
showSnackBar(context,message.toString() );
});
}
}
error message :
[WARNING:dns_config_service_android.cc(153)] Failed to read DnsConfig.
D/EGL_emulation( 8941): eglMakeCurrent: 0x7f336f68cf90: ver 2 0 (tinfo 0x7f359bd14080)
(first time)
**E/flutter ( 8941): [ERROR:flutter/fml/platform/android/jni_util.cc(204)] java.lang.IllegalStateException: Platform view hasn't been initialized from the platform view channel.**
E/flutter ( 8941): at io.flutter.plugin.platform.PlatformViewsController.initializePlatformViewIfNeeded(PlatformViewsController.java:732)
E/flutter ( 8941): at io.flutter.plugin.platform.PlatformViewsController.onDisplayPlatformView(PlatformViewsController.java:791)
E/flutter ( 8941): at io.flutter.embedding.engine.FlutterJNI.onDisplayPlatformView(FlutterJNI.java:1380)
E/flutter ( 8941): at android.os.MessageQueue.nativePollOnce(Native Method)
E/flutter ( 8941): at android.os.MessageQueue.next(MessageQueue.java:335)
E/flutter ( 8941): at android.os.Looper.loopOnce(Looper.java:161)
E/flutter ( 8941): at android.os.Looper.loop(Looper.java:288)
E/flutter ( 8941): at android.app.ActivityThread.main(ActivityThread.java:7839)
E/flutter ( 8941): at java.lang.reflect.Method.invoke(Native Method)
E/flutter ( 8941): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
E/flutter ( 8941): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1003)
E/flutter ( 8941):
F/flutter ( 8941): [FATAL:flutter/shell/platform/android/platform_view_android_jni_impl.cc(1469)] Check failed: fml::jni::CheckException(env).
F/libc ( 8941): Fatal signal 6 (SIGABRT), code -6 (SI_TKILL) in tid 8941 (ample.paymobone), pid 8941 (ample.paymobone)
*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
Build fingerprint: 'google/sdk_gphone64_x86_64/emulator64_x86_64_arm64:12/SE1A.211212.001.B1/8023802:user/release-keys'
Revision: '0'
ABI: 'x86_64'
Timestamp: 2022-10-18 02:10:20.176569800+0300
Process uptime: 0s
Cmdline: com.example.paymobone
pid: 8941, tid: 8941, name: ample.paymobone >>> com.example.paymobone <<<
uid: 10160
signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
Abort message: '[FATAL:flutter/shell/platform/android/platform_view_android_jni_impl.cc(1469)] Check failed: fml::jni::CheckException(env).
'
rax 0000000000000000 rbx 00000000000022ed rcx 00007f357d3205cf rdx 0000000000000006
r8 00007ffee229c9d0 r9 00007ffee229c9d0 r10 00007ffee229c970 r11 0000000000000217
r12 00007f334f6d4bf0 r13 00007ffee229cad0 r14 00007ffee229c968 r15 00000000000022ed
rdi 00000000000022ed rsi 00000000000022ed
rbp 0000000000000007 rsp 00007ffee229c960 rip 00007f357d3205cf
backtrace:
#00 pc 000000000005e5cf /apex/com.android.runtime/lib64/bionic/libc.so (abort+191) (BuildId: 5db8d317d3741b337ef046540bbdd0f7)
#01 pc 000000000160bf95 /data/app/~~MrR5iAtJNiBzJu6ee3Fmmg==/com.example.paymobone-cvQMP3KIgkxZaQO8P_dSzg==/lib/x86_64/libflutter.so (BuildId: 9292ed7a57d628289a096bc46aa71468ce209e08)
#02 pc 0000000001631394 /data/app/~~MrR5iAtJNiBzJu6ee3Fmmg==/com.example.paymobone-cvQMP3KIgkxZaQO8P_dSzg==/lib/x86_64/libflutter.so (BuildId: 9292ed7a57d628289a096bc46aa71468ce209e08)
#03 pc 00000000016183d6 /data/app/~~MrR5iAtJNiBzJu6ee3Fmmg==/com.example.paymobone-cvQMP3KIgkxZaQO8P_dSzg==/lib/x86_64/libflutter.so (BuildId: 9292ed7a57d628289a096bc46aa71468ce209e08)
#04 pc 0000000001d847d9 /data/app/~~MrR5iAtJNiBzJu6ee3Fmmg==/com.example.paymobone-cvQMP3KIgkxZaQO8P_dSzg==/lib/x86_64/libflutter.so (BuildId: 9292ed7a57d628289a096bc46aa71468ce209e08)
#05 pc 00000000019b6578 /data/app/~~MrR5iAtJNiBzJu6ee3Fmmg==/com.example.paymobone-cvQMP3KIgkxZaQO8P_dSzg==/lib/x86_64/libflutter.so (BuildId: 9292ed7a57d628289a096bc46aa71468ce209e08)
#06 pc 00000000019b506a /data/app/~~MrR5iAtJNiBzJu6ee3Fmmg==/com.example.paymobone-cvQMP3KIgkxZaQO8P_dSzg==/lib/x86_64/libflutter.so (BuildId: 9292ed7a57d628289a096bc46aa71468ce209e08)
#07 pc 00000000019b5be3 /data/app/~~MrR5iAtJNiBzJu6ee3Fmmg==/com.example.paymobone-cvQMP3KIgkxZaQO8P_dSzg==/lib/x86_64/libflutter.so (BuildId: 9292ed7a57d628289a096bc46aa71468ce209e08)
#08 pc 00000000019b6b0d /data/app/~~MrR5iAtJNiBzJu6ee3Fmmg==/com.example.paymobone-cvQMP3KIgkxZaQO8P_dSzg==/lib/x86_64/libflutter.so (BuildId: 9292ed7a57d628289a096bc46aa71468ce209e08)
#09 pc 00000000019b553b /data/app/~~MrR5iAtJNiBzJu6ee3Fmmg==/com.example.paymobone-cvQMP3KIgkxZaQO8P_dSzg==/lib/x86_64/libflutter.so (BuildId: 9292ed7a57d628289a096bc46aa71468ce209e08)
#10 pc 00000000019b5234 /data/app/~~MrR5iAtJNiBzJu6ee3Fmmg==/com.example.paymobone-cvQMP3KIgkxZaQO8P_dSzg==/lib/x86_64/libflutter.so (BuildId: 9292ed7a57d628289a096bc46aa71468ce209e08)
#11 pc 00000000019b6d9c /data/app/~~MrR5iAtJNiBzJu6ee3Fmmg==/com.example.paymobone-cvQMP3KIgkxZaQO8P_dSzg==/lib/x86_64/libflutter.so (BuildId: 9292ed7a57d628289a096bc46aa71468ce209e08)
#12 pc 0000000001631f33 /data/app/~~MrR5iAtJNiBzJu6ee3Fmmg==/com.example.paymobone-cvQMP3KIgkxZaQO8P_dSzg==/lib/x86_64/libflutter.so (BuildId: 9292ed7a57d628289a096bc46aa71468ce209e08)
#13 pc 000000000163734a /data/app/~~MrR5iAtJNiBzJu6ee3Fmmg==/com.example.paymobone-cvQMP3KIgkxZaQO8P_dSzg==/lib/x86_64/libflutter.so (BuildId: 9292ed7a57d628289a096bc46aa71468ce209e08)
#14 pc 0000000000018475 /system/lib64/libutils.so (android::Looper::pollInner(int)+1013) (BuildId: 0b21e18f17c36471b0becec44f99518b)
#15 pc 000000000001801e /system/lib64/libutils.so (android::Looper::pollOnce(int, int*, int*, void**)+126) (BuildId: 0b21e18f17c36471b0becec44f99518b)
#16 pc 000000000015d253 /system/lib64/libandroid_runtime.so (android::android_os_MessageQueue_nativePollOnce(_JNIEnv*, _jobject*, long, int)+35) (BuildId: f90004a78069fa4c4e587a2081d386cd)
#17 pc 00000000001ab568 /system/framework/x86_64/boot-framework.oat (art_jni_trampoline+120) (BuildId: 5ead3b6496eb4808298a4612fe10561bbd30f354)
#18 pc 0000000002003e6e /memfd:jit-cache (deleted) (android.os.MessageQueue.next+206)
#19 pc 0000000002007082 /memfd:jit-cache (deleted) (android.os.Looper.loopOnce+162)
#20 pc 0000000000395376 /apex/com.android.art/lib64/libart.so (art_quick_invoke_static_stub+806) (BuildId: cfc3de5d1c7b2855effeb77a784fc353)
#21 pc 000000000041da09 /apex/com.android.art/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+233) (BuildId: cfc3de5d1c7b2855effeb77a784fc353)
#22 pc 00000000005a335c /apex/com.android.art/lib64/libart.so (art::interpreter::ArtInterpreterToCompiledCodeBridge(art::Thread*, art::ArtMethod*, art::ShadowFrame*, unsigned short, art::JValue*)+428) (BuildId: cfc3de5d1c7b2855effeb77a784fc353)
#23 pc 000000000059d16c /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*)+1036) (BuildId: cfc3de5d1c7b2855effeb77a784fc353)
#24 pc 000000000097c172 /apex/com.android.art/lib64/libart.so (MterpInvokeStatic+1410) (BuildId: cfc3de5d1c7b2855effeb77a784fc353)
#25 pc 000000000037e899 /apex/com.android.art/lib64/libart.so (mterp_op_invoke_static+25) (BuildId: cfc3de5d1c7b2855effeb77a784fc353)
#26 pc 000000000044d768 /system/framework/framework.jar
#27 pc 000000000097c90d /apex/com.android.art/lib64/libart.so (MterpInvokeStatic+3357) (BuildId: cfc3de5d1c7b2855effeb77a784fc353)
#28 pc 000000000037e899 /apex/com.android.art/lib64/libart.so (mterp_op_invoke_static+25) (BuildId: cfc3de5d1c7b2855effeb77a784fc353)
#29 pc 00000000001c85ca /system/framework/framework.jar
#30 pc 0000000000594b42 /apex/com.android.art/lib64/libart.so (art::interpreter::Execute(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame&, art::JValue, bool, bool)+306) (BuildId: cfc3de5d1c7b2855effeb77a784fc353)
#31 pc 0000000000959a6f /apex/com.android.art/lib64/libart.so (artQuickToInterpreterBridge+1007) (BuildId: cfc3de5d1c7b2855effeb77a784fc353)
#32 pc 00000000003a04bc /apex/com.android.art/lib64/libart.so (art_quick_to_interpreter_bridge+140) (BuildId: cfc3de5d1c7b2855effeb77a784fc353)
#33 pc 0000000000395376 /apex/com.android.art/lib64/libart.so (art_quick_invoke_static_stub+806) (BuildId: cfc3de5d1c7b2855effeb77a784fc353)
#34 pc 000000000041da09 /apex/com.android.art/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+233) (BuildId: cfc3de5d1c7b2855effeb77a784fc353)
#35 pc 0000000000819502 /apex/com.android.art/lib64/libart.so (_jobject* art::InvokeMethod<(art::PointerSize)8>(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, _jobject*, _jobject*, unsigned long)+1442) (BuildId: cfc3de5d1c7b2855effeb77a784fc353)
#36 pc 0000000000772728 /apex/com.android.art/lib64/libart.so (art::Method_invoke(_JNIEnv*, _jobject*, _jobject*, _jobjectArray*)+56) (BuildId: cfc3de5d1c7b2855effeb77a784fc353)
#37 pc 00000000000b5a30 /apex/com.android.art/javalib/x86_64/boot.oat (art_jni_trampoline+144) (BuildId: d92cc57761604ac2f5849e74a41f38bf70ac7a09)
#38 pc 0000000000395014 /apex/com.android.art/lib64/libart.so (art_quick_invoke_stub+756) (BuildId: cfc3de5d1c7b2855effeb77a784fc353)
#39 pc 000000000041d9fa /apex/com.android.art/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+218) (BuildId: cfc3de5d1c7b2855effeb77a784fc353)
#40 pc 00000000005a335c /apex/com.android.art/lib64/libart.so (art::interpreter::ArtInterpreterToCompiledCodeBridge(art::Thread*, art::ArtMethod*, art::ShadowFrame*, unsigned short, art::JValue*)+428) (BuildId: cfc3de5d1c7b2855effeb77a784fc353)
#41 pc 000000000059d16c /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*)+1036) (BuildId: cfc3de5d1c7b2855effeb77a784fc353)
#42 pc 000000000096e305 /apex/com.android.art/lib64/libart.so (MterpInvokeVirtual+1349) (BuildId: cfc3de5d1c7b2855effeb77a784fc353)
#43 pc 000000000037e719 /apex/com.android.art/lib64/libart.so (mterp_op_invoke_virtual+25) (BuildId: cfc3de5d1c7b2855effeb77a784fc353)
#44 pc 000000000024800e /system/framework/framework.jar
#45 pc 0000000000594b42 /apex/com.android.art/lib64/libart.so (art::interpreter::Execute(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame&, art::JValue, bool, bool)+306) (BuildId: cfc3de5d1c7b2855effeb77a784fc353)
#46 pc 0000000000959a6f /apex/com.android.art/lib64/libart.so (artQuickToInterpreterBridge+1007) (BuildId: cfc3de5d1c7b2855effeb77a784fc353)
#47 pc 00000000003a04bc /apex/com.android.art/lib64/libart.so (art_quick_to_interpreter_bridge+140) (BuildId: cfc3de5d1c7b2855effeb77a784fc353)
#48 pc 00000000008b3621 /system/framework/x86_64/boot-framework.oat (com.android.internal.os.ZygoteInit.main+2049) (BuildId: 5ead3b6496eb4808298a4612fe10561bbd30f354)
#49 pc 0000000000395376 /apex/com.android.art/lib64/libart.so (art_quick_invoke_static_stub+806) (BuildId: cfc3de5d1c7b2855effeb77a784fc353)
#50 pc 000000000041da09 /apex/com.android.art/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+233) (BuildId: cfc3de5d1c7b2855effeb77a784fc353)
#51 pc 0000000000819eb1 /apex/com.android.art/lib64/libart.so (art::JValue art::InvokeWithVarArgs<art::ArtMethod*>(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, art::ArtMethod*, __va_list_tag*)+465) (BuildId: cfc3de5d1c7b2855effeb77a784fc353)
#52 pc 00000000006ce8ac /apex/com.android.art/lib64/libart.so (art::JNI<true>::CallStaticVoidMethodV(_JNIEnv*, _jclass*, _jmethodID*, __va_list_tag*)+620) (BuildId: cfc3de5d1c7b2855effeb77a784fc353)
#53 pc 00000000000c6374 /system/lib64/libandroid_runtime.so (_JNIEnv::CallStaticVoidMethod(_jclass*, _jmethodID*, ...)+164) (BuildId: f90004a78069fa4c4e587a2081d386cd)
#54 pc 00000000000d2a71 /system/lib64/libandroid_runtime.so (android::AndroidRuntime::start(char const*, android::Vector<android::String8> const&, bool)+865) (BuildId: f90004a78069fa4c4e587a2081d386cd)
#55 pc 0000000000002f9f /system/bin/app_process64 (main+1599) (BuildId: 5c47dfdf42370b14f9eaa0b58a1dedf3)
#56 pc 0000000000050079 /apex/com.android.runtime/lib64/bionic/libc.so (__libc_init+89) (BuildId: 5db8d317d3741b337ef046540bbdd0f7)
**Lost connection to device.**
This may be a bug in Flutter, you can check out the bug#112542 on GitHub。
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 using webview and glide to display an image.
always running in the foreground
The app closes after a certain period of time with the message below
I added firebase crashlytics but firebase crashlytics does not catch the error
and i didn't find where the error is coming from
You can guess from the log below
2022-03-17 04:06:25.493 4679-4679/? A/libc: Fatal signal 6 (SIGABRT), code -6 (SI_TKILL) in tid 4679 (com.sinwho.app), pid 4679 (com.sinwho.app)
2022-03-17 04:06:25.570 16951-16951/? A/DEBUG: *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
2022-03-17 04:06:25.570 16951-16951/? A/DEBUG: Build fingerprint: 'ODROID/odroidn2/odroidn2:9/PPR1.180610.011/20220314:eng/test-keys'
2022-03-17 04:06:25.570 16951-16951/? A/DEBUG: Revision: '0'
2022-03-17 04:06:25.570 16951-16951/? A/DEBUG: ABI: 'arm'
2022-03-17 04:06:25.570 16951-16951/? A/DEBUG: pid: 4679, tid: 4679, name: com.sinwho.app >>> com.sinwho.app <<<
2022-03-17 04:06:25.570 16951-16951/? A/DEBUG: signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
2022-03-17 04:06:25.570 16951-16951/? A/DEBUG: Abort message: 'ubsan: add-overflow'
2022-03-17 04:06:25.570 16951-16951/? A/DEBUG: r0 00000000 r1 00001247 r2 00000006 r3 eed26918
2022-03-17 04:06:25.570 16951-16951/? A/DEBUG: r4 00001247 r5 00001247 r6 ff9a0d3c r7 0000010c
2022-03-17 04:06:25.570 16951-16951/? A/DEBUG: r8 ff9a0e20 r9 00000004 r10 00000000 r11 00000000
2022-03-17 04:06:25.570 16951-16951/? A/DEBUG: ip 00000041 sp ff9a0d28 lr eecb50e5 pc eecace72
2022-03-17 04:06:26.018 16951-16951/? A/DEBUG: backtrace:
2022-03-17 04:06:26.018 16951-16951/? A/DEBUG: #00 pc 0001ce72 /system/lib/libc.so (abort+62)
2022-03-17 04:06:26.018 16951-16951/? A/DEBUG: #01 pc 00016bc4 /system/lib/libminikin.so (abort_with_message(char const*)+24)
2022-03-17 04:06:26.018 16951-16951/? A/DEBUG: #02 pc 00016c20 /system/lib/libminikin.so (__ubsan_handle_add_overflow_minimal_abort+24)
2022-03-17 04:06:26.018 16951-16951/? A/DEBUG: #03 pc 0000f2ef /system/lib/libminikin.so (void minikin::LayoutCache::getOrCreate<minikin::LayoutAppendFunctor>(minikin::U16StringPiece const&, minikin::Range const&, minikin::MinikinPaint const&, bool, minikin::StartHyphenEdit, minikin::EndHyphenEdit, minikin::LayoutAppendFunctor&)+542)
2022-03-17 04:06:26.018 16951-16951/? A/DEBUG: #04 pc 0000edf1 /system/lib/libminikin.so (minikin::Layout::doLayoutWord(unsigned short const*, unsigned int, unsigned int, unsigned int, bool, minikin::MinikinPaint const&, unsigned int, minikin::StartHyphenEdit, minikin::EndHyphenEdit, minikin::LayoutPieces const*, minikin::Layout*, float*, minikin::MinikinExtent*, minikin::MinikinRect*, minikin::LayoutPieces*)+204)
2022-03-17 04:06:26.018 16951-16951/? A/DEBUG: #05 pc 0000e999 /system/lib/libminikin.so (minikin::Layout::doLayoutRunCached(minikin::U16StringPiece const&, minikin::Range const&, bool, minikin::MinikinPaint const&, unsigned int, minikin::StartHyphenEdit, minikin::EndHyphenEdit, minikin::LayoutPieces const*, minikin::Layout*, float*, minikin::MinikinExtent*, minikin::MinikinRect*, minikin::LayoutPieces*)+244)
2022-03-17 04:06:26.018 16951-16951/? A/DEBUG: #06 pc 0000e86b /system/lib/libminikin.so (minikin::Layout::doLayout(minikin::U16StringPiece const&, minikin::Range const&, minikin::Bidi, minikin::MinikinPaint const&, minikin::StartHyphenEdit, minikin::EndHyphenEdit)+210)
2022-03-17 04:06:26.018 16951-16951/? A/DEBUG: #07 pc 00088ef1 /system/lib/libhwui.so (android::MinikinUtils::doLayout(android::Paint const*, minikin::Bidi, android::Typeface const*, unsigned short const*, unsigned int, unsigned int, unsigned int, minikin::MeasuredText*)+148)
2022-03-17 04:06:26.018 16951-16951/? A/DEBUG: #08 pc 003718ad /system/lib/libhwui.so (android::Canvas::drawText(unsigned short const*, int, int, int, float, float, minikin::Bidi, android::Paint const&, android::Typeface const*, minikin::MeasuredText*)+76)
2022-03-17 04:06:26.018 16951-16951/? A/DEBUG: #09 pc 000c9035 /system/lib/libandroid_runtime.so (android::CanvasJNI::drawTextString(_JNIEnv*, _jobject*, long long, _jstring*, int, int, float, float, int, long long)+86)
2022-03-17 04:06:26.018 16951-16951/? A/DEBUG: #10 pc 003d0ddb /system/framework/arm/boot-framework.oat (offset 0x3ac000) (android.view.RecordingCanvas.nDrawText [DEDUPED]+194)
2022-03-17 04:06:26.018 16951-16951/? A/DEBUG: #11 pc 0001e631 /dev/ashmem/dalvik-jit-code-cache (deleted) (android.view.RecordingCanvas.drawText+120)
2022-03-17 04:06:26.018 16951-16951/? A/DEBUG: #12 pc 00007d43 /dev/ashmem/dalvik-jit-code-cache (deleted) (android.text.BoringLayout.draw+106)
2022-03-17 04:06:26.018 16951-16951/? A/DEBUG: #13 pc 0001b92b /dev/ashmem/dalvik-jit-code-cache (deleted) (android.widget.TextView.onDraw+2962)
2022-03-17 04:06:26.018 16951-16951/? A/DEBUG: #14 pc 00019529 /dev/ashmem/dalvik-jit-code-cache (deleted) (android.view.View.draw+232)
2022-03-17 04:06:26.018 16951-16951/? A/DEBUG: #15 pc 000134e3 /dev/ashmem/dalvik-jit-code-cache (deleted) (android.view.View.updateDisplayListIfDirty+690)
2022-03-17 04:06:26.019 16951-16951/? A/DEBUG: #16 pc 00014177 /dev/ashmem/dalvik-jit-code-cache (deleted) (android.view.ViewGroup.recreateChildDisplayList+70)
2022-03-17 04:06:26.019 16951-16951/? A/DEBUG: #17 pc 000142a9 /dev/ashmem/dalvik-jit-code-cache (deleted) (android.view.ViewGroup.dispatchGetDisplayList+144)
2022-03-17 04:06:26.019 16951-16951/? A/DEBUG: #18 pc 00013319 /dev/ashmem/dalvik-jit-code-cache (deleted) (android.view.View.updateDisplayListIfDirty+232)
2022-03-17 04:06:26.019 16951-16951/? A/DEBUG: #19 pc 00014177 /dev/ashmem/dalvik-jit-code-cache (deleted) (android.view.ViewGroup.recreateChildDisplayList+70)
2022-03-17 04:06:26.019 16951-16951/? A/DEBUG: #20 pc 000142a9 /dev/ashmem/dalvik-jit-code-cache (deleted) (android.view.ViewGroup.dispatchGetDisplayList+144)
2022-03-17 04:06:26.019 16951-16951/? A/DEBUG: #21 pc 00013319 /dev/ashmem/dalvik-jit-code-cache (deleted) (android.view.View.updateDisplayListIfDirty+232)
2022-03-17 04:06:26.019 16951-16951/? A/DEBUG: #22 pc 00014177 /dev/ashmem/dalvik-jit-code-cache (deleted) (android.view.ViewGroup.recreateChildDisplayList+70)
2022-03-17 04:06:26.019 16951-16951/? A/DEBUG: #23 pc 000142a9 /dev/ashmem/dalvik-jit-code-cache (deleted) (android.view.ViewGroup.dispatchGetDisplayList+144)
2022-03-17 04:06:26.019 16951-16951/? A/DEBUG: #24 pc 00013319 /dev/ashmem/dalvik-jit-code-cache (deleted) (android.view.View.updateDisplayListIfDirty+232)
2022-03-17 04:06:26.019 16951-16951/? A/DEBUG: #25 pc 00014177 /dev/ashmem/dalvik-jit-code-cache (deleted) (android.view.ViewGroup.recreateChildDisplayList+70)
2022-03-17 04:06:26.019 16951-16951/? A/DEBUG: #26 pc 000142a9 /dev/ashmem/dalvik-jit-code-cache (deleted) (android.view.ViewGroup.dispatchGetDisplayList+144)
2022-03-17 04:06:26.019 16951-16951/? A/DEBUG: #27 pc 00013319 /dev/ashmem/dalvik-jit-code-cache (deleted) (android.view.View.updateDisplayListIfDirty+232)
2022-03-17 04:06:26.019 16951-16951/? A/DEBUG: #28 pc 00014177 /dev/ashmem/dalvik-jit-code-cache (deleted) (android.view.ViewGroup.recreateChildDisplayList+70)
2022-03-17 04:06:26.019 16951-16951/? A/DEBUG: #29 pc 000142a9 /dev/ashmem/dalvik-jit-code-cache (deleted) (android.view.ViewGroup.dispatchGetDisplayList+144)
2022-03-17 04:06:26.019 16951-16951/? A/DEBUG: #30 pc 00013319 /dev/ashmem/dalvik-jit-code-cache (deleted) (android.view.View.updateDisplayListIfDirty+232)
2022-03-17 04:06:26.019 16951-16951/? A/DEBUG: #31 pc 00014177 /dev/ashmem/dalvik-jit-code-cache (deleted) (android.view.ViewGroup.recreateChildDisplayList+70)
2022-03-17 04:06:26.019 16951-16951/? A/DEBUG: #32 pc 000142a9 /dev/ashmem/dalvik-jit-code-cache (deleted) (android.view.ViewGroup.dispatchGetDisplayList+144)
2022-03-17 04:06:26.019 16951-16951/? A/DEBUG: #33 pc 00013319 /dev/ashmem/dalvik-jit-code-cache (deleted) (android.view.View.updateDisplayListIfDirty+232)
2022-03-17 04:06:26.019 16951-16951/? A/DEBUG: #34 pc 00014177 /dev/ashmem/dalvik-jit-code-cache (deleted) (android.view.ViewGroup.recreateChildDisplayList+70)
2022-03-17 04:06:26.019 16951-16951/? A/DEBUG: #35 pc 000142a9 /dev/ashmem/dalvik-jit-code-cache (deleted) (android.view.ViewGroup.dispatchGetDisplayList+144)
2022-03-17 04:06:26.019 16951-16951/? A/DEBUG: #36 pc 00013319 /dev/ashmem/dalvik-jit-code-cache (deleted) (android.view.View.updateDisplayListIfDirty+232)
2022-03-17 04:06:26.019 16951-16951/? A/DEBUG: #37 pc 00014177 /dev/ashmem/dalvik-jit-code-cache (deleted) (android.view.ViewGroup.recreateChildDisplayList+70)
2022-03-17 04:06:26.019 16951-16951/? A/DEBUG: #38 pc 000142a9 /dev/ashmem/dalvik-jit-code-cache (deleted) (android.view.ViewGroup.dispatchGetDisplayList+144)
2022-03-17 04:06:26.019 16951-16951/? A/DEBUG: #39 pc 00013319 /dev/ashmem/dalvik-jit-code-cache (deleted) (android.view.View.updateDisplayListIfDirty+232)
2022-03-17 04:06:26.019 16951-16951/? A/DEBUG: #40 pc 0001ca77 /dev/ashmem/dalvik-jit-code-cache (deleted) (android.view.ThreadedRenderer.updateViewTreeDisplayList+86)
2022-03-17 04:06:26.019 16951-16951/? A/DEBUG: #41 pc 000183f9 /dev/ashmem/dalvik-jit-code-cache (deleted) (android.view.ThreadedRenderer.updateRootDisplayList+80)
2022-03-17 04:06:26.019 16951-16951/? A/DEBUG: #42 pc 0001a81f /dev/ashmem/dalvik-jit-code-cache (deleted) (android.view.ThreadedRenderer.draw+110)
2022-03-17 04:06:26.019 16951-16951/? A/DEBUG: #43 pc 0001c435 /dev/ashmem/dalvik-jit-code-cache (deleted) (android.view.ViewRootImpl.draw+1636)
2022-03-17 04:06:26.019 16951-16951/? A/DEBUG: #44 pc 0001d1a5 /dev/ashmem/dalvik-jit-code-cache (deleted) (android.view.ViewRootImpl.performDraw+340)
2022-03-17 04:06:26.019 16951-16951/? A/DEBUG: #45 pc 000226d3 /dev/ashmem/dalvik-jit-code-cache (deleted) (android.view.ViewRootImpl.performTraversals+10674)
2022-03-17 04:06:26.019 16951-16951/? A/DEBUG: #46 pc 00009a4f /dev/ashmem/dalvik-jit-code-cache (deleted) (android.view.ViewRootImpl.doTraversal+150)
2022-03-17 04:06:26.019 16951-16951/? A/DEBUG: #47 pc 0000b961 /dev/ashmem/dalvik-jit-code-cache (deleted) (android.view.ViewRootImpl$TraversalRunnable.run+48)
2022-03-17 04:06:26.019 16951-16951/? A/DEBUG: #48 pc 00016f1b /dev/ashmem/dalvik-jit-code-cache (deleted) (android.view.Choreographer$CallbackRecord.run+186)
2022-03-17 04:06:26.019 16951-16951/? A/DEBUG: #49 pc 00014791 /dev/ashmem/dalvik-jit-code-cache (deleted) (android.view.Choreographer.doCallbacks+496)
2022-03-17 04:06:26.019 16951-16951/? A/DEBUG: #50 pc 00015487 /dev/ashmem/dalvik-jit-code-cache (deleted) (android.view.Choreographer.doFrame+934)
2022-03-17 04:06:26.019 16951-16951/? A/DEBUG: #51 pc 00025005 /dev/ashmem/dalvik-jit-code-cache (deleted) (android.view.Choreographer$FrameDisplayEventReceiver.run+68)
2022-03-17 04:06:26.019 16951-16951/? A/DEBUG: #52 pc 00025d8d /dev/ashmem/dalvik-jit-code-cache (deleted) (android.os.Handler.handleCallback+52)
2022-03-17 04:06:26.020 16951-16951/? A/DEBUG: #53 pc 00019143 /dev/ashmem/dalvik-jit-code-cache (deleted) (android.os.Handler.dispatchMessage+58)
2022-03-17 04:06:26.020 16951-16951/? A/DEBUG: #54 pc 0003be7d /dev/ashmem/dalvik-jit-code-cache (deleted) (android.os.Looper.loop+892)
2022-03-17 04:06:26.020 16951-16951/? A/DEBUG: #55 pc 00417dbb /system/lib/libart.so (art_quick_osr_stub+42)
2022-03-17 04:06:26.020 16951-16951/? A/DEBUG: #56 pc 0024ea41 /system/lib/libart.so (art::jit::Jit::MaybeDoOnStackReplacement(art::Thread*, art::ArtMethod*, unsigned int, int, art::JValue*)+1464)
2022-03-17 04:06:26.020 16951-16951/? A/DEBUG: #57 pc 003f08e7 /system/lib/libart.so (MterpMaybeDoOnStackReplacement+86)
2022-03-17 04:06:26.020 16951-16951/? A/DEBUG: #58 pc 004174f4 /system/lib/libart.so (ExecuteMterpImpl+66164)
2022-03-17 04:06:26.020 16951-16951/? A/DEBUG: #59 pc 00aef8fc /system/framework/boot-framework.vdex (android.os.Looper.loop+928)
2022-03-17 04:06:26.020 16951-16951/? A/DEBUG: #60 pc 001c7e89 /system/lib/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadERKNS_20CodeItemDataAccessorERNS_11ShadowFrameENS_6JValueEb.llvm.2193211614+352)
2022-03-17 04:06:26.020 16951-16951/? A/DEBUG: #61 pc 001cc757 /system/lib/libart.so (art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame*, art::JValue*)+146)
2022-03-17 04:06:26.020 16951-16951/? A/DEBUG: #62 pc 001e34fb /system/lib/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+754)
2022-03-17 04:06:26.020 16951-16951/? A/DEBUG: #63 pc 003eceeb /system/lib/libart.so (MterpInvokeStatic+130)
2022-03-17 04:06:26.020 16951-16951/? A/DEBUG: #64 pc 0040ab94 /system/lib/libart.so (ExecuteMterpImpl+14612)
2022-03-17 04:06:26.020 16951-16951/? A/DEBUG: #65 pc 00385e9a /system/framework/boot-framework.vdex (android.app.ActivityThread.main+214)
2022-03-17 04:06:26.020 16951-16951/? A/DEBUG: #66 pc 001c7e89 /system/lib/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadERKNS_20CodeItemDataAccessorERNS_11ShadowFrameENS_6JValueEb.llvm.2193211614+352)
2022-03-17 04:06:26.020 16951-16951/? A/DEBUG: #67 pc 001cc6a3 /system/lib/libart.so (art::interpreter::EnterInterpreterFromEntryPoint(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame*)+82)
2022-03-17 04:06:26.020 16951-16951/? A/DEBUG: #68 pc 003df753 /system/lib/libart.so (artQuickToInterpreterBridge+890)
2022-03-17 04:06:26.020 16951-16951/? A/DEBUG: #69 pc 0041c2ff /system/lib/libart.so (art_quick_to_interpreter_bridge+30)
2022-03-17 04:06:26.020 16951-16951/? A/DEBUG: #70 pc 00417d75 /system/lib/libart.so (art_quick_invoke_stub_internal+68)
2022-03-17 04:06:26.020 16951-16951/? A/DEBUG: #71 pc 003f13eb /system/lib/libart.so (art_quick_invoke_static_stub+222)
2022-03-17 04:06:26.020 16951-16951/? A/DEBUG: #72 pc 000a1043 /system/lib/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+154)
2022-03-17 04:06:26.020 16951-16951/? A/DEBUG: #73 pc 00350a6d /system/lib/libart.so (art::(anonymous namespace)::InvokeWithArgArray(art::ScopedObjectAccessAlreadyRunnable const&, art::ArtMethod*, art::(anonymous namespace)::ArgArray*, art::JValue*, char const*)+52)
2022-03-17 04:06:26.020 16951-16951/? A/DEBUG: #74 pc 00351eb5 /system/lib/libart.so (art::InvokeMethod(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, _jobject*, _jobject*, unsigned int)+960)
2022-03-17 04:06:26.020 16951-16951/? A/DEBUG: #75 pc 00302bd9 /system/lib/libart.so (art::Method_invoke(_JNIEnv*, _jobject*, _jobject*, _jobjectArray*)+40)
2022-03-17 04:06:26.020 16951-16951/? A/DEBUG: #76 pc 001121ff /system/framework/arm/boot.oat (offset 0x10c000) (java.lang.Class.getDeclaredMethodInternal [DEDUPED]+110)
2022-03-17 04:06:26.020 16951-16951/? A/DEBUG: #77 pc 00417d75 /system/lib/libart.so (art_quick_invoke_stub_internal+68)
2022-03-17 04:06:26.020 16951-16951/? A/DEBUG: #78 pc 003f12e7 /system/lib/libart.so (art_quick_invoke_stub+226)
2022-03-17 04:06:26.020 16951-16951/? A/DEBUG: #79 pc 000a1031 /system/lib/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+136)
2022-03-17 04:06:26.020 16951-16951/? A/DEBUG: #80 pc 001e8835 /system/lib/libart.so (art::interpreter::ArtInterpreterToCompiledCodeBridge(art::Thread*, art::ArtMethod*, art::ShadowFrame*, unsigned short, art::JValue*)+232)
2022-03-17 04:06:26.020 16951-16951/? A/DEBUG: #81 pc 001e3511 /system/lib/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+776)
2022-03-17 04:06:26.020 16951-16951/? A/DEBUG: #82 pc 003ebf0f /system/lib/libart.so (MterpInvokeVirtual+442)
2022-03-17 04:06:26.020 16951-16951/? A/DEBUG: #83 pc 0040aa14 /system/lib/libart.so (ExecuteMterpImpl+14228)
2022-03-17 04:06:26.020 16951-16951/? A/DEBUG: #84 pc 00c10612 /system/framework/boot-framework.vdex (com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run+22)
2022-03-17 04:06:26.020 16951-16951/? A/DEBUG: #85 pc 001c7e89 /system/lib/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadERKNS_20CodeItemDataAccessorERNS_11ShadowFrameENS_6JValueEb.llvm.2193211614+352)
2022-03-17 04:06:26.020 16951-16951/? A/DEBUG: #86 pc 001cc6a3 /system/lib/libart.so (art::interpreter::EnterInterpreterFromEntryPoint(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame*)+82)
2022-03-17 04:06:26.020 16951-16951/? A/DEBUG: #87 pc 003df753 /system/lib/libart.so (artQuickToInterpreterBridge+890)
2022-03-17 04:06:26.020 16951-16951/? A/DEBUG: #88 pc 0041c2ff /system/lib/libart.so (art_quick_to_interpreter_bridge+30)
2022-03-17 04:06:26.020 16951-16951/? A/DEBUG: #89 pc 00a132d9 /system/framework/arm/boot-framework.oat (offset 0x3ac000) (com.android.internal.os.ZygoteInit.main+2896)
2022-03-17 04:06:26.020 16951-16951/? A/DEBUG: #90 pc 00417d75 /system/lib/libart.so (art_quick_invoke_stub_internal+68)
2022-03-17 04:06:26.021 16951-16951/? A/DEBUG: #91 pc 003f13eb /system/lib/libart.so (art_quick_invoke_static_stub+222)
2022-03-17 04:06:26.021 16951-16951/? A/DEBUG: #92 pc 000a1043 /system/lib/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+154)
2022-03-17 04:06:26.021 16951-16951/? A/DEBUG: #93 pc 00350a6d /system/lib/libart.so (art::(anonymous namespace)::InvokeWithArgArray(art::ScopedObjectAccessAlreadyRunnable const&, art::ArtMethod*, art::(anonymous namespace)::ArgArray*, art::JValue*, char const*)+52)
2022-03-17 04:06:26.021 16951-16951/? A/DEBUG: #94 pc 00350889 /system/lib/libart.so (art::InvokeWithVarArgs(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, _jmethodID*, std::__va_list)+304)
2022-03-17 04:06:26.021 16951-16951/? A/DEBUG: #95 pc 002949cd /system/lib/libart.so (art::JNI::CallStaticVoidMethodV(_JNIEnv*, _jclass*, _jmethodID*, std::__va_list)+476)
2022-03-17 04:06:26.021 16951-16951/? A/DEBUG: #96 pc 000c7425 /system/lib/libart.so (art::(anonymous namespace)::CheckJNI::CallMethodV(char const*, _JNIEnv*, _jobject*, _jclass*, _jmethodID*, std::__va_list, art::Primitive::Type, art::InvokeType)+2576)
2022-03-17 04:06:26.021 16951-16951/? A/DEBUG: #97 pc 000b9979 /system/lib/libart.so (art::(anonymous namespace)::CheckJNI::CallStaticVoidMethodV(_JNIEnv*, _jclass*, _jmethodID*, std::__va_list)+40)
2022-03-17 04:06:26.021 16951-16951/? A/DEBUG: #98 pc 0006cb73 /system/lib/libandroid_runtime.so (_JNIEnv::CallStaticVoidMethod(_jclass*, _jmethodID*, ...)+38)
2022-03-17 04:06:26.021 16951-16951/? A/DEBUG: #99 pc 0006ed9b /system/lib/libandroid_runtime.so (android::AndroidRuntime::start(char const*, android::Vector<android::String8> const&, bool)+462)
2022-03-17 04:06:26.021 16951-16951/? A/DEBUG: #100 pc 0000198d /system/bin/app_process32 (main+724)
2022-03-17 04:06:26.021 16951-16951/? A/DEBUG: #101 pc 00088f55 /system/lib/libc.so (__libc_init+48)
2022-03-17 04:06:26.021 16951-16951/? A/DEBUG: #102 pc 00001677 /system/bin/app_process32 (_start_main+46)
2022-03-17 04:06:26.021 16951-16951/? A/DEBUG: #103 pc 00019a27 /system/bin/linker (__dl__ZNSt3__112__hash_tableINS_17__hash_value_typeIjP6soinfoEENS_22__unordered_map_hasherIjS4_NS_4hashIjEELb1EEENS_21__unordered_map_equalIjS4_NS_8equal_toIjEELb1EEENS_9allocatorIS4_EEE14__erase_uniqueIjEEjRKT_+90)
2022-03-17 04:06:26.021 16951-16951/? A/DEBUG: #104 pc 007fec5a [stack:ff1a6000]
2022-03-17 04:06:26.715 3036-3036/? E//system/bin/tombstoned: Tombstone written to: /data/tombstones/tombstone_02
2022-03-17 04:06:26.826 3203-3278/system_process E/InputDispatcher: channel 'a0d3512 com.sinwho.app/com.sinwho.app.MainActivity (server)' ~ Channel is unrecoverably broken and will be disposed!
2022-03-17 04:06:26.827 3033-3099/? E/OMXNodeInstance: !!! Observer died. Quickly, do something, ... anything...
2022-03-17 04:06:26.848 3033-16248/? E/ThreadWorker: pthread on exit wait clean
2022-03-17 04:06:26.890 3203-3221/system_process E/libprocessgroup: Error encountered killing process cgroup uid 99001 pid 4723: No such file or directory
2022-03-17 04:06:26.947 3003-3074/? E/BufferQueueProducer: [com.android.launcher3/com.android.launcher3.Launcher#0] disconnect: not connected (req=1)
I am using DeepAR (https://developer.deepar.ai/) in conjunction with Flutter. I am creating a Flutter plugin for Android. I use the JetPack support library CameraX for camera access. The library provides a use case called "ImageAnalyse" (https://developer.android.com/training/camerax/analyze). I try to combine this with DeepAR. The masks that I want to display with DeepAR via the camera are in the App Bundle as assets. When I call "switchEffect", the app crashes.
The Flutter Plugin
The architecture of the Flutter Plugin follows the recommendations in the Flutter documentation.
class ExamplePlugin : FlutterPlugin, ActivityAware {
private var flutterPluginBinding: FlutterPluginBinding? = null
private var activityPluginBinding: ActivityPluginBinding? = null
// overrides are implemented but left out for simplicity
}
class PluginViewFactory(
private val flutterPluginBinding: FlutterPlugin.FlutterPluginBinding, private val activityPluginBinding: ActivityPluginBinding
) : PlatformViewFactory(StandardMessageCodec.INSTANCE) {
override fun create(context: Context?, id: Int, args: Any?): PlatformView {
return PluginView(flutterPluginBinding, activityPluginBinding, context, id, args)
}
}
class PluginView(
flutterPluginBinding: FlutterPluginBinding,
activityPluginBinding: ActivityPluginBinding,
private val context: Context?,
id: Int,
args: Any?
) : PlatformView, MethodChannel.MethodCallHandler, PluginRegistry.RequestPermissionsResultListener,
AREventListener {
private val activity = activityPluginBinding.activity
// I left out some code for simplicity
Creating the ProcessCameraProvider
private fun startCamera() {
val cameraProviderFuture = ProcessCameraProvider.getInstance(activity)
cameraProviderFuture.addListener({
cameraProvider = cameraProviderFuture.get()
bindPreviewAndAnalysis(cameraProvider)
}, ContextCompat.getMainExecutor(activity))
}
Bind image preview and image analysis use cases
private fun bindPreviewAndAnalysis(cameraProvider: ProcessCameraProvider?) {
// Preview
val imagePreview = Preview.Builder()
.build()
.also {
it.setSurfaceProvider(previewView.surfaceProvider)
}
// Analysis
val cameraPreset = CameraResolutionPreset.P1280x720
val width: Int
val height: Int
val orientation: Int = getScreenOrientation()
if (orientation == ActivityInfo.SCREEN_ORIENTATION_REVERSE_LANDSCAPE || orientation == ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE) {
width = cameraPreset.width
height = cameraPreset.height
} else {
width = cameraPreset.height
height = cameraPreset.width
}
arrayOfNulls<ByteBuffer>(NUMBER_OF_BUFFERS).also { buffers = it }
for (i in 0 until NUMBER_OF_BUFFERS) {
buffers[i] = ByteBuffer.allocateDirect(width * height * 3)
buffers[i]?.order(ByteOrder.nativeOrder())
buffers[i]?.position(0)
}
val imageAnalysis = ImageAnalysis.Builder().setTargetResolution(Size(width, height))
.setBackpressureStrategy(ImageAnalysis.STRATEGY_KEEP_ONLY_LATEST).build()
cameraExecutor?.let {
imageAnalysis.setAnalyzer(
it,
{ image ->
val byteData: ByteArray
val yBuffer: ByteBuffer = image.planes[0].buffer
val uBuffer: ByteBuffer = image.planes[1].buffer
val vBuffer: ByteBuffer = image.planes[2].buffer
val ySize: Int = yBuffer.remaining()
val uSize: Int = uBuffer.remaining()
val vSize: Int = vBuffer.remaining()
byteData = ByteArray(ySize + uSize + vSize)
//U and V are swapped
yBuffer.get(byteData, 0, ySize)
vBuffer.get(byteData, ySize, vSize)
uBuffer.get(byteData, ySize + vSize, uSize)
buffers[currentBuffer]?.put(byteData)
buffers[currentBuffer]?.position(0)
if (deepAR != null) {
deepAR?.receiveFrame(
buffers[currentBuffer],
image.width,
image.height,
image.imageInfo.rotationDegrees,
cameraSelector == CameraSelector.DEFAULT_FRONT_CAMERA,
DeepARImageFormat.YUV_420_888,
image.planes[1].pixelStride
)
}
currentBuffer = (currentBuffer + 1) % NUMBER_OF_BUFFERS
image.close()
})
}
try {
cameraProvider?.unbindAll()
cameraSelector?.let {
cameraProvider?.bindToLifecycle(activity as LifecycleOwner,
it, imagePreview, imageAnalysis)
}
} catch (e: Exception) {
Log.e(TAG, "Use case binding failed", e)
}
}
use DeepAR switchEffect
private fun changeMask(mask: String) {
try {
val loader = FlutterInjector.instance().flutterLoader()
val path = loader.getLookupKeyForAsset("assets/masks/$mask", "my_plugin_name")
val maskFd: AssetFileDescriptor = activity.assets.openFd(path)
deepAR?.switchEffect("masks", maskFd.createInputStream())
} catch (exc: Exception) {
Log.e(TAG, "Could not change mask", exc)
}
}
Error
When the "switchEffect" is called, the app crashes with the following error:
F/libc (20852): Fatal signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0 in tid 20852 (.example.app), pid 20852 (.example.app)
*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
Build fingerprint: 'google/walleye/walleye:11/RP1A.201005.004.A1/6934943:user/release-keys'
Revision: 'MP1'
ABI: 'arm64'
Timestamp: 2021-07-25 13:59:29+0200
pid: 20852, tid: 20852, name: .example.app >>> com.example.app <<<
uid: 10194
signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0
Cause: null pointer dereference
x0 0000007129de3570 x1 0000007129de3570 x2 0000007139e3b210 x3 0000007119769984
x4 0000007ff61c6788 x5 0000000000000000 x6 0000000000000001 x7 6ced3fea237c8a73
x8 0000000000000000 x9 6ced3fea237c8a73 x10 0000000000430000 x11 0000000029de3576
x12 000000005375645e x13 0000007ff61c68a0 x14 0000000000000002 x15 00000000ebad6a89
x16 00000073acaaa7f8 x17 00000073aabc5bd0 x18 00000073af972000 x19 0000007139e3b210
x20 0000007ff61c68b0 x21 00000071d9d95c70 x22 0000000000000001 x23 0000007ff61c68b4
x24 0000000000000000 x25 00000073af273000 x26 0000000000000069 x27 0000007119d77000
x28 0000007ff61c68c0 x29 0000007ff61c6890
lr 000000707f88e504 sp 0000007ff61c6850 pc 000000707f88e514 pst 0000000060000000
backtrace:
#00 pc 000000000004a514 /data/app/~~tCz51U3rHjeb2hAFXQB6yw==/com.example.app-xzIovrW9JsSRapHSrOSbnA==/lib/arm64/libnative-lib.so (Java_ai_deepar_ar_DeepAR_switchEffectRawNative+268) (BuildId: 342abf6bf48a1e62b230a5496cbaeecab0b6c701)
#01 pc 000000000013ced4 /apex/com.android.art/lib64/libart.so (art_quick_generic_jni_trampoline+148) (BuildId: d0f321775158ed00df284edfabf672b6)
#02 pc 0000000000133564 /apex/com.android.art/lib64/libart.so (art_quick_invoke_stub+548) (BuildId: d0f321775158ed00df284edfabf672b6)
#03 pc 00000000001a97e8 /apex/com.android.art/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+200) (BuildId: d0f321775158ed00df284edfabf672b6)
#04 pc 000000000031c040 /apex/com.android.art/lib64/libart.so (art::interpreter::ArtInterpreterToCompiledCodeBridge(art::Thread*, art::ArtMethod*, art::ShadowFrame*, unsigned short, art::JValue*)+376) (BuildId: d0f321775158ed00df284edfabf672b6)
#05 pc 0000000000313288 /apex/com.android.art/lib64/libart.so (bool art::interpreter::DoCall<true, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+696) (BuildId: d0f321775158ed00df284edfabf672b6)
#06 pc 000000000068b144 /apex/com.android.art/lib64/libart.so (MterpInvokeDirectRange+436) (BuildId: d0f321775158ed00df284edfabf672b6)
#07 pc 000000000012dc14 /apex/com.android.art/lib64/libart.so (mterp_op_invoke_direct_range+20) (BuildId: d0f321775158ed00df284edfabf672b6)
#08 pc 0000000000162a36 [anon:dalvik-classes.dex extracted in memory from /data/app/~~tCz51U3rHjeb2hAFXQB6yw==/com.example.app-xzIovrW9JsSRapHSrOSbnA==/base.apk] (ai.deepar.ar.DeepAR.switchEffect+70)
#09 pc 0000000000685960 /apex/com.android.art/lib64/libart.so (MterpInvokeVirtual+1520) (BuildId: d0f321775158ed00df284edfabf672b6)
#10 pc 000000000012d814 /apex/com.android.art/lib64/libart.so (mterp_op_invoke_virtual+20) (BuildId: d0f321775158ed00df284edfabf672b6)
#11 pc 000000000001a49c [anon:dalvik-classes2.dex extracted in memory from /data/app/~~tCz51U3rHjeb2hAFXQB6yw==/com.example.app-xzIovrW9JsSRapHSrOSbnA==/base.apk!classes2.dex] (com.example.plugin.PluginView.changeMask+296)
#12 pc 0000000000687fe8 /apex/com.android.art/lib64/libart.so (MterpInvokeDirect+1248) (BuildId: d0f321775158ed00df284edfabf672b6)
#13 pc 000000000012d914 /apex/com.android.art/lib64/libart.so (mterp_op_invoke_direct+20) (BuildId: d0f321775158ed00df284edfabf672b6)
#14 pc 000000000001a53a [anon:dalvik-classes2.dex extracted in memory from /data/app/~~tCz51U3rHjeb2hAFXQB6yw==/com.example.app-xzIovrW9JsSRapHSrOSbnA==/base.apk!classes2.dex] (com.example.plugin.PluginView.changeMaskNative+42)
#15 pc 0000000000687fe8 /apex/com.android.art/lib64/libart.so (MterpInvokeDirect+1248) (BuildId: d0f321775158ed00df284edfabf672b6)
#16 pc 000000000012d914 /apex/com.android.art/lib64/libart.so (mterp_op_invoke_direct+20) (BuildId: d0f321775158ed00df284edfabf672b6)
#17 pc 000000000001a962 [anon:dalvik-classes2.dex extracted in memory from /data/app/~~tCz51U3rHjeb2hAFXQB6yw==/com.example.app-xzIovrW9JsSRapHSrOSbnA==/base.apk!classes2.dex] (com.example.plugin.PluginView.onMethodCall+154)
#18 pc 00000000006873a4 /apex/com.android.art/lib64/libart.so (MterpInvokeInterface+1812) (BuildId: d0f321775158ed00df284edfabf672b6)
#19 pc 000000000012da14 /apex/com.android.art/lib64/libart.so (mterp_op_invoke_interface+20) (BuildId: d0f321775158ed00df284edfabf672b6)
#20 pc 000000000036ef32 [anon:dalvik-classes6.dex extracted in memory from /data/app/~~tCz51U3rHjeb2hAFXQB6yw==/com.example.app-xzIovrW9JsSRapHSrOSbnA==/base.apk!classes6.dex] (io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage+34)
#21 pc 00000000006873a4 /apex/com.android.art/lib64/libart.so (MterpInvokeInterface+1812) (BuildId: d0f321775158ed00df284edfabf672b6)
#22 pc 000000000012da14 /apex/com.android.art/lib64/libart.so (mterp_op_invoke_interface+20) (BuildId: d0f321775158ed00df284edfabf672b6)
#23 pc 0000000000364daa [anon:dalvik-classes6.dex extracted in memory from /data/app/~~tCz51U3rHjeb2hAFXQB6yw==/com.example.app-xzIovrW9JsSRapHSrOSbnA==/base.apk!classes6.dex] (io.flutter.embedding.engine.dart.DartMessenger.handleMessageFromDart+114)
#24 pc 00000000006873a4 /apex/com.android.art/lib64/libart.so (MterpInvokeInterface+1812) (BuildId: d0f321775158ed00df284edfabf672b6)
#25 pc 000000000012da14 /apex/com.android.art/lib64/libart.so (mterp_op_invoke_interface+20) (BuildId: d0f321775158ed00df284edfabf672b6)
#26 pc 0000000000363a64 [anon:dalvik-classes6.dex extracted in memory from /data/app/~~tCz51U3rHjeb2hAFXQB6yw==/com.example.app-xzIovrW9JsSRapHSrOSbnA==/base.apk!classes6.dex] (io.flutter.embedding.engine.FlutterJNI.handlePlatformMessage+8)
#27 pc 00000000003094d0 /apex/com.android.art/lib64/libart.so (art::interpreter::Execute(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame&, art::JValue, bool, bool) (.llvm.7618685802058321727)+264) (BuildId: d0f321775158ed00df284edfabf672b6)
#28 pc 00000000006740c0 /apex/com.android.art/lib64/libart.so (artQuickToInterpreterBridge+776) (BuildId: d0f321775158ed00df284edfabf672b6)
#29 pc 000000000013cff8 /apex/com.android.art/lib64/libart.so (art_quick_to_interpreter_bridge+88) (BuildId: d0f321775158ed00df284edfabf672b6)
#30 pc 0000000000133564 /apex/com.android.art/lib64/libart.so (art_quick_invoke_stub+548) (BuildId: d0f321775158ed00df284edfabf672b6)
#31 pc 00000000001a97e8 /apex/com.android.art/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+200) (BuildId: d0f321775158ed00df284edfabf672b6)
#32 pc 000000000055c6f4 /apex/com.android.art/lib64/libart.so (art::JValue art::InvokeVirtualOrInterfaceWithVarArgs<art::ArtMethod*>(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, art::ArtMethod*, std::__va_list)+468) (BuildId: d0f321775158ed00df284edfabf672b6)
#33 pc 000000000055c894 /apex/com.android.art/lib64/libart.so (art::JValue art::InvokeVirtualOrInterfaceWithVarArgs<_jmethodID*>(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, _jmethodID*, std::__va_list)+92) (BuildId: d0f321775158ed00df284edfabf672b6)
#34 pc 00000000004197f8 /apex/com.android.art/lib64/libart.so (art::JNI<true>::CallVoidMethodV(_JNIEnv*, _jobject*, _jmethodID*, std::__va_list)+656) (BuildId: d0f321775158ed00df284edfabf672b6)
#35 pc 000000000037deac /apex/com.android.art/lib64/libart.so (art::(anonymous namespace)::CheckJNI::CallMethodV(char const*, _JNIEnv*, _jobject*, _jclass*, _jmethodID*, std::__va_list, art::Primitive::Type, art::InvokeType)+2532) (BuildId: d0f321775158ed00df284edfabf672b6)
#36 pc 000000000036bc50 /apex/com.android.art/lib64/libart.so (art::(anonymous namespace)::CheckJNI::CallVoidMethodV(_JNIEnv*, _jobject*, _jmethodID*, std::__va_list)+72) (BuildId: d0f321775158ed00df284edfabf672b6)
#37 pc 000000000132663c /data/app/~~tCz51U3rHjeb2hAFXQB6yw==/com.example.app-xzIovrW9JsSRapHSrOSbnA==/lib/arm64/libflutter.so (BuildId: 137d09ab83a412ded1c33ef386351fcc0429a53b)
#38 pc 0000000001326578 /data/app/~~tCz51U3rHjeb2hAFXQB6yw==/com.example.app-xzIovrW9JsSRapHSrOSbnA==/lib/arm64/libflutter.so (BuildId: 137d09ab83a412ded1c33ef386351fcc0429a53b)
#39 pc 0000000001322408 /data/app/~~tCz51U3rHjeb2hAFXQB6yw==/com.example.app-xzIovrW9JsSRapHSrOSbnA==/lib/arm64/libflutter.so (BuildId: 137d09ab83a412ded1c33ef386351fcc0429a53b)
#40 pc 000000000138428c /data/app/~~tCz51U3rHjeb2hAFXQB6yw==/com.example.app-xzIovrW9JsSRapHSrOSbnA==/lib/arm64/libflutter.so (BuildId: 137d09ab83a412ded1c33ef386351fcc0429a53b)
#41 pc 0000000001342568 /data/app/~~tCz51U3rHjeb2hAFXQB6yw==/com.example.app-xzIovrW9JsSRapHSrOSbnA==/lib/arm64/libflutter.so (BuildId: 137d09ab83a412ded1c33ef386351fcc0429a53b)
#42 pc 00000000013476f8 /data/app/~~tCz51U3rHjeb2hAFXQB6yw==/com.example.app-xzIovrW9JsSRapHSrOSbnA==/lib/arm64/libflutter.so (BuildId: 137d09ab83a412ded1c33ef386351fcc0429a53b)
#43 pc 000000000001a064 /system/lib64/libutils.so (android::Looper::pollInner(int)+916) (BuildId: b81fad2b6b7b7f85c6217d2cb80c9e61)
#44 pc 0000000000019c68 /system/lib64/libutils.so (android::Looper::pollOnce(int, int*, int*, void**)+112) (BuildId: b81fad2b6b7b7f85c6217d2cb80c9e61)
#45 pc 00000000001120f4 /system/lib64/libandroid_runtime.so (android::android_os_MessageQueue_nativePollOnce(_JNIEnv*, _jobject*, long, int)+44) (BuildId: 30f3430e4d2a28be49d3c60d623f0a29)
#46 pc 000000000020fadc /system/framework/arm64/boot-framework.oat (art_jni_trampoline+140) (BuildId: da25c976c2d1d3af123868772655a0779f8f6a48)
#47 pc 000000000200b6cc /memfd:jit-cache (deleted) (offset 0x2000000) (android.os.MessageQueue.next+204)
#48 pc 0000000000133564 /apex/com.android.art/lib64/libart.so (art_quick_invoke_stub+548) (BuildId: d0f321775158ed00df284edfabf672b6)
#49 pc 00000000001a97e8 /apex/com.android.art/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+200) (BuildId: d0f321775158ed00df284edfabf672b6)
#50 pc 000000000031c040 /apex/com.android.art/lib64/libart.so (art::interpreter::ArtInterpreterToCompiledCodeBridge(art::Thread*, art::ArtMethod*, art::ShadowFrame*, unsigned short, art::JValue*)+376) (BuildId: d0f321775158ed00df284edfabf672b6)
#51 pc 0000000000312228 /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*)+912) (BuildId: d0f321775158ed00df284edfabf672b6)
#52 pc 00000000006856c0 /apex/com.android.art/lib64/libart.so (MterpInvokeVirtual+848) (BuildId: d0f321775158ed00df284edfabf672b6)
#53 pc 000000000012d814 /apex/com.android.art/lib64/libart.so (mterp_op_invoke_virtual+20) (BuildId: d0f321775158ed00df284edfabf672b6)
#54 pc 0000000000396970 /system/framework/framework.jar (offset 0x92b000) (android.os.Looper.loop+156)
#55 pc 00000000003094d0 /apex/com.android.art/lib64/libart.so (art::interpreter::Execute(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame&, art::JValue, bool, bool) (.llvm.7618685802058321727)+264) (BuildId: d0f321775158ed00df284edfabf672b6)
#56 pc 0000000000311840 /apex/com.android.art/lib64/libart.so (art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame*, art::JValue*)+200) (BuildId: d0f321775158ed00df284edfabf672b6)
#57 pc 0000000000312b9c /apex/com.android.art/lib64/libart.so (bool art::interpreter::DoCall<false, true>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+1772) (BuildId: d0f321775158ed00df284edfabf672b6)
#58 pc 0000000000178658 /apex/com.android.art/lib64/libart.so (void art::interpreter::ExecuteSwitchImplCpp<true, false>(art::interpreter::SwitchImplContext*)+58656) (BuildId: d0f321775158ed00df284edfabf672b6)
#59 pc 000000000013f7d8 /apex/com.android.art/lib64/libart.so (ExecuteSwitchImplAsm+8) (BuildId: d0f321775158ed00df284edfabf672b6)
#60 pc 00000000001a1698 /system/framework/framework.jar (android.app.ActivityThread.main)
#61 pc 00000000003095d8 /apex/com.android.art/lib64/libart.so (art::interpreter::Execute(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame&, art::JValue, bool, bool) (.llvm.7618685802058321727)+528) (BuildId: d0f321775158ed00df284edfabf672b6)
#62 pc 00000000006740c0 /apex/com.android.art/lib64/libart.so (artQuickToInterpreterBridge+776) (BuildId: d0f321775158ed00df284edfabf672b6)
#63 pc 000000000013cff8 /apex/com.android.art/lib64/libart.so (art_quick_to_interpreter_bridge+88) (BuildId: d0f321775158ed00df284edfabf672b6)
#64 pc 00000000001337e8 /apex/com.android.art/lib64/libart.so (art_quick_invoke_static_stub+568) (BuildId: d0f321775158ed00df284edfabf672b6)
#65 pc 00000000001a9804 /apex/com.android.art/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+228) (BuildId: d0f321775158ed00df284edfabf672b6)
#66 pc 000000000055ce14 /apex/com.android.art/lib64/libart.so (art::InvokeMethod(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, _jobject*, _jobject*, unsigned long)+1364) (BuildId: d0f321775158ed00df284edfabf672b6)
#67 pc 00000000004dba28 /apex/com.android.art/lib64/libart.so (art::Method_invoke(_JNIEnv*, _jobject*, _jobject*, _jobjectArray*)+48) (BuildId: d0f321775158ed00df284edfabf672b6)
#68 pc 00000000000896f4 /apex/com.android.art/javalib/arm64/boot.oat (art_jni_trampoline+180) (BuildId: 13577ce71153c228ecf0eb73fc39f45010d487f8)
#69 pc 0000000000133564 /apex/com.android.art/lib64/libart.so (art_quick_invoke_stub+548) (BuildId: d0f321775158ed00df284edfabf672b6)
#70 pc 00000000001a97e8 /apex/com.android.art/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+200) (BuildId: d0f321775158ed00df284edfabf672b6)
#71 pc 000000000031c040 /apex/com.android.art/lib64/libart.so (art::interpreter::ArtInterpreterToCompiledCodeBridge(art::Thread*, art::ArtMethod*, art::ShadowFrame*, unsigned short, art::JValue*)+376) (BuildId: d0f321775158ed00df284edfabf672b6)
#72 pc 0000000000312228 /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*)+912) (BuildId: d0f321775158ed00df284edfabf672b6)
#73 pc 00000000006856c0 /apex/com.android.art/lib64/libart.so (MterpInvokeVirtual+848) (BuildId: d0f321775158ed00df284edfabf672b6)
#74 pc 000000000012d814 /apex/com.android.art/lib64/libart.so (mterp_op_invoke_virtual+20) (BuildId: d0f321775158ed00df284edfabf672b6)
#75 pc 000000000044930a /system/framework/framework.jar (offset 0x125d000) (com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run+22)
#76 pc 00000000003094d0 /apex/com.android.art/lib64/libart.so (art::interpreter::Execute(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame&, art::JValue, bool, bool) (.llvm.7618685802058321727)+264) (BuildId: d0f321775158ed00df284edfabf672b6)
#77 pc 00000000006740c0 /apex/com.android.art/lib64/libart.so (artQuickToInterpreterBridge+776) (BuildId: d0f321775158ed00df284edfabf672b6)
#78 pc 000000000013cff8 /apex/com.android.art/lib64/libart.so (art_quick_to_interpreter_bridge+88) (BuildId: d0f321775158ed00df284edfabf672b6)
#79 pc 0000000000897668 /system/framework/arm64/boot-framework.oat (com.android.internal.os.ZygoteInit.main+2280) (BuildId: da25c976c2d1d3af123868772655a0779f8f6a48)
#80 pc 00000000001337e8 /apex/com.android.art/lib64/libart.so (art_quick_invoke_static_stub+568) (BuildId: d0f321775158ed00df284edfabf672b6)
#81 pc 00000000001a9804 /apex/com.android.art/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+228) (BuildId: d0f321775158ed00df284edfabf672b6)
#82 pc 000000000055b830 /apex/com.android.art/lib64/libart.so (art::JValue art::InvokeWithVarArgs<art::ArtMethod*>(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, art::ArtMethod*, std::__va_list)+448) (BuildId: d0f321775158ed00df284edfabf672b6)
#83 pc 000000000055bcf4 /apex/com.android.art/lib64/libart.so (art::JValue art::InvokeWithVarArgs<_jmethodID*>(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, _jmethodID*, std::__va_list)+92) (BuildId: d0f321775158ed00df284edfabf672b6)
#84 pc 000000000043ecbc /apex/com.android.art/lib64/libart.so (art::JNI<true>::CallStaticVoidMethodV(_JNIEnv*, _jclass*, _jmethodID*, std::__va_list)+652) (BuildId: d0f321775158ed00df284edfabf672b6)
#85 pc 000000000009948c /system/lib64/libandroid_runtime.so (_JNIEnv::CallStaticVoidMethod(_jclass*, _jmethodID*, ...)+124) (BuildId: 30f3430e4d2a28be49d3c60d623f0a29)
#86 pc 00000000000a0a0c /system/lib64/libandroid_runtime.so (android::AndroidRuntime::start(char const*, android::Vector<android::String8> const&, bool)+844) (BuildId: 30f3430e4d2a28be49d3c60d623f0a29)
#87 pc 0000000000003570 /system/bin/app_process64 (main+1320) (BuildId: d4686d3f8282764488eb9ca7cc518583)
#88 pc 00000000000495b4 /apex/com.android.runtime/lib64/bionic/libc.so (__libc_init+108) (BuildId: c78cdff5b820a550771130d6bde95081)
Lost connection to device.
Environment
Kotlin 1.5.20
Flutter 2.2.3
DeepAR 2.4.1
CameraX 1.1.0-alpha07 / 1.0.0-alpha27
Additional notes
I see this error when running a Flutter App with Flutter Plugin on an Android Emulator (API Level 30) and on a real Android Device (Pixel 2, Android 11). I see this error when running the Flutter App in Debug-Mode and in Release-Mode.
Any help or any suggestions are very welcome. I'm quit new to Flutter and Android-Development, so there is a good chance I may have missed some important aspects.
I also posted this question in the GitHub repo of DeepAR: https://github.com/DeepARSDK/quickstart-android-java/issues/30
Just wanted to let you know, that I have chosen a different approach now. In the end I'm using "switchEffect" with a FileInputStream and that works well:
private fun getMaskAsFileInputStream(mask: String): FileInputStream? {
return try {
val loader = FlutterInjector.instance().flutterLoader()
val path = loader.getLookupKeyForAsset("assets/masks/$mask", "my_plugin_name")
val maskFd: AssetFileDescriptor = activity.assets.openFd(path)
if (maskFd.length > 0) {
maskFd.createInputStream()
} else {
Log.w(TAG, "Mask asset at $path is empty")
null
}
} catch (exc: Exception) {
Log.e(TAG, "Could not get mask as file input stream", exc)
null
}
}
private fun changeMask(mask: String) {
try {
deepAR?.switchEffect("masks", getMaskAsFileInputStream(mask))
} catch (exc: Exception) {
Log.e(TAG, "Could not change mask", exc)
}
}
I wanted to try the litho library from facebook for recycler view. Read the official docs and few other articles, and i started implementing using a basic example of hello world. But the app shows a white screen and crashes without displaying anything.
Searched online and few told to add multidex support, but multidex is by default enabled after sdk version 23. will attach my logcat for ref.
2020-03-16 12:22:23.407 21721-21721/? A/libc: Fatal signal 6 (SIGABRT), code -6 in tid 21721 (e.lithopractice), pid 21721 (e.lithopractice)
2020-03-16 12:22:23.443 21741-21763/? E/SchedPolicy: open of /dev/cpuctl/bg_non_interactive/tasks failed: No such file or directory
2020-03-16 12:22:23.500 21768-21768/? A/DEBUG: *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
2020-03-16 12:22:23.500 21768-21768/? A/DEBUG: Build fingerprint: 'motorola/sanders_n/sanders_n:8.1.0/OPS28.65-36-14/63857:user/release-keys'
2020-03-16 12:22:23.500 21768-21768/? A/DEBUG: Revision: 'p400'
2020-03-16 12:22:23.500 21768-21768/? A/DEBUG: ABI: 'arm'
2020-03-16 12:22:23.500 21768-21768/? A/DEBUG: pid: 21721, tid: 21721, name: e.lithopractice >>> com.example.lithopractice <<<
2020-03-16 12:22:23.500 21768-21768/? A/DEBUG: signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
2020-03-16 12:22:23.501 21768-21768/? A/DEBUG: Abort message: 'java_vm_ext.cc:553] JNI DETECTED ERROR IN APPLICATION: JNI NewGlobalRef called with pending exception java.lang.ClassNotFoundException: Didn't find class "com.facebook.jni.HybridData$Destructor" on path: DexPathList[[zip file "/data/app/com.example.lithopractice-V8_NylBQ4pUmXdNPUV2stQ==/base.apk"],nativeLibraryDirectories=[/data/app/com.example.lithopractice-V8_NylBQ4pUmXdNPUV2stQ==/lib/arm, /data/app/com.example.lithopractice-V8_NylBQ4pUmXdNPUV2stQ==/base.apk!/lib/armeabi-v7a, /system/lib,
2020-03-16 12:22:23.501 21768-21768/? A/DEBUG: r0 00000000 r1 000054d9 r2 00000006 r3 00000008
2020-03-16 12:22:23.501 21768-21768/? A/DEBUG: r4 000054d9 r5 000054d9 r6 beac46d4 r7 0000010c
2020-03-16 12:22:23.501 21768-21768/? A/DEBUG: r8 00000000 r9 ae499380 sl 0000000a fp beac4720
2020-03-16 12:22:23.501 21768-21768/? A/DEBUG: ip a65a5de0 sp beac46c0 lr af1be92d pc af1b841a cpsr 200f0030
2020-03-16 12:22:23.632 21768-21768/? A/DEBUG: backtrace:
2020-03-16 12:22:23.632 21768-21768/? A/DEBUG: #00 pc 0001a41a /system/lib/libc.so (abort+63)
2020-03-16 12:22:23.632 21768-21768/? A/DEBUG: #01 pc 0035ce99 /system/lib/libart.so (art::Runtime::Abort(char const*)+392)
2020-03-16 12:22:23.632 21768-21768/? A/DEBUG: #02 pc 0041ca0d /system/lib/libart.so (android::base::LogMessage::~LogMessage()+452)
2020-03-16 12:22:23.632 21768-21768/? A/DEBUG: #03 pc 0024eb19 /system/lib/libart.so (art::JavaVMExt::JniAbort(char const*, char const*)+1212)
2020-03-16 12:22:23.632 21768-21768/? A/DEBUG: #04 pc 0024ec9b /system/lib/libart.so (art::JavaVMExt::JniAbortV(char const*, char const*, std::__va_list)+58)
2020-03-16 12:22:23.632 21768-21768/? A/DEBUG: #05 pc 000d61d3 /system/lib/libart.so (art::ScopedCheck::AbortF(char const*, ...)+42)
2020-03-16 12:22:23.632 21768-21768/? A/DEBUG: #06 pc 000d5d53 /system/lib/libart.so (art::ScopedCheck::CheckThread(_JNIEnv*)+274)
2020-03-16 12:22:23.633 21768-21768/? A/DEBUG: #07 pc 000d46fd /system/lib/libart.so (art::ScopedCheck::Check(art::ScopedObjectAccess&, bool, char const*, art::JniValueType*)+596)
2020-03-16 12:22:23.633 21768-21768/? A/DEBUG: #08 pc 000d6aaf /system/lib/libart.so (art::CheckJNI::NewRef(char const*, _JNIEnv*, _jobject*, art::IndirectRefKind)+434)
2020-03-16 12:22:23.633 21768-21768/? A/DEBUG: #09 pc 003814a1 /system/lib/libart.so (art::Thread::SetClassLoaderOverride(_jobject*)+32)
2020-03-16 12:22:23.633 21768-21768/? A/DEBUG: #10 pc 002509fb /system/lib/libart.so (art::JavaVMExt::LoadNativeLibrary(_JNIEnv*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, _jobject*, _jstring*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>*)+1910)
2020-03-16 12:22:23.633 21768-21768/? A/DEBUG: #11 pc 0000315f /system/lib/libopenjdkjvm.so (JVM_NativeLoad+194)
2020-03-16 12:22:23.633 21768-21768/? A/DEBUG: #12 pc 00254641 /system/framework/arm/boot-core-oj.oat (offset 0x1cb000) (java.lang.Runtime.nativeLoad+160)
2020-03-16 12:22:23.633 21768-21768/? A/DEBUG: #13 pc 00403375 /system/lib/libart.so (art_quick_invoke_stub_internal+68)
2020-03-16 12:22:23.633 21768-21768/? A/DEBUG: #14 pc 004085eb /system/lib/libart.so (art_quick_invoke_static_stub+226)
2020-03-16 12:22:23.633 21768-21768/? A/DEBUG: #15 pc 000b00df /system/lib/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+174)
2020-03-16 12:22:23.633 21768-21768/? A/DEBUG: #16 pc 0035769d /system/lib/libart.so (art::InvokeWithArgArray(art::ScopedObjectAccessAlreadyRunnable const&, art::ArtMethod*, art::ArgArray*, art::JValue*, char const*)+52)
2020-03-16 12:22:23.633 21768-21768/? A/DEBUG: #17 pc 00358bbb /system/lib/libart.so (art::InvokeMethod(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, _jobject*, _jobject*, unsigned int)+954)
2020-03-16 12:22:23.633 21768-21768/? A/DEBUG: #18 pc 00308645 /system/lib/libart.so (art::Method_invoke(_JNIEnv*, _jobject*, _jobject*, _jobject*)+40)
2020-03-16 12:22:23.633 21768-21768/? A/DEBUG: #19 pc 002389ff /system/framework/arm/boot-core-oj.oat (offset 0x1cb000) (java.lang.Class.getDeclaredMethodInternal [DEDUPED]+110)
2020-03-16 12:22:23.633 21768-21768/? A/DEBUG: #20 pc 00403375 /system/lib/libart.so (art_quick_invoke_stub_internal+68)
2020-03-16 12:22:23.633 21768-21768/? A/DEBUG: #21 pc 004084e5 /system/lib/libart.so (art_quick_invoke_stub+228)
2020-03-16 12:22:23.633 21768-21768/? A/DEBUG: #22 pc 000b00bb /system/lib/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+138)
2020-03-16 12:22:23.634 21768-21768/? A/DEBUG: #23 pc 00201f3b /system/lib/libart.so (art::interpreter::ArtInterpreterToCompiledCodeBridge(art::Thread*, art::ArtMethod*, art::ShadowFrame*, unsigned short, art::JValue*)+226)
2020-03-16 12:22:23.634 21768-21768/? A/DEBUG: #24 pc 001fd4bd /system/lib/libart.so (_ZN3art11interpreter6DoCallILb0ELb0EEEbPNS_9ArtMethodEPNS_6ThreadERNS_11ShadowFrameEPKNS_11InstructionEtPNS_6JValueE+592)
2020-03-16 12:22:23.634 21768-21768/? A/DEBUG: #25 pc 003ed49b /system/lib/libart.so (MterpInvokeVirtual+482)
2020-03-16 12:22:23.634 21768-21768/? A/DEBUG: #26 pc 003f5714 /system/lib/libart.so (ExecuteMterpImpl+14228)
2020-03-16 12:22:23.634 21768-21768/? A/DEBUG: #27 pc 001e3f11 /system/lib/libart.so (art::interpreter::Execute(art::Thread*, art::DexFile::CodeItem const*, art::ShadowFrame&, art::JValue, bool)+344)
2020-03-16 12:22:23.634 21768-21768/? A/DEBUG: #28 pc 001e85d5 /system/lib/libart.so (art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::DexFile::CodeItem const*, art::ShadowFrame*, art::JValue*)+148)
2020-03-16 12:22:23.634 21768-21768/? A/DEBUG: #29 pc 001fd4a5 /system/lib/libart.so (_ZN3art11interpreter6DoCallILb0ELb0EEEbPNS_9ArtMethodEPNS_6ThreadERNS_11ShadowFrameEPKNS_11InstructionEtPNS_6JValueE+568)
2020-03-16 12:22:23.634 21768-21768/? A/DEBUG: #30 pc 003ee087 /system/lib/libart.so (MterpInvokeInterface+1078)
2020-03-16 12:22:23.634 21768-21768/? A/DEBUG: #31 pc 003f5914 /system/lib/libart.so (ExecuteMterpImpl+14740)
2020-03-16 12:22:23.634 21768-21768/? A/DEBUG: #32 pc 001e3f11 /system/lib/libart.so (art::interpreter::Execute(art::Thread*, art::DexFile::CodeItem const*, art::ShadowFrame&, art::JValue, bool)+344)
2020-03-16 12:22:23.634 21768-21768/? A/DEBUG: #33 pc 001e85d5 /system/lib/libart.so (art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::DexFile::CodeItem const*, art::ShadowFrame*, art::JValue*)+148)
2020-03-16 12:22:23.634 21768-21768/? A/DEBUG: #34 pc 001fd4a5 /system/lib/libart.so (_ZN3art11interpreter6DoCallILb0ELb0EEEbPNS_9ArtMethodEPNS_6ThreadERNS_11ShadowFrameEPKNS_11InstructionEtPNS_6JValueE+568)
2020-03-16 12:22:23.634 21768-21768/? A/DEBUG: #35 pc 003ed49b /system/lib/libart.so (MterpInvokeVirtual+482)
2020-03-16 12:22:23.634 21768-21768/? A/DEBUG: #36 pc 003f5714 /system/lib/libart.so (ExecuteMterpImpl+14228)
2020-03-16 12:22:23.634 21768-21768/? A/DEBUG: #37 pc 001e3f11 /system/lib/libart.so (art::interpreter::Execute(art::Thread*, art::DexFile::CodeItem const*, art::ShadowFrame&, art::JValue, bool)+344)
2020-03-16 12:22:23.634 21768-21768/? A/DEBUG: #38 pc 001e85d5 /system/lib/libart.so (art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::DexFile::CodeItem const*, art::ShadowFrame*, art::JValue*)+148)
2020-03-16 12:22:23.634 21768-21768/? A/DEBUG: #39 pc 001fd4a5 /system/lib/libart.so (_ZN3art11interpreter6DoCallILb0ELb0EEEbPNS_9ArtMethodEPNS_6ThreadERNS_11ShadowFrameEPKNS_11InstructionEtPNS_6JValueE+568)
2020-03-16 12:22:23.634 21768-21768/? A/DEBUG: #40 pc 003ed49b /system/lib/libart.so (MterpInvokeVirtual+482)
2020-03-16 12:22:23.634 21768-21768/? A/DEBUG: #41 pc 003f5714 /system/lib/libart.so (ExecuteMterpImpl+14228)
2020-03-16 12:22:23.634 21768-21768/? A/DEBUG: #42 pc 001e3f11 /system/lib/libart.so (art::interpreter::Execute(art::Thread*, art::DexFile::CodeItem const*, art::ShadowFrame&, art::JValue, bool)+344)
2020-03-16 12:22:23.634 21768-21768/? A/DEBUG: #43 pc 001e85d5 /system/lib/libart.so (art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::DexFile::CodeItem const*, art::ShadowFrame*, art::JValue*)+148)
2020-03-16 12:22:23.634 21768-21768/? A/DEBUG: #44 pc 001fd4a5 /system/lib/libart.so (_ZN3art11interpreter6DoCallILb0ELb0EEEbPNS_9ArtMethodEPNS_6ThreadERNS_11ShadowFrameEPKNS_11InstructionEtPNS_6JValueE+568)
2020-03-16 12:22:23.634 21768-21768/? A/DEBUG: #45 pc 003ee4b5 /system/lib/libart.so (MterpInvokeStatic+184)
2020-03-16 12:22:23.634 21768-21768/? A/DEBUG: #46 pc 003f5894 /system/lib/libart.so (ExecuteMterpImpl+14612)
2020-03-16 12:22:23.634 21768-21768/? A/DEBUG: #47 pc 001e3f11 /system/lib/libart.so (art::interpreter::Execute(art::Thread*, art::DexFile::CodeItem const*, art::ShadowFrame&, art::JValue, bool)+344)
2020-03-16 12:22:23.634 21768-21768/? A/DEBUG: #48 pc 001e85d5 /system/lib/libart.so (art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::DexFile::CodeItem const*, art::ShadowFrame*, art::JValue*)+148)
2020-03-16 12:22:23.634 21768-21768/? A/DEBUG: #49 pc 001fd4a5 /system/lib/libart.so (_ZN3art11interpreter6DoCallILb0ELb0EEEbPNS_9ArtMethodEPNS_6ThreadERNS_11ShadowFrameEPKNS_11InstructionEtPNS_6JValueE+568)
2020-03-16 12:22:23.634 21768-21768/? A/DEBUG: #50 pc 003ee4b5 /system/lib/libart.so (MterpInvokeStatic+184)
2020-03-16 12:22:23.634 21768-21768/? A/DEBUG: #51 pc 003f5894 /system/lib/libart.so (ExecuteMterpImpl+14612)
2020-03-16 12:22:23.634 21768-21768/? A/DEBUG: #52 pc 001e3f11 /system/lib/libart.so (art::interpreter::Execute(art::Thread*, art::DexFile::CodeItem const*, art::ShadowFrame&, art::JValue, bool)+344)
2020-03-16 12:22:23.634 21768-21768/? A/DEBUG: #53 pc 001e85d5 /system/lib/libart.so (art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::DexFile::CodeItem const*, art::ShadowFrame*, art::JValue*)+148)
2020-03-16 12:22:23.634 21768-21768/? A/DEBUG: #54 pc 001fd4a5 /system/lib/libart.so (_ZN3art11interpreter6DoCallILb0ELb0EEEbPNS_9ArtMethodEPNS_6ThreadERNS_11ShadowFrameEPKNS_11InstructionEtPNS_6JValueE+568)
2020-03-16 12:22:23.634 21768-21768/? A/DEBUG: #55 pc 003ee4b5 /system/lib/libart.so (MterpInvokeStatic+184)
2020-03-16 12:22:23.634 21768-21768/? A/DEBUG: #56 pc 003f5894 /system/lib/libart.so (ExecuteMterpImpl+14612)
2020-03-16 12:22:23.635 21768-21768/? A/DEBUG: #57 pc 001e3f11 /system/lib/libart.so (art::interpreter::Execute(art::Thread*, art::DexFile::CodeItem const*, art::ShadowFrame&, art::JValue, bool)+344)
2020-03-16 12:22:23.635 21768-21768/? A/DEBUG: #58 pc 001e85d5 /system/lib/libart.so (art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::DexFile::CodeItem const*, art::ShadowFrame*, art::JValue*)+148)
2020-03-16 12:22:23.635 21768-21768/? A/DEBUG: #59 pc 001fd4a5 /system/lib/libart.so (_ZN3art11interpreter6DoCallILb0ELb0EEEbPNS_9ArtMethodEPNS_6ThreadERNS_11ShadowFrameEPKNS_11InstructionEtPNS_6JValueE+568)
2020-03-16 12:22:23.635 21768-21768/? A/DEBUG: #60 pc 003ee347 /system/lib/libart.so (MterpInvokeDirect+250)
2020-03-16 12:22:23.635 21768-21768/? A/DEBUG: #61 pc 003f5814 /system/lib/libart.so (ExecuteMterpImpl+14484)
2020-03-16 12:22:23.635 21768-21768/? A/DEBUG: #62 pc 001e3f11 /system/lib/libart.so (art::interpreter::Execute(art::Thread*, art::DexFile::CodeItem const*, art::ShadowFrame&, art::JValue, bool)+344)
2020-03-16 12:22:23.635 21768-21768/? A/DEBUG: #63 pc 001e85d5 /system/lib/libart.so (art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::DexFile::CodeItem const*, art::ShadowFrame*, art::JValue*)+148)
2020-03-16 12:22:24.114 21767-21775/? E/SchedPolicy: open of /dev/cpuctl/bg_non_interactive/tasks failed: No such file or directory
2020-03-16 12:22:24.861 1171-1171/? E//system/bin/tombstoned: Tombstone written to: /data/tombstones/tombstone_07 ```
Adding the following dependecy solves the problem. Just incase anyone ever needs it.
implementation 'com.facebook.fbjni:fbjni:0.0.2'