0

I am working on an app (pdf viewer) using muPdf library , it's working fine for Android 7 (pdf pages and previews are shown without problems) , but it keeps crashing when i test it on emulator or real device with Android 8.

            2019-01-22 09:57:58.178 13878-13980/com.niveales.wind A/libc: Fatal signal 11 (SIGSEGV), code 2, fault addr 0xa5353a50 in tid 13980 (AsyncTask #5), pid 13878 (m.niveales.wind)
            2019-01-22 09:57:58.418 13983-13983/? A/DEBUG: *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
            2019-01-22 09:57:58.421 13983-13983/? A/DEBUG: Build fingerprint: 'google/sdk_gphone_x86/generic_x86:8.1.0/OSM1.180201.007/4586646:user/release-keys'
            2019-01-22 09:57:58.421 13983-13983/? A/DEBUG: Revision: '0'
            2019-01-22 09:57:58.421 13983-13983/? A/DEBUG: ABI: 'x86'
            2019-01-22 09:57:58.421 13983-13983/? A/DEBUG: pid: 13878, tid: 13980, name: AsyncTask #5  >>> com.niveales.wind <<<
            2019-01-22 09:57:58.421 13983-13983/? A/DEBUG: signal 11 (SIGSEGV), code 2 (SEGV_ACCERR), fault addr 0xa5353a50
            2019-01-22 09:57:58.431 13983-13983/? A/DEBUG:     eax a5353a48  ebx 860c8df8  ecx 86757800  edx 00000000
            2019-01-22 09:57:58.431 13983-13983/? A/DEBUG:     esi 8815fcc0  edi 8707d174
            2019-01-22 09:57:58.431 13983-13983/? A/DEBUG:     xcs 00000073  xds 0000007b  xes 0000007b  xfs 0000003b  xss 0000007b
            2019-01-22 09:57:58.431 13983-13983/? A/DEBUG:     eip 84fc8b2a  ebp 8cd62d80  esp 8707cfb0  flags 00210286
            2019-01-22 09:57:58.441 13983-13983/? A/DEBUG: backtrace:
            2019-01-22 09:57:58.441 13983-13983/? A/DEBUG:     #00 pc 00144b2a  /data/app/com.niveales.wind-IMSbcpBie_mp0sPGfen-2A==/lib/x86/libmupdf.so
            2019-01-22 09:57:58.441 13983-13983/? A/DEBUG:     #01 pc 001454ba  /data/app/com.niveales.wind-IMSbcpBie_mp0sPGfen-2A==/lib/x86/libmupdf.so (pdf_process_contents+490)
            2019-01-22 09:57:58.441 13983-13983/? A/DEBUG:     #02 pc 000e024d  /data/app/com.niveales.wind-IMSbcpBie_mp0sPGfen-2A==/lib/x86/libmupdf.so
            2019-01-22 09:57:58.442 13983-13983/? A/DEBUG:     #03 pc 000e0545  /data/app/com.niveales.wind-IMSbcpBie_mp0sPGfen-2A==/lib/x86/libmupdf.so (pdf_run_page_contents+261)
            2019-01-22 09:57:58.442 13983-13983/? A/DEBUG:     #04 pc 00046d1d  /data/app/com.niveales.wind-IMSbcpBie_mp0sPGfen-2A==/lib/x86/libmupdf.so (fz_run_page_contents+173)
            2019-01-22 09:57:58.442 13983-13983/? A/DEBUG:     #05 pc 00038487  /data/app/com.niveales.wind-IMSbcpBie_mp0sPGfen-2A==/lib/x86/libmupdf.so (Java_com_artifex_mupdfdemo_MuPDFCore_drawPage+2087)
            2019-01-22 09:57:58.442 13983-13983/? A/DEBUG:     #06 pc 0002b36f  /data/app/com.niveales.wind-IMSbcpBie_mp0sPGfen-2A==/oat/x86/base.odex (offset 0x2b000)
            2019-01-22 09:57:58.442 13983-13983/? A/DEBUG:     #07 pc 0059cbff  [anon:libc_malloc:8a780000]
            2019-01-22 09:57:58.442 13983-13983/? A/DEBUG:     #08 pc 000415af  /dev/ashmem/dalvik-main space (region space) (deleted)
            2019-01-22 09:57:58.442 13983-13983/? A/DEBUG:     #09 pc 10000026  <unknown>
            2019-01-22 09:57:58.449 13983-13983/? A/DEBUG:     #10 pc 0fffffff  <unknown>
            2019-01-22 09:57:58.455 13983-13983/? A/DEBUG:     #11 pc 0c6fffff  /dev/ashmem/dalvik-main space (region space) (deleted) (offset 0xd00000)
            2019-01-22 09:57:59.286 1511-1511/? E//system/bin/tombstoned: Tombstone written to: /data/tombstones/tombstone_05

i am stuck with that since days , any idea how to fix that or a way to track where it comes from ?

Anass Boukalane
  • 539
  • 10
  • 26
  • Use `addr2line` or some other tool from the NDK to map the addresses in the stacktrace against line numbers in the (unstripped) version of libmupdf.so. Or if you reproduce the issue on a debug build you should get line numbers directly in the stack trace. – Michael Jan 23 '19 at 08:14
  • Thank you for your answer , but the problem is that i don't have the source code of the lib , i use jni to map java code to native lib , it's working on Android 7 , but crashes on Android 8 – Anass Boukalane Jan 23 '19 at 08:59
  • Then it sounds like you're out of luck, unless you can find a newer version of the library that works with all platforms. I would suggest compiling the library from source instead of using a prebuilt version. – Michael Jan 23 '19 at 09:07
  • @AnassBoukalane Did you find a solution for this issue? I am facing the same with MuPdf v1.11. What is the version of the mupdf that you are using? – Haider Jul 17 '19 at 07:23

0 Answers0