After clicking the camera option, the flutter Android application crashes, please let me know if anyone have encountered similar problems, and what is the solution?
E/flutter (27819): [ERROR:flutter/fml/platform/android/jni_util.cc(211)] java.lang.RuntimeException: Methods marked with #UiThread must be executed on the main thread. Current thread: 1.raster
E/flutter (27819): at io.flutter.embedding.engine.FlutterJNI.ensureRunningOnMainThread(FlutterJNI.java:1405)
E/flutter (27819): at io.flutter.embedding.engine.FlutterJNI.destroyOverlaySurfaces(FlutterJNI.java:1174)
E/flutter (27819):
F/flutter (27819): [FATAL:flutter/shell/platform/android/platform_view_android_jni_impl.cc(1559)] Check failed: fml::jni::CheckException(env).
F/crashpad(29173): dlopen: dlopen failed: library "libicu.so" not found: needed by /system/lib64/libharfbuzz_ng.so in namespace (default)
F/libc (27819): Fatal signal 6 (SIGABRT), code -6 (SI_TKILL) in tid 27967 (1.raster), pid 27819 (.newenergycloud)
Build fingerprint: 'HUAWEI/LIO-AL00/HWLIO:12/HUAWEILIO-AL00/103.0.0.202C00:user/release-keys'
Revision: '0'
ABI: 'arm64'
Timestamp: 2023-02-15 17:25:49.743754003+0800
Process uptime: 0s
Cmdline: com.solway.newenergycloud
pid: 27819, tid: 27967, name: 1.raster >>> com.solway.newenergycloud <<<
uid: 10956
tagged_addr_ctrl: 0000000000000001
signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
Abort message: '[FATAL:flutter/shell/platform/android/platform_view_android_jni_impl.cc(1559)] Check failed: fml::jni::CheckException(env).
'
x0 0000000000000000 x1 0000000000006d3f x2 0000000000000006 x3 0000007ce030f5e0
x4 2e00000000000000 x5 2e00000000000000 x6 2e00000000000000 x7 00000000000000ff
x8 00000000000000f0 x9 c2b79e109d97af94 x10 0000000000000000 x11 ffffff80fffffbdf
x12 0000000000000001 x13 00000000175868d8 x14 ff00000000000000 x15 ffffffffffffffff
x16 0000007e00f61088 x17 0000007e00f3b130 x18 0000007cddcbe000 x19 0000000000006cab
x20 0000000000006d3f x21 00000000ffffffff x22 b400007c7d223c70 x23 b400007c7d223c58
x24 0000000000000071 x25 0000007ce0310000 x26 0000000000000000 x27 0000000000000001
x28 0000000000000071 x29 0000007ce030f660
lr 0000007e00eede58 sp 0000007ce030f5c0 pc 0000007e00eede84 pst 0000000000001000
backtrace:
#00 pc 0000000000089e84 /apex/com.android.runtime/lib64/bionic/libc.so (abort+164) (BuildId: e18cca17d252ede5b01226139ce195f2)
#01 pc 000000000150a740 /data/app/~~X16mpvQKFjCkT6tb2AGl9g==/com.solway.newenergycloud-G9GB52tHtY7f8Q6SLnL7FA==/lib/arm64/libflutter.so (BuildId: c42c6209986a10065da91c022954abcc47cb6c46)
#02 pc 000000000152c79c /data/app/~~X16mpvQKFjCkT6tb2AGl9g==/com.solway.newenergycloud-G9GB52tHtY7f8Q6SLnL7FA==/lib/arm64/libflutter.so (BuildId: c42c6209986a10065da91c022954abcc47cb6c46)
#03 pc 0000000001513f74 /data/app/~~X16mpvQKFjCkT6tb2AGl9g==/com.solway.newenergycloud-G9GB52tHtY7f8Q6SLnL7FA==/lib/arm64/libflutter.so (BuildId: c42c6209986a10065da91c022954abcc47cb6c46)
#04 pc 0000000001bddd98 /data/app/~~X16mpvQKFjCkT6tb2AGl9g==/com.solway.newenergycloud-G9GB52tHtY7f8Q6SLnL7FA==/lib/arm64/libflutter.so (BuildId: c42c6209986a10065da91c022954abcc47cb6c46)
#05 pc 0000000001bdcaf4 /data/app/~~X16mpvQKFjCkT6tb2AGl9g==/com.solway.newenergycloud-G9GB52tHtY7f8Q6SLnL7FA==/lib/arm64/libflutter.so (BuildId: c42c6209986a10065da91c022954abcc47cb6c46)
#06 pc 000000000183e464 /data/app/~~X16mpvQKFjCkT6tb2AGl9g==/com.solway.newenergycloud-G9GB52tHtY7f8Q6SLnL7FA==/lib/arm64/libflutter.so (BuildId: c42c6209986a10065da91c022954abcc47cb6c46)
#07 pc 00000000018496b0 /data/app/~~X16mpvQKFjCkT6tb2AGl9g==/com.solway.newenergycloud-G9GB52tHtY7f8Q6SLnL7FA==/lib/arm64/libflutter.so (BuildId: c42c6209986a10065da91c022954abcc47cb6c46)
#08 pc 000000000152d45c /data/app/~~X16mpvQKFjCkT6tb2AGl9g==/com.solway.newenergycloud-G9GB52tHtY7f8Q6SLnL7FA==/lib/arm64/libflutter.so (BuildId: c42c6209986a10065da91c022954abcc47cb6c46)
#09 pc 00000000015339c8 /data/app/~~X16mpvQKFjCkT6tb2AGl9g==/com.solway.newenergycloud-G9GB52tHtY7f8Q6SLnL7FA==/lib/arm64/libflutter.so (BuildId: c42c6209986a10065da91c022954abcc47cb6c46)
#10 pc 0000000000016984 /system/lib64/libutils.so (android::Looper::pollInner(int)+912) (BuildId: 6769bcce7774e1701581578ee8903b7f)
#11 pc 000000000001658c /system/lib64/libutils.so (android::Looper::pollOnce(int, int*, int*, void**)+112) (BuildId: 6769bcce7774e1701581578ee8903b7f)
#12 pc 0000000000017188 /system/lib64/libandroid.so (ALooper_pollOnce+100) (BuildId: a6764f62e371be89b7fb40c0ab75522c)
#13 pc 0000000001533950 /data/app/~~X16mpvQKFjCkT6tb2AGl9g==/com.solway.newenergycloud-G9GB52tHtY7f8Q6SLnL7FA==/lib/arm64/libflutter.so (BuildId: c42c6209986a10065da91c022954abcc47cb6c46)
#14 pc 000000000152d3a4 /data/app/~~X16mpvQKFjCkT6tb2AGl9g==/com.solway.newenergycloud-G9GB52tHtY7f8Q6SLnL7FA==/lib/arm64/libflutter.so (BuildId: c42c6209986a10065da91c022954abcc47cb6c46)
#15 pc 0000000001531250 /data/app/~~X16mpvQKFjCkT6tb2AGl9g==/com.solway.newenergycloud-G9GB52tHtY7f8Q6SLnL7FA==/lib/arm64/libflutter.so (BuildId: c42c6209986a10065da91c022954abcc47cb6c46)
#16 pc 00000000000ebbb0 /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+264) (BuildId: e18cca17d252ede5b01226139ce195f2)
#17 pc 000000000008b6a8 /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+64) (BuildId: e18cca17d252ede5b01226139ce195f2)
Lost connection to device.
I have checked the required camera permissions to make sure that the permissions are enabled; then open the camera still crashed.
Related
I'm using my flutter to app to take some pictures, and when using my app on Android 12 (and only Android 12 in my experience), I get random Null Pointer Dereference that cause the app to crash. Right after I took my picture, it crashed and gave me the error below. Here's my code to take a picture from the user's camera:
Future<File?> _getPhotoFromCamera(bool isSelfie) async {
return ImagePicker()
.pickImage(
source: ImageSource.camera,
preferredCameraDevice:
isSelfie ? CameraDevice.front : CameraDevice.rear,
)
.then((value) => value != null ? File(value.path) : null);
}
This is using the image_picker library. Any idea what could cause cause this and how I can fix it ? Thanks in advance !
F/libc ( 6618): Fatal signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0 in tid 6678 (1.raster), pid 6618 (a.myApp.int)
*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
Build fingerprint: 'google/sdk_gphone64_arm64/emulator64_arm64:12/SE1A.220630.001/8789670:userdebug/dev-keys'
Revision: '0'
ABI: 'arm64'
Timestamp: 2022-11-02 18:32:39.122988178+0100
Process uptime: 0s
Cmdline: com.myApp.int
pid: 6618, tid: 6678, name: 1.raster >>> com.myApp.int <<<
uid: 10146
tagged_addr_ctrl: 0000000000000001
signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0
Cause: null pointer dereference
x0 b4000072af192e90 x1 b4000072af1c8410 x2 0000000000000000 x3 0000000000000010
x4 0000000000000000 x5 00000071f8739800 x6 0000204620000000 x7 0000204620000000
x8 b4000072af1c8a50 x9 0000000000000000 x10 0000000000000000 x11 0000000000000000
x12 0000ffff00000eff x13 00000000609ac3da x14 0000000000007c5a x15 0000000000007b25
x16 0000007252b71560 x17 0000007252bad9d0 x18 00000071f2a7e000 x19 b4000072af1cb150
x20 0000000000000123 x21 b4000072af171890 x22 b40000734f023950 x23 b4000072af1c8418
x24 b4000072af1c8410 x25 0000000000000001 x26 0000000000000001 x27 000000000000000a
x28 b40000733f025209 x29 00000071f8739790
lr 0000007252b58a58 sp 00000071f8739790 pc 0000007252badaec pst 0000000000001000
backtrace:
#00 pc 0000000000014aec /apex/com.android.vndk.v31/lib64/android.hardware.graphics.mapper#3.0.so (void std::__1::__tree_balance_after_insert<std::__1::__tree_node_base<void*>*>(std::__1::__tree_node_base<void*>*, std::__1::__tree_node_base<void*>*)+284) (BuildId: 56e24cf5b4934a9f77d4d3b1f512b98d)
#01 pc 0000000000016a54 /vendor/lib64/libOpenglCodecCommon.so (GLClientState::addTextureRec(unsigned int, unsigned int)+484) (BuildId: c78822f9f2f19c30a0e11ed676fcdaf0)
#02 pc 000000000001678c /vendor/lib64/libOpenglCodecCommon.so (GLClientState::bindTexture(unsigned int, unsigned int, unsigned char*)+120) (BuildId: c78822f9f2f19c30a0e11ed676fcdaf0)
#03 pc 0000000000036a08 /vendor/lib64/libGLESv2_enc.so (GL2Encoder::s_glBindTexture(void*, unsigned int, unsigned int)+84) (BuildId: db657e57584abaa58b282e00731638fa)
#04 pc 000000000188a28c /data/app/~~PUhNi259K87XBRkhI_36RQ==/com.myApp.int-NaIJtFK4CP8bf0nb0AVVWQ==/base.apk!libflutter.so (BuildId: ac81dbe6a14145f04ad79b76cf9e5e3c681a3cf3)
#05 pc 0000000001889fc4 /data/app/~~PUhNi259K87XBRkhI_36RQ==/com.myApp.int-NaIJtFK4CP8bf0nb0AVVWQ==/base.apk!libflutter.so (BuildId: ac81dbe6a14145f04ad79b76cf9e5e3c681a3cf3)
#06 pc 00000000017f4398 /data/app/~~PUhNi259K87XBRkhI_36RQ==/com.myApp.int-NaIJtFK4CP8bf0nb0AVVWQ==/base.apk!libflutter.so (BuildId: ac81dbe6a14145f04ad79b76cf9e5e3c681a3cf3)
#07 pc 00000000017f44b4 /data/app/~~PUhNi259K87XBRkhI_36RQ==/com.myApp.int-NaIJtFK4CP8bf0nb0AVVWQ==/base.apk!libflutter.so (BuildId: ac81dbe6a14145f04ad79b76cf9e5e3c681a3cf3)
#08 pc 00000000018029bc /data/app/~~PUhNi259K87XBRkhI_36RQ==/com.myApp.int-NaIJtFK4CP8bf0nb0AVVWQ==/base.apk!libflutter.so (BuildId: ac81dbe6a14145f04ad79b76cf9e5e3c681a3cf3)
#09 pc 0000000001804d40 /data/app/~~PUhNi259K87XBRkhI_36RQ==/com.myApp.int-NaIJtFK4CP8bf0nb0AVVWQ==/base.apk!libflutter.so (BuildId: ac81dbe6a14145f04ad79b76cf9e5e3c681a3cf3)
#10 pc 00000000018066ec /data/app/~~PUhNi259K87XBRkhI_36RQ==/com.myApp.int-NaIJtFK4CP8bf0nb0AVVWQ==/base.apk!libflutter.so (BuildId: ac81dbe6a14145f04ad79b76cf9e5e3c681a3cf3)
#11 pc 00000000017fe148 /data/app/~~PUhNi259K87XBRkhI_36RQ==/com.myApp.int-NaIJtFK4CP8bf0nb0AVVWQ==/base.apk!libflutter.so (BuildId: ac81dbe6a14145f04ad79b76cf9e5e3c681a3cf3)
#12 pc 00000000017fe780 /data/app/~~PUhNi259K87XBRkhI_36RQ==/com.myApp.int-NaIJtFK4CP8bf0nb0AVVWQ==/base.apk!libflutter.so (BuildId: ac81dbe6a14145f04ad79b76cf9e5e3c681a3cf3)
#13 pc 00000000017ec418 /data/app/~~PUhNi259K87XBRkhI_36RQ==/com.myApp.int-NaIJtFK4CP8bf0nb0AVVWQ==/base.apk!libflutter.so (BuildId: ac81dbe6a14145f04ad79b76cf9e5e3c681a3cf3)
#14 pc 00000000017ec9fc /data/app/~~PUhNi259K87XBRkhI_36RQ==/com.myApp.int-NaIJtFK4CP8bf0nb0AVVWQ==/base.apk!libflutter.so (BuildId: ac81dbe6a14145f04ad79b76cf9e5e3c681a3cf3)
#15 pc 00000000016c4bec /data/app/~~PUhNi259K87XBRkhI_36RQ==/com.myApp.int-NaIJtFK4CP8bf0nb0AVVWQ==/base.apk!libflutter.so (BuildId: ac81dbe6a14145f04ad79b76cf9e5e3c681a3cf3)
#16 pc 0000000001a12f60 /data/app/~~PUhNi259K87XBRkhI_36RQ==/com.myApp.int-NaIJtFK4CP8bf0nb0AVVWQ==/base.apk!libflutter.so (BuildId: ac81dbe6a14145f04ad79b76cf9e5e3c681a3cf3)
#17 pc 00000000018ed4f4 /data/app/~~PUhNi259K87XBRkhI_36RQ==/com.myApp.int-NaIJtFK4CP8bf0nb0AVVWQ==/base.apk!libflutter.so (BuildId: ac81dbe6a14145f04ad79b76cf9e5e3c681a3cf3)
#18 pc 00000000018ed490 /data/app/~~PUhNi259K87XBRkhI_36RQ==/com.myApp.int-NaIJtFK4CP8bf0nb0AVVWQ==/base.apk!libflutter.so (BuildId: ac81dbe6a14145f04ad79b76cf9e5e3c681a3cf3)
#19 pc 00000000019046cc /data/app/~~PUhNi259K87XBRkhI_36RQ==/com.myApp.int-NaIJtFK4CP8bf0nb0AVVWQ==/base.apk!libflutter.so (BuildId: ac81dbe6a14145f04ad79b76cf9e5e3c681a3cf3)
#20 pc 0000000001903d88 /data/app/~~PUhNi259K87XBRkhI_36RQ==/com.myApp.int-NaIJtFK4CP8bf0nb0AVVWQ==/base.apk!libflutter.so (BuildId: ac81dbe6a14145f04ad79b76cf9e5e3c681a3cf3)
#21 pc 0000000001904b7c /data/app/~~PUhNi259K87XBRkhI_36RQ==/com.myApp.int-NaIJtFK4CP8bf0nb0AVVWQ==/base.apk!libflutter.so (BuildId: ac81dbe6a14145f04ad79b76cf9e5e3c681a3cf3)
#22 pc 00000000019035c4 /data/app/~~PUhNi259K87XBRkhI_36RQ==/com.myApp.int-NaIJtFK4CP8bf0nb0AVVWQ==/base.apk!libflutter.so (BuildId: ac81dbe6a14145f04ad79b76cf9e5e3c681a3cf3)
#23 pc 0000000001903334 /data/app/~~PUhNi259K87XBRkhI_36RQ==/com.myApp.int-NaIJtFK4CP8bf0nb0AVVWQ==/base.apk!libflutter.so (BuildId: ac81dbe6a14145f04ad79b76cf9e5e3c681a3cf3)
#24 pc 0000000001910300 /data/app/~~PUhNi259K87XBRkhI_36RQ==/com.myApp.int-NaIJtFK4CP8bf0nb0AVVWQ==/base.apk!libflutter.so (BuildId: ac81dbe6a14145f04ad79b76cf9e5e3c681a3cf3)
#25 pc 00000000015e598c /data/app/~~PUhNi259K87XBRkhI_36RQ==/com.myApp.int-NaIJtFK4CP8bf0nb0AVVWQ==/base.apk!libflutter.so (BuildId: ac81dbe6a14145f04ad79b76cf9e5e3c681a3cf3)
#26 pc 00000000015eb244 /data/app/~~PUhNi259K87XBRkhI_36RQ==/com.myApp.int-NaIJtFK4CP8bf0nb0AVVWQ==/base.apk!libflutter.so (BuildId: ac81dbe6a14145f04ad79b76cf9e5e3c681a3cf3)
#27 pc 000000000001691c /system/lib64/libutils.so (android::Looper::pollInner(int)+912) (BuildId: a3acb0eba7fd91ea48db6f0befa41c65)
#28 pc 0000000000016524 /system/lib64/libutils.so (android::Looper::pollOnce(int, int*, int*, void**)+112) (BuildId: a3acb0eba7fd91ea48db6f0befa41c65)
#29 pc 0000000000017160 /system/lib64/libandroid.so (ALooper_pollOnce+100) (BuildId: 5d401df8830c422f11aa2e322d720831)
#30 pc 00000000015eb1cc /data/app/~~PUhNi259K87XBRkhI_36RQ==/com.myApp.int-NaIJtFK4CP8bf0nb0AVVWQ==/base.apk!libflutter.so (BuildId: ac81dbe6a14145f04ad79b76cf9e5e3c681a3cf3)
#31 pc 00000000015e58e8 /data/app/~~PUhNi259K87XBRkhI_36RQ==/com.myApp.int-NaIJtFK4CP8bf0nb0AVVWQ==/base.apk!libflutter.so (BuildId: ac81dbe6a14145f04ad79b76cf9e5e3c681a3cf3)
#32 pc 00000000015e9844 /data/app/~~PUhNi259K87XBRkhI_36RQ==/com.myApp.int-NaIJtFK4CP8bf0nb0AVVWQ==/base.apk!libflutter.so (BuildId: ac81dbe6a14145f04ad79b76cf9e5e3c681a3cf3)
#33 pc 00000000000b1910 /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+264) (BuildId: ba489d4985c0cf173209da67405662f9)
#34 pc 00000000000513f0 /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+64) (BuildId: ba489d4985c0cf173209da67405662f9)
Im developing an Android application and now I am getting a very strange error I have no idea why it happens.
I also found no similar problem in the internet.
My project is also really big and so with this error message I dont really know which code could cause this, that is why here is no code.
crash log:
pid: 4228, tid: 4235, name: Jit thread pool >>> com.application.norm <<<
signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0xc0000000018
x0 0000000000000014 x1 0000fbd4a757e530 x2 8000000000000003 x3 0000000000000014
x4 0000fbd4a75e6448 x5 0000000000000009 x6 0000000000000000 x7 0000000000000000
x8 0000000000000127 x9 8a1336e56e6fef71 x10 0000000000000000 x11 0000000000000000
x12 0000000000000000 x13 0000fbd4abe7ac90 x14 ffffffffffffffff x15 0000000000000000
x16 000000000000019e x17 00000000000001a1 x18 0000000000000038 x19 0000fbd4a95fe960
x20 00000c0000000000 x21 0000fbd4abe86678 x22 0000000000000014 x23 0000fbd4abe77bd0
x24 0000000000000128 x25 0000fbd4a9fc0828 x26 0000000000000126 x27 0000fbd4abe77bb0
x28 0000000000000000 x29 0000fbd4a95fe880
sp 0000fbd4a95fe800 lr 0000fbd4a9ef7090 pc 0000fbd4a9ef70c0
backtrace:
#00 pc 00000000002130c0 /system/lib64/libart-compiler.so (art::RegisterAllocationResolver::ConnectSiblings(art::LiveInterval*)+608)
#01 pc 000000000016cd64 /system/lib64/libart-compiler.so (art::RegisterAllocationResolver::Resolve(art::ArrayRef<art::HInstruction* const>, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, art::ArrayRef<art::LiveInterval* const>)+884)
#02 pc 000000000021490c /system/lib64/libart-compiler.so (art::RegisterAllocatorLinearScan::AllocateRegisters()+140)
#03 pc 0000000000209d90 /system/lib64/libart-compiler.so (art::AllocateRegisters(art::HGraph*, art::CodeGenerator*, art::PassObserver*, art::RegisterAllocator::Strategy, art::OptimizingCompilerStats*)+640)
#04 pc 0000000000209558 /system/lib64/libart-compiler.so (art::OptimizingCompiler::TryCompile(art::ArenaAllocator*, art::ArenaStack*, art::CodeVectorAllocator*, art::DexCompilationUnit const&, art::ArtMethod*, bool, art::VariableSizedHandleScope*) const+2120)
#05 pc 00000000001681fc /system/lib64/libart-compiler.so (art::OptimizingCompiler::JitCompile(art::Thread*, art::jit::JitCodeCache*, art::ArtMethod*, bool, art::jit::JitLogger*)+820)
#06 pc 000000000010d60c /system/lib64/libart-compiler.so (art::jit::JitCompiler::CompileMethod(art::Thread*, art::ArtMethod*, bool)+204)
#07 pc 0000000000309fcc /system/lib64/libart.so (art::jit::Jit::CompileMethod(art::ArtMethod*, art::Thread*, bool)+620)
#08 pc 000000000030c694 /system/lib64/libart.so (art::jit::JitCompileTask::Run(art::Thread*)+644)
#09 pc 00000000004b0bb8 /system/lib64/libart.so (art::ThreadPoolWorker::Run()+88)
#10 pc 00000000004b068c /system/lib64/libart.so (art::ThreadPoolWorker::Callback(void*)+148)
#11 pc 0000000000083114 /system/lib64/libc.so (__pthread_start(void*)+36)
#12 pc 00000000000233bc /system/lib64/libc.so (__start_thread+68)
Every time this crash occurs, The following information will be included in the dmesg information
Line 780: [ 7.247798] EXT4-fs (mmcblk0p12): 1 orphan inode deleted
Line 781: [ 7.253968] EXT4-fs (mmcblk0p12): recovery complete
Line 782: [ 7.266940] EXT4-fs (mmcblk0p12): mounted filesystem with ordered data mode. Opts: errors=remount-ro,nomblk_io_submit
Line 819: [ 7.826534] EXT4-fs (mmcblk0p12): Ignoring removed nomblk_io_submit option
I don't know if this exception message is related to this crash。
if you know, please help me,
thanks a lot
In my case (quite a large Qt-based project) this was caused by an attempt to use a dangling pointer to an instance of QObject derived class.
I'm receiving a native crash using a shared element transition between activities, but only for Android 8.1 and on Google devices (Pixel, Pixel 2, Nexus 6P, etc...):
pid: 20499, tid: 22683, name: RenderThread >>> [APPNAME] <<<
signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
Abort message: 'sp<> assignment detected data race'
x0 0000000000000000 x1 000000000000589b x2 0000000000000006 x3 0000000000000008
x4 0700007411003135 x5 0700007411003135 x6 0700007411003135 x7 3531ffffffffffff
x8 0000000000000083 x9 0000000010000000 x10 0000007214bf4ca0 x11 0000000000000001
x12 0000007214bf4dc0 x13 ffffffffffffffff x14 ffffffffffff0000 x15 ffffffffffffffff
x16 0000005c0f077fa8 x17 00000072b09c752c x18 0000000000000008 x19 0000000000005013
x20 000000000000589b x21 0000000000000083 x22 00000072249f1f40 x23 00000072249f1f58
x24 0000007214717590 x25 00000072248393a0 x26 00000072118d9220 x27 0000007214bf5350
x28 0000007214bf5300 x29 0000007214bf4ce0 x30 00000072b097c760
sp 0000007214bf4ca0 pc 00000072b097c788 pstate 0000000060000000
backtrace:
#00 pc 000000000001d788 /system/lib64/libc.so (abort+120)
#01 pc 0000000000007f08 /system/lib64/liblog.so (__android_log_assert+296)
#02 pc 0000000000010af4 /system/lib64/libutils.so (android::sp_report_race()+28)
#03 pc 00000000000fdd08 /system/lib64/libandroid_runtime.so (android::RootRenderNode::detachAnimators()+320)
#04 pc 00000000000fbcac /system/lib64/libandroid_runtime.so (android::AnimationContextBridge::destroy()+24)
#05 pc 000000000006fbd0 /system/lib64/libhwui.so (android::uirenderer::renderthread::Bridge_destroy(android::uirenderer::renderthread::destroyArgs*)+12)
#06 pc 00000000000718fc /system/lib64/libhwui.so (android::uirenderer::renderthread::MethodInvokeRenderTask::run()+24)
#07 pc 0000000000071c70 /system/lib64/libhwui.so (android::uirenderer::renderthread::SignalingRenderTask::run()+28)
#08 pc 0000000000072a58 /system/lib64/libhwui.so (android::uirenderer::renderthread::RenderThread::threadLoop()+336)
#09 pc 0000000000011478 /system/lib64/libutils.so (android::Thread::_threadLoop(void*)+280)
#10 pc 00000000000a9814 /system/lib64/libandroid_runtime.so (android::AndroidRuntime::javaThreadShell(void*)+140)
#11 pc 0000000000067d80 /system/lib64/libc.so (__pthread_start(void*)+36)
#12 pc 000000000001ec18 /system/lib64/libc.so (__start_thread+68)
It crashes also if the app is on background. How can I solve this? It seems to happen only if the Hardware Acceleration is enable, but I really need it enabled on my app.
I was having same issue with an AnimatedVectorDrawable set as a background of an ImageView. So basically i was showing the same animation in different rows of a recyclerview but using same object of AnimatedVectorDrawable, which lead to this crash. I solved it by creating separate objects for separate ViewHolders.
Saw the same native stack sometimes when (inadvertently) trying to restart an animation loop for an AnimatedVectorDrawable after (or perhaps while) trying to pause an Activity.
For reference, the animation loop was this:
((Animatable2)animatable).registerAnimationCallback(new Animatable2.AnimationCallback() {
#Override
public void onAnimationEnd(Drawable drawable) {
animatable.start();
}
});
When toggling away from the app, this was logged:
W/WindowManager: Unable to start animation, surface is null or no children.
Followed by a similar native stack for a race condition:
A/DEBUG: backtrace:
A/DEBUG: #00 pc 0000000000021abc /system/lib64/libc.so (abort+124)
A/DEBUG: #01 pc 00000000000080f8 /system/lib64/liblog.so (__android_log_assert+296)
A/DEBUG: #02 pc 000000000000f26c /system/lib64/libutils.so (android::sp_report_race()+28)
A/DEBUG: #03 pc 000000000010d698 /system/lib64/libandroid_runtime.so (android::RootRenderNode::detachAnimators()+320)
A/DEBUG: #04 pc 000000000010b768 /system/lib64/libandroid_runtime.so (android::AnimationContextBridge::destroy()+24)
A/DEBUG: #05 pc 00000000005d211c /system/lib64/libhwui.so (android::uirenderer::renderthread::CanvasContext::destroy()+124)
A/DEBUG: #06 pc 00000000005d5550 /system/lib64/libhwui.so (std::__1::packaged_task<void ()>::operator()()+88)
A/DEBUG: #07 pc 00000000005870b0 /system/lib64/libhwui.so (android::uirenderer::WorkQueue::process()+168)
A/DEBUG: #08 pc 00000000001fd60c /system/lib64/libhwui.so (android::uirenderer::renderthread::RenderThread::threadLoop()+244)
A/DEBUG: #09 pc 000000000000fb80 /system/lib64/libutils.so (android::Thread::_threadLoop(void*)+280)
A/DEBUG: #10 pc 0000000000083114 /system/lib64/libc.so (__pthread_start(void*)+36)
A/DEBUG: #11 pc 00000000000233bc /system/lib64/libc.so (__start_thread+68)
This has stopped the problem - it should have been there all along in the Activity class:
#Override
protected void onPause() {
super.onPause();
animatable.stop();
}
Since the rollout of Android 8 Oreo, our app has been consistently crashing in different places. All the play store crash reports show native crashes. The most frequently occuring one seems to be at libhwui.so
The most frequent device that crashes is the Nexus 6P. Pixel and Pixel XL have also shown a few.
I ll post the crash log below. I m struggling to find what causes the crash.
Any help is appreciated.
*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
Build fingerprint: 'google/angler/angler:8.0.0/OPR6.170623.013/4283548:user/release-keys'
Revision: '0'
ABI: 'arm64'
pid: 12908, tid: 12908, name: ***.*** >>> com.***.***.*** <<<
signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x100103
x0 0000000000100103 x1 0000000000000000 x2 0000007f23be8000 x3 0000000000000000
x4 0000000013305004 x5 00000000000000a8 x6 0000007f43d58000 x7 0000000000000000
x8 0000000000000000 x9 0000000000000001 x10 0000000000000019 x11 0000000000000004
x12 0000000000000000 x13 0000000000000008 x14 00000000000003e8 x15 0000000000000010
x16 0000007f420e7a18 x17 0000007f3fd64fb4 x18 0000000000000020 x19 0000000000000000
x20 0000007f23be8000 x21 00000000132ed218 x22 00000000132ece00 x23 0000000000000001
x24 00000000132ed218 x25 0000000000000000 x26 00000000132eba68 x27 00000000132eddd8
x28 0000000012f264d8 x29 0000007fe5077050 x30 00000000719d7ff4
sp 0000007fe5077040 pc 0000007f3fd64fe4 pstate 0000000060000000
backtrace:
#00 pc 000000000008bfe4 /system/lib64/libhwui.so (_ZN7android10uirenderer10RenderNode21setStagingDisplayListEPNS0_11DisplayListE+48)
#01 pc 0000000000ba1ff0 /system/framework/arm64/boot-framework.oat (offset 0x5ea000) (android.graphics.drawable.VectorDrawable.nAddChild [DEDUPED]+160)
#02 pc 0000000001334cb4 /system/framework/arm64/boot-framework.oat (offset 0x5ea000) (android.view.RenderNode.discardDisplayList+52)
#03 pc 00000000012bfe40 /system/framework/arm64/boot-framework.oat (offset 0x5ea000) (android.view.View.onDetachedFromWindowInternal+464)
#04 pc 00000000012ad284 /system/framework/arm64/boot-framework.oat (offset 0x5ea000) (android.view.View.dispatchDetachedFromWindow+196)
#05 pc 000000000130de08 /system/framework/arm64/boot-framework.oat (offset 0x5ea000) (android.view.ViewGroup.dispatchDetachedFromWindow+248)
#06 pc 0000000001378de8 /system/framework/arm64/boot-framework.oat (offset 0x5ea000) (android.view.ViewRootImpl.dispatchDetachedFromWindow+168)
#07 pc 000000000137a240 /system/framework/arm64/boot-framework.oat (offset 0x5ea000) (android.view.ViewRootImpl.doDie+208)
#08 pc 0000000001378828 /system/framework/arm64/boot-framework.oat (offset 0x5ea000) (android.view.ViewRootImpl.die+72)
#09 pc 00000000013928a0 /system/framework/arm64/boot-framework.oat (offset 0x5ea000) (android.view.WindowManagerGlobal.removeViewLocked+320)
#10 pc 0000000001394e54 /system/framework/arm64/boot-framework.oat (offset 0x5ea000) (android.view.WindowManagerGlobal.removeView+308)
#11 pc 0000000001396438 /system/framework/arm64/boot-framework.oat (offset 0x5ea000) (android.view.WindowManagerImpl.removeViewImmediate+72)
#12 pc 00000000006a9860 /system/framework/arm64/boot-framework.oat (offset 0x5ea000) (android.app.ActivityThread.handleDestroyActivity+320)
#13 pc 000000000069fbe4 /system/framework/arm64/boot-framework.oat (offset 0x5ea000) (android.app.ActivityThread.-wrap5+52)
#14 pc 000000000069b3b0 /system/framework/arm64/boot-framework.oat (offset 0x5ea000) (android.app.ActivityThread$H.handleMessage+7088)
#15 pc 000000000069745c /system/framework/arm64/boot-framework.oat (offset 0x5ea000) (android.os.Handler.dispatchMessage+188)
#16 pc 0000000000f69fb0 /system/framework/arm64/boot-framework.oat (offset 0x5ea000) (android.os.Looper.loop+1184)
#17 pc 00000000006b1868 /system/framework/arm64/boot-framework.oat (offset 0x5ea000) (android.app.ActivityThread.main+904)
#18 pc 000000000050ea38 /system/lib64/libart.so (art_quick_invoke_static_stub+600)
#19 pc 00000000000d8110 /system/lib64/libart.so (_ZN3art9ArtMethod6InvokeEPNS_6ThreadEPjjPNS_6JValueEPKc+268)
#20 pc 0000000000436994 /system/lib64/libart.so (_ZN3artL18InvokeWithArgArrayERKNS_33ScopedObjectAccessAlreadyRunnableEPNS_9ArtMethodEPNS_8ArgArrayEPNS_6JValueEPKc+104)
#21 pc 0000000000438504 /system/lib64/libart.so (_ZN3art12InvokeMethodERKNS_33ScopedObjectAccessAlreadyRunnableEP8_jobjectS4_S4_m+1464)
#22 pc 00000000003c18d8 /system/lib64/libart.so (_ZN3artL13Method_invokeEP7_JNIEnvP8_jobjectS3_S3_+48)
#23 pc 0000000000266f74 /system/framework/arm64/boot.oat (offset 0x1db000) (java.lang.Class.getDeclaredMethodInternal [DEDUPED]+180)
#24 pc 0000000001693ac8 /system/framework/arm64/boot-framework.oat (offset 0x5ea000) (com.android.internal.os.Zygote$MethodAndArgsCaller.run+136)
#25 pc 00000000016978d4 /system/framework/arm64/boot-framework.oat (offset 0x5ea000) (com.android.internal.os.ZygoteInit.main+2884)
#26 pc 000000000050ea38 /system/lib64/libart.so (art_quick_invoke_static_stub+600)
#27 pc 00000000000d8110 /system/lib64/libart.so (_ZN3art9ArtMethod6InvokeEPNS_6ThreadEPjjPNS_6JValueEPKc+268)
#28 pc 0000000000436994 /system/lib64/libart.so (_ZN3artL18InvokeWithArgArrayERKNS_33ScopedObjectAccessAlreadyRunnableEPNS_9ArtMethodEPNS_8ArgArrayEPNS_6JValueEPKc+104)
#29 pc 00000000004365e8 /system/lib64/libart.so (_ZN3art17InvokeWithVarArgsERKNS_33ScopedObjectAccessAlreadyRunnableEP8_jobjectP10_jmethodIDSt9__va_list+416)
#30 pc 000000000034b848 /system/lib64/libart.so (_ZN3art3JNI21CallStaticVoidMethodVEP7_JNIEnvP7_jclassP10_jmethodIDSt9__va_list+616)
#31 pc 00000000000b4188 /system/lib64/libandroid_runtime.so (_ZN7_JNIEnv20CallStaticVoidMethodEP7_jclassP10_jmethodIDz+120)
#32 pc 00000000000b6248 /system/lib64/libandroid_runtime.so (_ZN7android14AndroidRuntime5startEPKcRKNS_6VectorINS_7String8EEEb+824)
#33 pc 0000000000002454 /system/bin/app_process64 (main+1348)
#34 pc 000000000001b668 /system/lib64/libc.so (__libc_init+88)
#35 pc 0000000000001e70 /system/bin/app_process64 (do_arm64_start+80)
we recently launched our app and upgrade actually from previous version..
and suddenly we started to see this error in a ton of devices ..we have no clue whats happening and the logs are very vague ..
Attaching the logs here .But any help or some clue might help us debug the issue .
Build fingerprint: 'Verizon/zeroltevzw/zeroltevzw:5.1.1/LMY47X/G925VVRU4BOK7:user/release-keys'
Revision: '10'
ABI: 'arm64'
pid: 31610, tid: 31610, name: st.mediamanager >>> <<<
signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
Abort message: 'sart/runtime/indirect_reference_table.cc:98] JNI ERROR (app bug): local reference table overflow (max=512)'
x0 0000000000000000 x1 0000000000007b7a x2 0000000000000006 x3 0000007fa219fe30
x4 0000007fa219fe30 x5 0000000000000005 x6 0000000000000001 x7 0000000000000020
x8 0000000000000083 x9 00000000000000ca x10 0000007fa1f2a000 x11 0000000000000001
x12 0000000000000001 x13 0000007fa1f2a000 x14 c4aa4c0daad90e20 x15 0000007f92002a31
x16 0000007fa1f2a610 x17 0000007fa1eca174 x18 0000000000000000 x19 0000007fa219fe30
x20 0000007fa21a00e8 x21 0000007fa1f30000 x22 0000000000000001 x23 0000000000000006
x24 0000007fee90e2d0 x25 0000007f9e0a6000 x26 0000007fee90e2c8 x27 0000007f9dffd520
x28 0000007f9e0a6000 x29 0000007fee90e150 x30 0000007fa1e8c264
sp 0000007fee90e150 pc 0000007fa1eca17c pstate 0000000060000000
backtrace:
#00 pc 000000000005e17c /system/lib64/libc.so (tgkill+8)
#01 pc 0000000000020260 /system/lib64/libc.so (pthread_kill+160)
#02 pc 0000000000021794 /system/lib64/libc.so (raise+28)
#03 pc 000000000001b17c /system/lib64/libc.so (abort+60)
#04 pc 0000000000310534 /system/lib64/libart.so (art::Runtime::Abort()+300)
#05 pc 00000000000d5378 /system/lib64/libart.so (art::LogMessage::~LogMessage()+2684)
#06 pc 00000000001e7ff0 /system/lib64/libart.so (art::IndirectReferenceTable::Add(unsigned int, art::mirror::Object*)+416)
#07 pc 00000000002e28cc /system/lib64/libart.so (art::VMClassLoader_findLoadedClass(_JNIEnv*, _jclass*, _jobject*, _jstring*)+248)
#08 pc 000000000002a5dc /system/framework/arm64/boot.oat
Build fingerprint: 'Verizon/trltevzw/trltevzw:5.1.1/LMY47X/N910VVRU2BPA1:user/release-keys'
Revision: '12'
ABI: 'arm'
pid: 481, tid: 481, name: st.mediamanager >>> <<<
signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
Abort message: 'sart/runtime/indirect_reference_table.cc:109] JNI ERROR (app bug): local reference table overflow (max=512)'
r0 00000000 r1 000001e1 r2 00000006 r3 00000000
r4 b6fc3e38 r5 00000006 r6 00000016 r7 0000010c
r8 00000000 r9 b486f550 sl b4827800 fp 00000475
ip 000001e1 sp bebbaaf8 lr b6e22715 pc b6e46854 cpsr 60070010
backtrace:
#00 pc 00038854 /system/lib/libc.so (tgkill+12)
#01 pc 00014711 /system/lib/libc.so (pthread_kill+52)
#02 pc 0001532f /system/lib/libc.so (raise+10)
#03 pc 00011bc9 /system/lib/libc.so (__libc_android_abort+36)
#04 pc 0001003c /system/lib/libc.so (abort+4)
#05 pc 00230cd1 /system/lib/libart.so (art::Runtime::Abort()+160)
#06 pc 000ac58b /system/lib/libart.so (art::LogMessage::~LogMessage()+1322)
#07 pc 0016996d /system/lib/libart.so (art::IndirectReferenceTable::Add(unsigned int, art::mirror::Object*)+244)
#08 pc 00214f43 /system/lib/libart.so (art::VMClassLoader_findLoadedClass(_JNIEnv*, _jclass*, _jobject*, _jstring*)+162)
#09 pc 0001bd8d /system/framework/arm/boot.oat
Build fingerprint: 'Verizon/zenltevzw/zenltevzw:5.1.1/LMY47X/G928VVRU2AOJ3:user/release-keys'
Revision: '9'
ABI: 'arm64'
pid: 18658, tid: 18658, name: st.mediamanager >>> <<<
signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
Abort message: 'sart/runtime/indirect_reference_table.cc:109] JNI ERROR (app bug): local reference table overflow (max=512)'
x0 0000000000000000 x1 00000000000048e2 x2 0000000000000006 x3 0000007fa3887e30
x4 0000007fa3887e30 x5 0000000000000005 x6 0000000000000001 x7 0000000000000020
x8 0000000000000083 x9 000000000000005e x10 0000007fa3613000 x11 0000000000000001
x12 0000000000000001 x13 0000007fa3613000 x14 24d3f27831b256ef x15 0000000000000001
x16 0000007fa3613610 x17 0000007fa35b30d4 x18 0000000000000000 x19 0000007fa3887e30
x20 0000007fa38880e8 x21 0000007fa3619000 x22 0000000000000001 x23 0000000000000006
x24 0000007fc7e2cbc0 x25 0000007f9f820d40 x26 0000000000000001 x27 0000007f8c101b60
x28 0000000000000000 x29 0000007fc7e2ca40 x30 0000007fa3575224
sp 0000007fc7e2ca40 pc 0000007fa35b30dc pstate 0000000060000000
backtrace:
#00 pc 000000000005e0dc /system/lib64/libc.so (tgkill+8)
#01 pc 0000000000020220 /system/lib64/libc.so (pthread_kill+160)
#02 pc 0000000000021754 /system/lib64/libc.so (raise+28)
#03 pc 000000000001b13c /system/lib64/libc.so (abort+60)
#04 pc 00000000002ffca4 /system/lib64/libart.so (art::Runtime::Abort()+300)
#05 pc 00000000000d15b8 /system/lib64/libart.so (art::LogMessage::~LogMessage()+2684)
#06 pc 00000000002ad730 /system/lib64/libart.so (art::Monitor::VisitLocks(art::StackVisitor*, void (*)(art::mirror::Object*, void*), void*, bool)+952
#07 pc 0000000000314978 /system/lib64/libart.so (art::StackDumpVisitor::VisitFrame()+568)
#08 pc 000000000030ba08 /system/lib64/libart.so (art::StackVisitor::WalkStack(bool)+308)
#09 pc 0000000000313754 /system/lib64/libart.so (art::Thread::DumpJavaStack(std::__1::basic_ostream<char, std::__1::char_traits<char> >&) const+268)
#10 pc 0000000000313968 /system/lib64/libart.so (art::Thread::DumpStack(std::__1::basic_ostream<char, std::__1::char_traits<char> >&) const+272)
#11 pc 000000000031e8dc /system/lib64/libart.so (art::ThreadList::DumpLocked(std::__1::basic_ostream<char, std::__1::char_traits<char> >&)+100)
#12 pc 00000000002ffd34 /system/lib64/libart.so (art::Runtime::Abort()+444)
#13 pc 00000000000d15b8 /system/lib64/libart.so (art::LogMessage::~LogMessage()+2684)
#14 pc 00000000001d7468 /system/lib64/libart.so (art::IndirectReferenceTable::Add(unsigned int, art::mirror::Object*)+416)
#15 pc 00000000002d2018 /system/lib64/libart.so (art::VMClassLoader_findLoadedClass(_JNIEnv*, _jclass*, _jobject*, _jstring*)+248)
#16 pc 000000000002a5dc /system/framework/arm64/boot.oat
Build fingerprint: 'Verizon/kltevzw/kltevzw:5.0/LRX21T/G900VVRU2BOK3:user/release-keys'
Revision: '14'
ABI: 'arm'
pid: 32148, tid: 32148, name: st.mediamanager >>> <<<
signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
Abort message: 'art/runtime/indirect_reference_table.cc:113] JNI ERROR (app bug): local reference table overflow (max=512)'
r0 00000000 r1 00007d94 r2 00000006 r3 00000000
r4 b6f92114 r5 00000006 r6 00000016 r7 0000010c
r8 00000000 r9 b4e4f520 sl b4e07800 fp 000004ba
ip 00007d94 sp be8a3b38 lr b6f1bfd1 pc b6f40268 cpsr 60070010
backtrace:
#00 pc 00038268 /system/lib/libc.so (tgkill+12)
#01 pc 00013fcd /system/lib/libc.so (pthread_kill+52)
#02 pc 00014beb /system/lib/libc.so (raise+10)
#03 pc 00011531 /system/lib/libc.so (__libc_android_abort+36)
#04 pc 0000fcbc /system/lib/libc.so (abort+4)
#05 pc 0021d5d9 /system/lib/libart.so (art::Runtime::Abort()+160)
#06 pc 000a834b /system/lib/libart.so (art::LogMessage::~LogMessage()+1322)
#07 pc 001574b7 /system/lib/libart.so (art::IndirectReferenceTable::Add(unsigned int, art::mirror::Object*)+346)
#08 pc 002010d5 /system/lib/libart.so (art::VMClassLoader_findLoadedClass(_JNIEnv*, _jclass*, _jobject*, _jstring*)+136)
#09 pc 0001b151 /system/framework/arm/boot.oat
I don't have a full answer, but its too lengthy for a comment so I'll post it as one.
So the error is just what you expect- its a call into native code that causes you to have more than 512 objects shared with native. Usually that happens because of a leak somewhere. And you don't need to be using native code directly to do it- the framework makes a LOT of native calls behind the scenes.
From the stack trace- I see its libart.so, not libdalvik.so. So this is happening on new devices which have switched from the Dalvik VM to Art. The stack trace looks like it was trying to load a class and add a reference to it for some JNI code, but I can't be certain of that. I do know that we've seen class loading bugs at work on Art that didn't exist on dalvik.
If you have any native code at all I'd make sure you were releasing all reference to java memory and classes properly. If you don't- this may be a bug in Art, knowing what the app was doing at the time of the crash would be useful. Is the crash consistent? If so, what are you doing?