我的 Android 应用程序使用谷歌地图进行 GPS 跟踪。
Android 10/11 环境。当 targetSdk 从 28 更改为 29+ 时,似乎出现了这个问题。我已阅读有关此 IssueTracker 线程上类似问题的几份报告:https ://issuetracker.google.com/issues/148240970
根据谷歌的说法,该问题已得到解决,但此问题仍然存在。希望有人可以阐明从哪里开始或我可以做些什么来继续前进。
在连续使用几个小时后,每天都会发生这种崩溃,除了 SIGABRT 之外,Crashlytics 中没有相关数据。
查看所有在线调试信息,我被指出要抓取墓碑,看看他们是否有更多关于导致内存不足问题的信息。
这是带有 SIGABRT 信息的墓碑:
uid: 10262
signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
Abort message: 'Checked call failed for Cache -W: Out of memory'
x0 0000000000000000 x1 0000000000001920 x2 0000000000000006 x3 0000007d046e1840
x4 fefefefefefefeff x5 fefefefefefefeff x6 fefefefefefefeff x7 7f7f7f7f7f7f7f7f
x8 00000000000000f0 x9 9bd081d9cb0c3dba x10 0000000000000000 x11 ffffffc0fffffbdf
x12 0000000000000001 x13 000000006154a5f8 x14 00047860c3585c00 x15 0000a69f6fa999ac
x16 0000007d9b723948 x17 0000007d9b700440 x18 0000007cac8f0000 x19 000000000000071f
x20 0000000000001920 x21 00000000ffffffff x22 0000007d9b727df0 x23 0000007d046e19b0
x24 0000007d046e1970 x25 000000000040fc00 x26 0000007d046e1c58 x27 0000000000820000
x28 0000007d046e22b8 x29 0000007d046e18c0
lr 0000007d9b6afe78 sp 0000007d046e1820 pc 0000007d9b6afea4 pst 0000000000001000
backtrace:
#00 pc 000000000008cea4 /apex/com.android.runtime/lib64/bionic/libc.so (abort+164) (BuildId: 208420355a489a8e9dbb64be7cd0d9bd)
#01 pc 000000000004b10c /system/lib64/libc++.so (abort_message+248) (BuildId: 0b0a77665612a8d191382cc5167f4487)
#02 pc 000000000004b2d0 /system/lib64/libc++.so (demangling_terminate_handler()+212) (BuildId: 0b0a77665612a8d191382cc5167f4487)
#03 pc 000000000004bdc4 /system/lib64/libc++.so (std::__terminate(void (*)())+12) (BuildId: 0b0a77665612a8d191382cc5167f4487)
#04 pc 000000000004b4e0 /system/lib64/libc++.so (__cxxabiv1::failed_throw(__cxxabiv1::__cxa_exception*)+28) (BuildId: 0b0a77665612a8d191382cc5167f4487)
#05 pc 000000000004b448 /system/lib64/libc++.so (__cxa_throw+112) (BuildId: 0b0a77665612a8d191382cc5167f4487)
#06 pc 000000000004ef9c /system/lib64/libc++.so (operator new(unsigned long)+96) (BuildId: 0b0a77665612a8d191382cc5167f4487)
#07 pc 000000000009a53c /system/lib64/libc++.so (std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::__grow_by_and_replace(unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, char const*)+156) (BuildId: 0b0a77665612a8d191382cc5167f4487)
#08 pc 000000000009a440 /system/lib64/libc++.so (std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::append(char const*, unsigned long)+100) (BuildId: 0b0a77665612a8d191382cc5167f4487)
#09 pc 00000000000104f0 /system/lib64/libbase.so (android::base::ReadFdToString(android::base::borrowed_fd, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >*)+192) (BuildId: fdc879a76449eecdb87795db05dcc86a)
#10 pc 00000000000105f0 /system/lib64/libbase.so (android::base::ReadFileToString(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >*, bool)+192) (BuildId: fdc879a76449eecdb87795db05dcc86a)
#11 pc 0000000000048e78 /system/lib64/libunwindstack.so (unwindstack::Maps::Parse()+116) (BuildId: 7f8ca72cdb46b50af95829f351829e67)
#12 pc 000000000000dc7c /system/lib64/libbacktrace.so (UnwindStackMap::Build()+532) (BuildId: 41c3e5ba710fdb95b211a2b696c33f6d)
#13 pc 000000000000e11c /system/lib64/libbacktrace.so (BacktraceMap::Create(int, bool)+128) (BuildId: 41c3e5ba710fdb95b211a2b696c33f6d)
#14 pc 000000000059da74 /apex/com.android.art/lib64/libart.so (art::ThreadList::Dump(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, bool)+244) (BuildId: fea9d9295c801e227e593a5a44e7d20e)
#15 pc 000000000053aebc /apex/com.android.art/lib64/libart.so (art::Runtime::Abort(char const*)+1896) (BuildId: fea9d9295c801e227e593a5a44e7d20e)
#16 pc 000000000001394c /system/lib64/libbase.so (android::base::SetAborter(std::__1::function<void (char const*)>&&)::$_3::__invoke(char const*)+76) (BuildId: fdc879a76449eecdb87795db05dcc86a)
#17 pc 00000000000130cc /system/lib64/libbase.so (android::base::LogMessage::~LogMessage()+312) (BuildId: fdc879a76449eecdb87795db05dcc86a)
#18 pc 000000000033e400 /apex/com.android.art/lib64/libart.so (void art::CheckedCall<int (void*, unsigned long, int), unsigned char*, unsigned long, int>(int const(&)(void*, unsigned long, int), char const*, unsigned char*, unsigned long, int)+212) (BuildId: fea9d9295c801e227e593a5a44e7d20e)
#19 pc 0000000000338f30 /apex/com.android.art/lib64/libart.so (art::jit::JitCodeCache::Reserve(art::Thread*, art::jit::JitMemoryRegion*, unsigned long, unsigned long, unsigned long, art::ArtMethod*, art::ArrayRef<unsigned char const>*, art::ArrayRef<unsigned char const>*)+704) (BuildId: fea9d9295c801e227e593a5a44e7d20e)
#20 pc 00000000001d7434 /apex/com.android.art/lib64/libart-compiler.so (art::OptimizingCompiler::JitCompile(art::Thread*, art::jit::JitCodeCache*, art::jit::JitMemoryRegion*, art::ArtMethod*, bool, bool, art::jit::JitLogger*)+1696) (BuildId: 63efff273e4472312bfaaf8e78d8fe04)
#21 pc 0000000000110cf0 /apex/com.android.art/lib64/libart-compiler.so (art::jit::JitCompiler::CompileMethod(art::Thread*, art::jit::JitMemoryRegion*, art::ArtMethod*, bool, bool)+232) (BuildId: 63efff273e4472312bfaaf8e78d8fe04)
#22 pc 0000000000326e7c /apex/com.android.art/lib64/libart.so (art::jit::Jit::CompileMethod(art::ArtMethod*, art::Thread*, bool, bool, bool)+1104) (BuildId: fea9d9295c801e227e593a5a44e7d20e)
#23 pc 000000000032f3b8 /apex/com.android.art/lib64/libart.so (art::jit::JitCompileTask::Run(art::Thread*)+668) (BuildId: fea9d9295c801e227e593a5a44e7d20e)
#24 pc 00000000005a6694 /apex/com.android.art/lib64/libart.so (art::ThreadPoolWorker::Run()+108) (BuildId: fea9d9295c801e227e593a5a44e7d20e)
#25 pc 00000000005a6164 /apex/com.android.art/lib64/libart.so (art::ThreadPoolWorker::Callback(void*)+192) (BuildId: fea9d9295c801e227e593a5a44e7d20e)
#26 pc 00000000000f41b4 /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+64) (BuildId: 208420355a489a8e9dbb64be7cd0d9bd)
#27 pc 000000000008ede4 /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+64) (BuildId: 208420355a489a8e9dbb64be7cd0d9bd)
非常感谢任何和所有帮助,因为很难找到有关如何深入研究这些信息的信息。
谢谢!