Signin/Signup with: 
Welcome, Guest
Username: Password: Remember me
Questions about Android development and PDF
  • Page:
  • 1

TOPIC:

Frequent crashes when viewing PDFs in Android 9 years 6 months ago #7246

  • simtan
  • simtan's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 2
  • Thank you received: 0
We're using your PDF library (3.9.11) and are experiencing fairly frequent crashes. These crashes are not reproducible for a given PDF, but happen randomly. They are all seg faults at the C layer. We don't have your sources for the c-level files, but here's the info we were able to get from a disassemble:

0x0007d34f:Java_com_radaee_pdf_BMDatabase_recItemInsert + 0x5779f
0x000205a9: Java_com_radaee_pdf_Page_close + 0x0011

We've seen those same methods in our stack traces before.

Do you have any remediation for these crashes? Your "attach" feature isn't working for me, so I've pasted the crash log below.

I/am_destroy_activity( 576): [0,520687717,46,com.box.android/.activities.FilePreviewActivity,finish-imm]
I/sf_frame_dur( 190): [com.box.android/com.box.android.activities.FilePreviewActivity,0,1,0,1,0,0,1]
F/libc (20246): Fatal signal 11 (SIGSEGV), code 1, fault addr 0x108 in tid 20918 (Thread-1652)
I/DEBUG ( 6444): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
I/DEBUG ( 6444): Build fingerprint: 'google/razor/flo:L/LPV79/1236599:user/release-keys'
I/DEBUG ( 6444): Revision: '0'
I/DEBUG ( 6444): pid: 20246, tid: 20918, name: Thread-1652 >>> com.box.android <<<
I/DEBUG ( 6444): signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x108
I/DEBUG ( 6444): r0 b8306080 r1 b8306080 r2 00000001 r3 00000109
I/DEBUG ( 6444): r4 b847bb18 r5 78701ee0 r6 b847bb18 r7 74ed1200
I/DEBUG ( 6444): r8 78701ee0 r9 b8385188 sl 787dd1f0 fp 00000038
I/DEBUG ( 6444): ip 5e21df10 sp 5cdc39d8 lr 5e112351 pc 00000108 cpsr a0010030
I/DEBUG ( 6444): d0 ffffffff00000038 d1 ffffffffffffffff
I/DEBUG ( 6444): d2 ffffffffffffffff d3 ffffffffffffffff
I/DEBUG ( 6444): d4 0000000000000000 d5 0000000000000000
I/DEBUG ( 6444): d6 0000000000000000 d7 4f60000000000000
I/DEBUG ( 6444): d8 3d91d7aabd91d7aa d9 4260000000000000
I/DEBUG ( 6444): d10 0000000000000000 d11 0000000000000000
I/DEBUG ( 6444): d12 0000000000000000 d13 0000000000000000
I/DEBUG ( 6444): d14 0000000000000000 d15 0000000000000000
I/DEBUG ( 6444): d16 5cdc394800000000 d17 0000276700000000
I/DEBUG ( 6444): d18 000000000055d70e d19 3ff0000000000000
I/DEBUG ( 6444): d20 c043800000000000 d21 c058000000000000
I/DEBUG ( 6444): d22 0000000000000000 d23 c043800000000000
I/DEBUG ( 6444): d24 0000000000000000 d25 0000000000000000
I/DEBUG ( 6444): d26 3ff0000000000000 d27 0000000000000000
I/DEBUG ( 6444): d28 3ff0000000000000 d29 0000000000000000
I/DEBUG ( 6444): d30 0000000000000000 d31 c058000000000000
I/DEBUG ( 6444): scr 80000013
I/DEBUG ( 6444):
I/DEBUG ( 6444): backtrace:
I/DEBUG ( 6444): #00 pc 00000108 <unknown>
I/DEBUG ( 6444): #01 pc 0007d34f /data/app-lib/com.box.android-2/librdpdf.so
I/DEBUG ( 6444): #02 pc 000205a9 /data/app-lib/com.box.android-2/librdpdf.so (Java_com_radaee_pdf_Page_close+16)
I/DEBUG ( 6444): #03 pc 0021b708 /data/dalvik-cache/arm/data@app@com.box.android-2.apk@classes.dex
I/DEBUG ( 6444):
I/DEBUG ( 6444): stack:
I/DEBUG ( 6444): 5cdc3998 78701ee0 /dev/ashmem/dalvik-main space (deleted)
I/DEBUG ( 6444): 5cdc399c b6f47899 /system/lib/libc.so (dlfree+52)
I/DEBUG ( 6444): 5cdc39a0 00000000
I/DEBUG ( 6444): 5cdc39a4 b8306080 [heap]
I/DEBUG ( 6444): 5cdc39a8 b83f5598 [heap]
I/DEBUG ( 6444): 5cdc39ac b847bb18 [heap]
I/DEBUG ( 6444): 5cdc39b0 74ed1200 /dev/ashmem/dalvik-alloc space (deleted)
I/DEBUG ( 6444): 5cdc39b4 78701ee0 /dev/ashmem/dalvik-main space (deleted)
I/DEBUG ( 6444): 5cdc39b8 b8385188 [heap]
I/DEBUG ( 6444): 5cdc39bc 5e110c57 /data/app-lib/com.box.android-2/librdpdf.so
I/DEBUG ( 6444): 5cdc39c0 b83d80c8 [heap]
I/DEBUG ( 6444): 5cdc39c4 b8306080 [heap]
I/DEBUG ( 6444): 5cdc39c8 b847bb18 [heap]
I/DEBUG ( 6444): 5cdc39cc 78701ee0 /dev/ashmem/dalvik-main space (deleted)
I/DEBUG ( 6444): 5cdc39d0 b847bb18 [heap]
I/DEBUG ( 6444): 5cdc39d4 74ed1200 /dev/ashmem/dalvik-alloc space (deleted)
I/DEBUG ( 6444): #00 5cdc39d8 00000000
I/DEBUG ( 6444): ........ ........
I/DEBUG ( 6444): #01 5cdc39d8 00000000
I/DEBUG ( 6444): 5cdc39dc 5e0b55ad /data/app-lib/com.box.android-2/librdpdf.so (Java_com_radaee_pdf_Page_close+20)
I/DEBUG ( 6444): #02 5cdc39e0 0000029d
I/DEBUG ( 6444): 5cdc39e4 9c5e470c /data/dalvik-cache/arm/data@app@com.box.android-2.apk@classes.dex

Please Log in or Create an account to join the conversation.

Frequent crashes when viewing PDFs in Android 9 years 6 months ago #7248

  • radaee
  • radaee's Avatar
  • Offline
  • Moderator
  • Moderator
  • Posts: 1123
  • Thank you received: 73
do not invoke Page.Close after Document.Close();
you shall close all page objects first, then close document object

Please Log in or Create an account to join the conversation.

Frequent crashes when viewing PDFs in Android 9 years 6 months ago #7262

  • simtan
  • simtan's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 2
  • Thank you received: 0
Thanks for your prompt response. In that case, when is it safe for us to call Document.Close()? Page.Close() is called asynchronously on the pages via a thread in Android PDF, so how do we know when all pages have been closed?

Please Log in or Create an account to join the conversation.

Frequent crashes when viewing PDFs in Android 9 years 6 months ago #7264

  • radaee
  • radaee's Avatar
  • Offline
  • Moderator
  • Moderator
  • Posts: 1123
  • Thank you received: 73
wait thread end, which the thread close pages.
and then close document object.

Please Log in or Create an account to join the conversation.

  • Page:
  • 1
Powered by Kunena Forum