1

我的 Android 应用程序在 8.1 以下的 Android 版本(基于 Mupdf 的应用程序)上运行良好,在 Android 8.1 上进行测试时,它不断崩溃并出现以下错误:

    /xxx.xxx.xxx.xxxx A/libc: Fatal signal 11 (SIGSEGV), code 1, fault addr 0xa3426e8 in tid 16334 (AsyncTask #1), pid 16267 (.xxx.xxx.xxxx)
2019-02-18 17:44:36.669 16342-16342/? A/DEBUG: *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
2019-02-18 17:44:36.671 16342-16342/? A/DEBUG: Build fingerprint: 'google/sdk_gphone_x86/generic_x86:8.1.0/OSM1.180201.007/4586646:user/release-keys'
2019-02-18 17:44:36.671 16342-16342/? A/DEBUG: Revision: '0'
2019-02-18 17:44:36.671 16342-16342/? A/DEBUG: ABI: 'x86'
2019-02-18 17:44:36.671 16342-16342/? A/DEBUG: pid: 16267, tid: 16334, name: AsyncTask #1  >>> xxx.xxx.xxx.xxxx <<<
2019-02-18 17:44:36.671 16342-16342/? A/DEBUG: signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0xa3426e8
2019-02-18 17:44:36.671 16342-16342/? A/DEBUG:     eax 00000000  ebx 8c84575b  ecx 00001a99  edx 00000004
2019-02-18 17:44:36.671 16342-16342/? A/DEBUG:     esi 0a335220  edi 00003533
2019-02-18 17:44:36.672 16342-16342/? A/DEBUG:     xcs 00000073  xds 0000007b  xes 0000007b  xfs 0000003b  xss 0000007b
2019-02-18 17:44:36.672 16342-16342/? A/DEBUG:     eip a376fa97  ebp 88ecb538  esp 88ecb510  flags 00210202
2019-02-18 17:44:36.701 16342-16342/? A/DEBUG: backtrace:
2019-02-18 17:44:36.702 16342-16342/? A/DEBUG:     #00 pc 001f3a97  /system/lib/libart.so (art::CatchHandlerIterator::CatchHandlerIterator(art::DexFile::CodeItem const&, unsigned int)+183)
2019-02-18 17:44:36.702 16342-16342/? A/DEBUG:     #01 pc 00115944  /system/lib/libart.so (art::ArtMethod::FindCatchBlock(art::Handle<art::mirror::Class>, unsigned int, bool*)+212)
2019-02-18 17:44:36.702 16342-16342/? A/DEBUG:     #02 pc 00321115  /system/lib/libart.so (art::interpreter::FindNextInstructionFollowingException(art::Thread*, art::ShadowFrame&, unsigned int, art::instrumentation::Instrumentation const*)+261)
2019-02-18 17:44:36.702 16342-16342/? A/DEBUG:     #03 pc 00337257  /system/lib/libart.so (_ZN3art11interpreter17ExecuteSwitchImplILb1ELb0EEENS_6JValueEPNS_6ThreadEPKNS_7DexFile8CodeItemERNS_11ShadowFrameES2_b+81655)
2019-02-18 17:44:36.702 16342-16342/? A/DEBUG:     #04 pc 002f3c2a  /system/lib/libart.so (art::interpreter::Execute(art::Thread*, art::DexFile::CodeItem const*, art::ShadowFrame&, art::JValue, bool)+1050)
2019-02-18 17:44:36.702 16342-16342/? A/DEBUG:     #05 pc 002fa2e7  /system/lib/libart.so (art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::DexFile::CodeItem const*, art::ShadowFrame*, art::JValue*)+231)
2019-02-18 17:44:36.702 16342-16342/? A/DEBUG:     #06 pc 0031b80b  /system/lib/libart.so (_ZN3art11interpreter6DoCallILb1ELb0EEEbPNS_9ArtMethodEPNS_6ThreadERNS_11ShadowFrameEPKNS_11InstructionEtPNS_6JValueE+667)
2019-02-18 17:44:36.702 16342-16342/? A/DEBUG:     #07 pc 006299a3  /system/lib/libart.so (MterpInvokeVirtualRange+723)
2019-02-18 17:44:36.702 16342-16342/? A/DEBUG:     #08 pc 006335a1  /system/lib/libart.so (artMterpAsmInstructionStart+14881)
2019-02-18 17:44:36.702 16342-16342/? A/DEBUG:     #09 pc 002f3a2b  /system/lib/libart.so (art::interpreter::Execute(art::Thread*, art::DexFile::CodeItem const*, art::ShadowFrame&, art::JValue, bool)+539)
2019-02-18 17:44:36.702 16342-16342/? A/DEBUG:     #10 pc 002fa2e7  /system/lib/libart.so (art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::DexFile::CodeItem const*, art::ShadowFrame*, art::JValue*)+231)
2019-02-18 17:44:36.702 16342-16342/? A/DEBUG:     #11 pc 0031b80b  /system/lib/libart.so (_ZN3art11interpreter6DoCallILb1ELb0EEEbPNS_9ArtMethodEPNS_6ThreadERNS_11ShadowFrameEPKNS_11InstructionEtPNS_6JValueE+667)
2019-02-18 17:44:36.702 16342-16342/? A/DEBUG:     #12 pc 006299a3  /system/lib/libart.so (MterpInvokeVirtualRange+723)
2019-02-18 17:44:36.702 16342-16342/? A/DEBUG:     #13 pc 006335a1  /system/lib/libart.so (artMterpAsmInstructionStart+14881)
2019-02-18 17:44:36.702 16342-16342/? A/DEBUG:     #14 pc 002f3a2b  /system/lib/libart.so (art::interpreter::Execute(art::Thread*, art::DexFile::CodeItem const*, art::ShadowFrame&, art::JValue, bool)+539)
2019-02-18 17:44:36.702 16342-16342/? A/DEBUG:     #15 pc 002fa2e7  /system/lib/libart.so (art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::DexFile::CodeItem const*, art::ShadowFrame*, art::JValue*)+231)
2019-02-18 17:44:36.702 16342-16342/? A/DEBUG:     #16 pc 0031b80b  /system/lib/libart.so (_ZN3art11interpreter6DoCallILb1ELb0EEEbPNS_9ArtMethodEPNS_6ThreadERNS_11ShadowFrameEPKNS_11InstructionEtPNS_6JValueE+667)
2019-02-18 17:44:36.702 16342-16342/? A/DEBUG:     #17 pc 006299a3  /system/lib/libart.so (MterpInvokeVirtualRange+723)
2019-02-18 17:44:36.702 16342-16342/? A/DEBUG:     #18 pc 006335a1  /system/lib/libart.so (artMterpAsmInstructionStart+14881)
2019-02-18 17:44:36.702 16342-16342/? A/DEBUG:     #19 pc 002f3a2b  /system/lib/libart.so (art::interpreter::Execute(art::Thread*, art::DexFile::CodeItem const*, art::ShadowFrame&, art::JValue, bool)+539)
2019-02-18 17:44:36.702 16342-16342/? A/DEBUG:     #20 pc 002fa2e7  /system/lib/libart.so (art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::DexFile::CodeItem const*, art::ShadowFrame*, art::JValue*)+231)
2019-02-18 17:44:36.702 16342-16342/? A/DEBUG:     #21 pc 0031a78a  /system/lib/libart.so (_ZN3art11interpreter6DoCallILb0ELb0EEEbPNS_9ArtMethodEPNS_6ThreadERNS_11ShadowFrameEPKNS_11InstructionEtPNS_6JValueE+810)
2019-02-18 17:44:36.703 16342-16342/? A/DEBUG:     #22 pc 00627e14  /system/lib/libart.so (MterpInvokeVirtual+756)
2019-02-18 17:44:36.703 16342-16342/? A/DEBUG:     #23 pc 006332a1  /system/lib/libart.so (artMterpAsmInstructionStart+14113)
2019-02-18 17:44:36.703 16342-16342/? A/DEBUG:     #24 pc 002f3a2b  /system/lib/libart.so (art::interpreter::Execute(art::Thread*, art::DexFile::CodeItem const*, art::ShadowFrame&, art::JValue, bool)+539)
2019-02-18 17:44:36.703 16342-16342/? A/DEBUG:     #25 pc 002fa2e7  /system/lib/libart.so (art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::DexFile::CodeItem const*, art::ShadowFrame*, art::JValue*)+231)
2019-02-18 17:44:36.703 16342-16342/? A/DEBUG:     #26 pc 0031a78a  /system/lib/libart.so (_ZN3art11interpreter6DoCallILb0ELb0EEEbPNS_9ArtMethodEPNS_6ThreadERNS_11ShadowFrameEPKNS_11InstructionEtPNS_6JValueE+810)
2019-02-18 17:44:36.703 16342-16342/? A/DEBUG:     #27 pc 00627e14  /system/lib/libart.so (MterpInvokeVirtual+756)
2019-02-18 17:44:36.703 16342-16342/? A/DEBUG:     #28 pc 006332a1  /system/lib/libart.so (artMterpAsmInstructionStart+14113)
2019-02-18 17:44:36.703 16342-16342/? A/DEBUG:     #29 pc 002f3a2b  /system/lib/libart.so (art::interpreter::Execute(art::Thread*, art::DexFile::CodeItem const*, art::ShadowFrame&, art::JValue, bool)+539)
2019-02-18 17:44:36.703 16342-16342/? A/DEBUG:     #30 pc 002fa2e7  /system/lib/libart.so (art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::DexFile::CodeItem const*, art::ShadowFrame*, art::JValue*)+231)
2019-02-18 17:44:36.703 16342-16342/? A/DEBUG:     #31 pc 0031a78a  /system/lib/libart.so (_ZN3art11interpreter6DoCallILb0ELb0EEEbPNS_9ArtMethodEPNS_6ThreadERNS_11ShadowFrameEPKNS_11InstructionEtPNS_6JValueE+810)
2019-02-18 17:44:36.703 16342-16342/? A/DEBUG:     #32 pc 00628fdf  /system/lib/libart.so (MterpInvokeInterface+1647)
2019-02-18 17:44:36.703 16342-16342/? A/DEBUG:     #33 pc 006334a1  /system/lib/libart.so (artMterpAsmInstructionStart+14625)
2019-02-18 17:44:36.703 16342-16342/? A/DEBUG:     #34 pc 002f3a2b  /system/lib/libart.so (art::interpreter::Execute(art::Thread*, art::DexFile::CodeItem const*, art::ShadowFrame&, art::JValue, bool)+539)
2019-02-18 17:44:36.703 16342-16342/? A/DEBUG:     #35 pc 002fa2e7  /system/lib/libart.so (art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::DexFile::CodeItem const*, art::ShadowFrame*, art::JValue*)+231)
2019-02-18 17:44:36.703 16342-16342/? A/DEBUG:     #36 pc 0031a78a  /system/lib/libart.so (_ZN3art11interpreter6DoCallILb0ELb0EEEbPNS_9ArtMethodEPNS_6ThreadERNS_11ShadowFrameEPKNS_11InstructionEtPNS_6JValueE+810)
2019-02-18 17:44:36.703 16342-16342/? A/DEBUG:     #37 pc 00628fdf  /system/lib/libart.so (MterpInvokeInterface+1647)
2019-02-18 17:44:36.703 16342-16342/? A/DEBUG:     #38 pc 006334a1  /system/lib/libart.so (artMterpAsmInstructionStart+14625)
2019-02-18 17:44:36.703 16342-16342/? A/DEBUG:     #39 pc 002f3a2b  /system/lib/libart.so (art::interpreter::Execute(art::Thread*, art::DexFile::CodeItem const*, art::ShadowFrame&, art::JValue, bool)+539)
2019-02-18 17:44:36.704 16342-16342/? A/DEBUG:     #40 pc 002fa2e7  /system/lib/libart.so (art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::DexFile::CodeItem const*, art::ShadowFrame*, art::JValue*)+231)
2019-02-18 17:44:36.704 16342-16342/? A/DEBUG:     #41 pc 0031a78a  /system/lib/libart.so (_ZN3art11interpreter6DoCallILb0ELb0EEEbPNS_9ArtMethodEPNS_6ThreadERNS_11ShadowFrameEPKNS_11InstructionEtPNS_6JValueE+810)
2019-02-18 17:44:36.704 16342-16342/? A/DEBUG:     #42 pc 00628fdf  /system/lib/libart.so (MterpInvokeInterface+1647)
2019-02-18 17:44:36.704 16342-16342/? A/DEBUG:     #43 pc 006334a1  /system/lib/libart.so (artMterpAsmInstructionStart+14625)
2019-02-18 17:44:36.704 16342-16342/? A/DEBUG:     #44 pc 002f3a2b  /system/lib/libart.so (art::interpreter::Execute(art::Thread*, art::DexFile::CodeItem const*, art::ShadowFrame&, art::JValue, bool)+539)
2019-02-18 17:44:36.704 16342-16342/? A/DEBUG:     #45 pc 002fa2e7  /system/lib/libart.so (art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::DexFile::CodeItem const*, art::ShadowFrame*, art::JValue*)+231)
2019-02-18 17:44:36.704 16342-16342/? A/DEBUG:     #46 pc 0031a78a  /system/lib/libart.so (_ZN3art11interpreter6DoCallILb0ELb0EEEbPNS_9ArtMethodEPNS_6ThreadERNS_11ShadowFrameEPKNS_11InstructionEtPNS_6JValueE+810)
2019-02-18 17:44:36.704 16342-16342/? A/DEBUG:     #47 pc 00627e14  /system/lib/libart.so (MterpInvokeVirtual+756)
2019-02-18 17:44:36.704 16342-16342/? A/DEBUG:     #48 pc 006332a1  /system/lib/libart.so (artMterpAsmInstructionStart+14113)
2019-02-18 17:44:36.705 16342-16342/? A/DEBUG:     #49 pc 002f3a2b  /system/lib/libart.so (art::interpreter::Execute(art::Thread*, art::DexFile::CodeItem const*, art::ShadowFrame&, art::JValue, bool)+539)
2019-02-18 17:44:36.705 16342-16342/? A/DEBUG:     #50 pc 002fa2e7  /system/lib/libart.so (art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::DexFile::CodeItem const*, art::ShadowFrame*, art::JValue*)+231)
2019-02-18 17:44:36.705 16342-16342/? A/DEBUG:     #51 pc 0031a78a  /system/lib/libart.so (_ZN3art11interpreter6DoCallILb0ELb0EEEbPNS_9ArtMethodEPNS_6ThreadERNS_11ShadowFrameEPKNS_11InstructionEtPNS_6JValueE+810)
2019-02-18 17:44:36.705 16342-16342/? A/DEBUG:     #52 pc 00628fdf  /system/lib/libart.so (MterpInvokeInterface+1647)
2019-02-18 17:44:36.705 16342-16342/? A/DEBUG:     #53 pc 006334a1  /system/lib/libart.so (artMterpAsmInstructionStart+14625)
2019-02-18 17:44:36.705 16342-16342/? A/DEBUG:     #54 pc 002f3a2b  /system/lib/libart.so (art::interpreter::Execute(art::Thread*, art::DexFile::CodeItem const*, art::ShadowFrame&, art::JValue, bool)+539)
2019-02-18 17:44:36.705 16342-16342/? A/DEBUG:     #55 pc 002fa1cb  /system/lib/libart.so (art::interpreter::EnterInterpreterFromEntryPoint(art::Thread*, art::DexFile::CodeItem const*, art::ShadowFrame*)+139)
2019-02-18 17:44:36.708 16342-16342/? A/DEBUG:     #56 pc 006179bf  /system/lib/libart.so (artQuickToInterpreterBridge+1311)
2019-02-18 17:44:36.708 16342-16342/? A/DEBUG:     #57 pc 0064832d  /system/lib/libart.so (art_quick_to_interpreter_bridge+77)
2019-02-18 17:44:36.708 16342-16342/? A/DEBUG:     #58 pc 00642262  /system/lib/libart.so (art_quick_invoke_stub+338)
2019-02-18 17:44:36.708 16342-16342/? A/DEBUG:     #59 pc 001160cf  /system/lib/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+223)
2019-02-18 17:44:36.708 16342-16342/? A/DEBUG:     #60 pc 00544d6b  /system/lib/libart.so (art::InvokeWithArgArray(art::ScopedObjectAccessAlreadyRunnable const&, art::ArtMethod*, art::ArgArray*, art::JValue*, char const*)+91)
2019-02-18 17:44:36.708 16342-16342/? A/DEBUG:     #61 pc 00546238  /system/lib/libart.so (art::InvokeVirtualOrInterfaceWithJValues(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, _jmethodID*, jvalue*)+744)
2019-02-18 17:44:36.708 16342-16342/? A/DEBUG:     #62 pc 005754ff  /system/lib/libart.so (art::Thread::CreateCallback(void*)+1487)
2019-02-18 17:44:36.708 16342-16342/? A/DEBUG:     #63 pc 00071445  /system/lib/libc.so (__pthread_start(void*)+53)
2019-02-18 17:44:37.863 1513-1513/? E//system/bin/tombstoned: Tombstone written to: /data/tombstones/tombstone_04

该应用程序将 JNI 与 lib libmupdf.so(来自 MuPDF)一起使用。

它在 Android 7.1 上运行良好,适用于模拟器和真实设备。

这是另一个错误:

        *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
    2019-02-18 19:07:15.438 20728-20728/? A/DEBUG: Build fingerprint: 'google/sdk_gphone_x86/generic_x86:8.1.0/OSM1.180201.007/4586646:user/release-keys'
    2019-02-18 19:07:15.438 20728-20728/? A/DEBUG: Revision: '0'
    2019-02-18 19:07:15.438 20728-20728/? A/DEBUG: ABI: 'x86'
    2019-02-18 19:07:15.438 20728-20728/? A/DEBUG: pid: 20505, tid: 20607, name: AsyncTask #3  >>> xxx.xxx.xxxx <<<
    2019-02-18 19:07:15.438 20728-20728/? A/DEBUG: signal 11 (SIGSEGV), code 2 (SEGV_ACCERR), fault addr 0xa3c94a50
    2019-02-18 19:07:15.438 20728-20728/? A/DEBUG:     eax a3c94a48  ebx 8444bdf8  ecx 86f49000  edx 00000000
    2019-02-18 19:07:15.438 20728-20728/? A/DEBUG:     esi 81c7ba80  edi 87efe904
    2019-02-18 19:07:15.438 20728-20728/? A/DEBUG:     xcs 00000073  xds 0000007b  xes 0000007b  xfs 0000003b  xss 0000007b
    2019-02-18 19:07:15.438 20728-20728/? A/DEBUG:     eip 8334bb2a  ebp a3db93c0  esp 87efe740  flags 00210286
    2019-02-18 19:07:15.445 20728-20728/? A/DEBUG: backtrace:
    2019-02-18 19:07:15.445 20728-20728/? A/DEBUG:     #00 pc 00144b2a  /data/app/xxx.xxx.xxxx-mJ0bOyvMhmH6-JgAp-5CDw==/lib/x86/libmupdf.so
    2019-02-18 19:07:15.445 20728-20728/? A/DEBUG:     #01 pc 001454ba  /data/app/xxx.xxx.xxxx-mJ0bOyvMhmH6-JgAp-5CDw==/lib/x86/libmupdf.so (pdf_process_contents+490)
    2019-02-18 19:07:15.445 20728-20728/? A/DEBUG:     #02 pc 000e024d  /data/app/xxx.xxx.xxxx-mJ0bOyvMhmH6-JgAp-5CDw==/lib/x86/libmupdf.so
    2019-02-18 19:07:15.445 20728-20728/? A/DEBUG:     #03 pc 000e0545  /data/app/xxx.xxx.xxxx-mJ0bOyvMhmH6-JgAp-5CDw==/lib/x86/libmupdf.so (pdf_run_page_contents+261)
    2019-02-18 19:07:15.445 20728-20728/? A/DEBUG:     #04 pc 00046d1d  /data/app/xxx.xxx.xxxx-mJ0bOyvMhmH6-JgAp-5CDw==/lib/x86/libmupdf.so (fz_run_page_contents+173)
    2019-02-18 19:07:15.445 20728-20728/? A/DEBUG:     #05 pc 00038487  /data/app/xxx.xxx.xxxx-mJ0bOyvMhmH6-JgAp-5CDw==/lib/x86/libmupdf.so (Java_com_artifex_mupdfdemo_MuPDFCore_drawPage+2087)
    2019-02-18 19:07:15.445 20728-20728/? A/DEBUG:     #06 pc 0002736f  /data/app/xxx.xxx.xxxx-mJ0bOyvMhmH6-JgAp-5CDw==/oat/x86/base.odex (offset 0x27000)
    2019-02-18 19:07:15.446 20728-20728/? A/DEBUG:     #07 pc 007861ff  [anon:libc_malloc:86c80000]
    2019-02-18 19:07:15.446 20728-20728/? A/DEBUG:     #08 pc 000c005f  /dev/ashmem/dalvik-main space (region space) (deleted) (offset 0xc0000)
    2019-02-18 19:07:15.446 20728-20728/? A/DEBUG:     #09 pc 484bdbbb  <unknown>
    2019-02-18 19:07:16.680 1513-1513/? E//system/bin/tombstoned: Tombstone written to: /data/tombstones/tombstone_07

我不知道有什么问题,请帮忙。

4

0 回答 0