Signin/Signup with: 
Welcome, Guest
Username: Password: Remember me
Here you should submit your bug reports with logcat.

TOPIC:

FAult Adress with renderToBmp 11 years 3 months ago #1066

  • Chumper
  • Chumper's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 18
  • Thank you received: 0
THe situation:

I create Thumbnails of PDFs in multiple Asynctasks.
I present the PDFs in a Gridview inside a Scrollview.
I render only the PDFs that are currently visible( using the getView function)
That means, that i have to cancel the tasks, if a view is not visible anymore on the SCrenn (recycled or whatever)
To do this i cancel the asynctask but i check "ifCanceled()" during the operations.
If i fling through the list i am spawning new Tasks and cancel them acordingly.

Sometimes if i fling through the list i get a fatal error indicating, that the renderToBmp() function is using a fault adress (so i guess it is accessing memory that is already freed).
This only happens with directories with ca 500 files (as i have tested so far) and excessive scrolling.

I cant catch the error, because it is only one command: renderToBmp

If you need a Video or the code, let me know, i tried everything but i assume the following:

"The task is spawned and working
rendertobmp is called,
the task is canceled
Because the is no reference anymore to the task, the system gc.
the bitmap is freed and rendertoBmp is calling a fault address.
"

Do you have any idea to avoid this?

The Log is as follows:
01-06 19:28:03.488: I/DEBUG(1829): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
01-06 19:28:03.488: I/DEBUG(1829): Build fingerprint: 'samsung/p4notewifixx/p4notewifiww:4.1.1/JRO03C/N8010XXBLK9:user/release-keys'
01-06 19:28:03.488: I/DEBUG(1829): pid: 13488, tid: 13626, name: AsyncTask #2  >>> com.radaee.reader <<<
01-06 19:28:03.488: I/DEBUG(1829): signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 00000018
01-06 19:28:03.598: I/DEBUG(1829):     r0 00000000  r1 5f03d8ac  r2 dfc95393  r3 dfc95393
01-06 19:28:03.598: I/DEBUG(1829):     r4 5f03d8a8  r5 5d30c088  r6 5f128c10  r7 00000000
01-06 19:28:03.598: I/DEBUG(1829):     r8 00000178  r9 5f4f15c0  sl 00000000  fp 5ef0e9b8
01-06 19:28:03.598: I/DEBUG(1829):     ip 00746365  sp 5ef0e900  lr 5d25839d  pc 5d28c246  cpsr 08000030
01-06 19:28:03.598: I/DEBUG(1829):     d0  3e5b2aec44524000  d1  ffffffff43340000
01-06 19:28:03.598: I/DEBUG(1829):     d2  ffffffffffffffff  d3  ffffffffffffffff
01-06 19:28:03.598: I/DEBUG(1829):     d4  0000000000000000  d5  0000000000000000
01-06 19:28:03.598: I/DEBUG(1829):     d6  0000014e0000014e  d7  4d34000047a46e80
01-06 19:28:03.598: I/DEBUG(1829):     d8  3ebd4f993e5b2aec  d9  0000000000000000
01-06 19:28:03.598: I/DEBUG(1829):     d10 0000000000000000  d11 0000000000000000
01-06 19:28:03.598: I/DEBUG(1829):     d12 0000000000000000  d13 0000000000000000
01-06 19:28:03.598: I/DEBUG(1829):     d14 0000000000000000  d15 0000000000000000
01-06 19:28:03.598: I/DEBUG(1829):     d16 0000000000025328  d17 0000000000000001
01-06 19:28:03.598: I/DEBUG(1829):     d18 0000000000025329  d19 7fffffffffffffff
01-06 19:28:03.598: I/DEBUG(1829):     d20 0000000000000000  d21 0000000000000000
01-06 19:28:03.598: I/DEBUG(1829):     d22 0000000000000000  d23 0000000000000000
01-06 19:28:03.598: I/DEBUG(1829):     d24 0000000000000000  d25 0000000000000000
01-06 19:28:03.598: I/DEBUG(1829):     d26 0000000000000000  d27 fffffff8fffffff8
01-06 19:28:03.598: I/DEBUG(1829):     d28 0000000000000000  d29 0000000000000000
01-06 19:28:03.598: I/DEBUG(1829):     d30 000000b5000000b5  d31 0000006200000062
01-06 19:28:03.598: I/DEBUG(1829):     scr 88000011
01-06 19:28:03.603: I/DEBUG(1829): backtrace:
01-06 19:28:03.603: I/DEBUG(1829):     #00  pc 000e4246  /data/data/com.radaee.reader/lib/librdpdf.so
01-06 19:28:03.603: I/DEBUG(1829):     #01  pc 000b0399  /data/data/com.radaee.reader/lib/librdpdf.so
01-06 19:28:03.603: I/DEBUG(1829):     #02  pc 000ae1a9  /data/data/com.radaee.reader/lib/librdpdf.so
01-06 19:28:03.603: I/DEBUG(1829):     #03  pc 00081477  /data/data/com.radaee.reader/lib/librdpdf.so
01-06 19:28:03.603: I/DEBUG(1829):     #04  pc 000422df  /data/data/com.radaee.reader/lib/librdpdf.so
01-06 19:28:03.603: I/DEBUG(1829):     #05  pc 00021def  /data/data/com.radaee.reader/lib/librdpdf.so (Java_com_radaee_pdf_Page_renderToBmp+422)
01-06 19:28:03.603: I/DEBUG(1829):     #06  pc 0001df30  /system/lib/libdvm.so (dvmPlatformInvoke+112)
01-06 19:28:03.603: I/DEBUG(1829):     #07  pc 0004d183  /system/lib/libdvm.so (dvmCallJNIMethod(unsigned int const*, JValue*, Method const*, Thread*)+394)
01-06 19:28:03.603: I/DEBUG(1829):     #08  pc 00027360  /system/lib/libdvm.so
01-06 19:28:03.603: I/DEBUG(1829):     #09  pc 0002bc68  /system/lib/libdvm.so (dvmInterpret(Thread*, Method const*, JValue*)+180)
01-06 19:28:03.603: I/DEBUG(1829):     #10  pc 0005f8f1  /system/lib/libdvm.so (dvmCallMethodV(Thread*, Method const*, Object*, bool, JValue*, std::__va_list)+272)
01-06 19:28:03.603: I/DEBUG(1829):     #11  pc 0005f91b  /system/lib/libdvm.so (dvmCallMethod(Thread*, Method const*, Object*, JValue*, ...)+20)
01-06 19:28:03.603: I/DEBUG(1829):     #12  pc 000544d3  /system/lib/libdvm.so
01-06 19:28:03.603: I/DEBUG(1829):     #13  pc 00012e00  /system/lib/libc.so (__thread_entry+48)
01-06 19:28:03.603: I/DEBUG(1829):     #14  pc 00012558  /system/lib/libc.so (pthread_create+172)
01-06 19:28:03.603: I/DEBUG(1829): stack:
01-06 19:28:03.603: I/DEBUG(1829):          5ef0e8c0  00000000  
01-06 19:28:03.608: I/DEBUG(1829):          5ef0e8c4  00000000  
01-06 19:28:03.608: I/DEBUG(1829):          5ef0e8c8  00000000  
01-06 19:28:03.608: I/DEBUG(1829):          5ef0e8cc  9aa509ff  
01-06 19:28:03.608: I/DEBUG(1829):          5ef0e8d0  00000000  
01-06 19:28:03.608: I/DEBUG(1829):          5ef0e8d4  00000000  
01-06 19:28:03.608: I/DEBUG(1829):          5ef0e8d8  2faefa51  
01-06 19:28:03.608: I/DEBUG(1829):          5ef0e8dc  c88e0f85  
01-06 19:28:03.608: I/DEBUG(1829):          5ef0e8e0  c1ef6a31  
01-06 19:28:03.608: I/DEBUG(1829):          5ef0e8e4  dfc95393  
01-06 19:28:03.608: I/DEBUG(1829):          5ef0e8e8  b42173d5  
01-06 19:28:03.608: I/DEBUG(1829):          5ef0e8ec  5f03d8a8  
01-06 19:28:03.608: I/DEBUG(1829):          5ef0e8f0  5d30c088  /data/data/com.radaee.reader/lib/librdpdf.so
01-06 19:28:03.608: I/DEBUG(1829):          5ef0e8f4  5f128c10  
01-06 19:28:03.608: I/DEBUG(1829):          5ef0e8f8  df0027ad  
01-06 19:28:03.608: I/DEBUG(1829):          5ef0e8fc  00000000  
01-06 19:28:03.608: I/DEBUG(1829):     #00  5ef0e900  5f03d8a8  
01-06 19:28:03.608: I/DEBUG(1829):          5ef0e904  5d30c088  /data/data/com.radaee.reader/lib/librdpdf.so
01-06 19:28:03.608: I/DEBUG(1829):          5ef0e908  5f128c10  
01-06 19:28:03.608: I/DEBUG(1829):          5ef0e90c  5d25839d  /data/data/com.radaee.reader/lib/librdpdf.so
01-06 19:28:03.608: I/DEBUG(1829):     #01  5ef0e910  02399a18  
01-06 19:28:03.608: I/DEBUG(1829):          5ef0e914  f322a299  
01-06 19:28:03.608: I/DEBUG(1829):          5ef0e918  c0000000  
01-06 19:28:03.608: I/DEBUG(1829):          5ef0e91c  00000007  
01-06 19:28:03.608: I/DEBUG(1829):          5ef0e920  00000000  
01-06 19:28:03.608: I/DEBUG(1829):          5ef0e924  5f042d48  
01-06 19:28:03.608: I/DEBUG(1829):          5ef0e928  5f0f2070  
01-06 19:28:03.608: I/DEBUG(1829):          5ef0e92c  400e04ab  /system/lib/libc.so (dlmalloc+5326)
01-06 19:28:03.608: I/DEBUG(1829):          5ef0e930  54203200  /dev/ashmem/dalvik-mark-stack (deleted)
01-06 19:28:03.608: I/DEBUG(1829):          5ef0e934  285b206d  
01-06 19:28:03.608: I/DEBUG(1829):          5ef0e938  545d2945  /dev/ashmem/dalvik-mark-stack (deleted)
01-06 19:28:03.608: I/DEBUG(1829):          5ef0e93c  2e30204a  
01-06 19:28:03.608: I/DEBUG(1829):          5ef0e940  20333839  
01-06 19:28:03.608: I/DEBUG(1829):          5ef0e944  5f042d48  
01-06 19:28:03.608: I/DEBUG(1829):          5ef0e948  c0000000  
01-06 19:28:03.608: I/DEBUG(1829):          5ef0e94c  000000b8  
01-06 19:28:03.608: I/DEBUG(1829):          ........  ........
01-06 19:28:03.608: I/DEBUG(1829):     #02  5ef0e9a8  00000000  
01-06 19:28:03.608: I/DEBUG(1829):          5ef0e9ac  5f128c10  
01-06 19:28:03.608: I/DEBUG(1829):          5ef0e9b0  00000005  
01-06 19:28:03.608: I/DEBUG(1829):          5ef0e9b4  00000001  
01-06 19:28:03.608: I/DEBUG(1829):          5ef0e9b8  00000005  
01-06 19:28:03.608: I/DEBUG(1829):          5ef0e9bc  400e04ab  /system/lib/libc.so (dlmalloc+5326)
01-06 19:28:03.608: I/DEBUG(1829):          5ef0e9c0  5f13ab00  
01-06 19:28:03.608: I/DEBUG(1829):          5ef0e9c4  00000000  
01-06 19:28:03.608: I/DEBUG(1829):          5ef0e9c8  00000007  
01-06 19:28:03.608: I/DEBUG(1829):          5ef0e9cc  00000000  
01-06 19:28:03.608: I/DEBUG(1829):          5ef0e9d0  5f128c10  
01-06 19:28:03.608: I/DEBUG(1829):          5ef0e9d4  00000000  
01-06 19:28:03.608: I/DEBUG(1829):          5ef0e9d8  5f4a92d0  
01-06 19:28:03.608: I/DEBUG(1829):          5ef0e9dc  dfc95393  
01-06 19:28:03.608: I/DEBUG(1829):          5ef0e9e0  5f2a8768  
01-06 19:28:03.608: I/DEBUG(1829):          5ef0e9e4  5ee01b98  
01-06 19:28:03.608: I/DEBUG(1829):          ........  ........
01-06 19:28:03.613: I/DEBUG(1829): memory near r1:
01-06 19:28:03.613: I/DEBUG(1829):     5f03d88c 00000000 00000000 00000000 3f800000  ...............?
01-06 19:28:03.613: I/DEBUG(1829):     5f03d89c 00000010 676e654c 000000c3 5d30b4f0  ....Leng......0]
01-06 19:28:03.613: I/DEBUG(1829):     5f03d8ac 0000020d 00000000 00000000 090ba1c1  ................
01-06 19:28:03.613: I/DEBUG(1829):     5f03d8bc 00000000 297cf5bd 00000000 1f266a7c  ......|)....|j&.
01-06 19:28:03.613: I/DEBUG(1829):     5f03d8cc 00000000 2ebe9b9e 00000000 00000014  ................
01-06 19:28:03.613: I/DEBUG(1829): memory near r4:
01-06 19:28:03.613: I/DEBUG(1829):     5f03d888 3f800000 00000000 00000000 00000000  ...?............
01-06 19:28:03.613: I/DEBUG(1829):     5f03d898 3f800000 00000010 676e654c 000000c3  ...?....Leng....
01-06 19:28:03.613: I/DEBUG(1829):     5f03d8a8 5d30b4f0 0000020d 00000000 00000000  ..0]............
01-06 19:28:03.613: I/DEBUG(1829):     5f03d8b8 090ba1c1 00000000 297cf5bd 00000000  ..........|)....
01-06 19:28:03.613: I/DEBUG(1829):     5f03d8c8 1f266a7c 00000000 2ebe9b9e 00000000  |j&.............
01-06 19:28:03.613: I/DEBUG(1829): memory near r5:
01-06 19:28:03.613: I/DEBUG(1829):     5d30c068 00000000 00000000 00000000 00000000  ................
01-06 19:28:03.613: I/DEBUG(1829):     5d30c078 00000000 00000000 00000000 00000000  ................
01-06 19:28:03.613: I/DEBUG(1829):     5d30c088 00163f98 00000000 00000000 401293e8  .?.............@
01-06 19:28:03.613: I/DEBUG(1829):     5d30c098 400e1f9d 4011c8f9 400e4961 400e6c7d  ...@...@aI.@}l.@
01-06 19:28:03.613: I/DEBUG(1829):     5d30c0a8 4012d138 4011c907 400d919c 4012f7c0  8..@...@...@...@
01-06 19:28:03.613: I/DEBUG(1829): memory near r6:
01-06 19:28:03.613: I/DEBUG(1829):     5f128bf0 00000000 0000001b 00000001 00000001  ................
01-06 19:28:03.613: I/DEBUG(1829):     5f128c00 5f0efe20 00000000 00000018 00000013   .._............
01-06 19:28:03.613: I/DEBUG(1829):     5f128c10 5f042d28 00000007 00000008 00000033  (-._........3...
01-06 19:28:03.613: I/DEBUG(1829):     5f128c20 00000001 00000016 00000067 00000012  ........g.......
01-06 19:28:03.613: I/DEBUG(1829):     5f128c30 0058004f 004f0044 0045004c 00110056  O.X.D.O.L.E.V...
01-06 19:28:03.613: I/DEBUG(1829): memory near r9:
01-06 19:28:03.613: I/DEBUG(1829):     5f4f15a0 00000000 fff80000 00000000 fff80000  ................
01-06 19:28:03.613: I/DEBUG(1829):     5f4f15b0 00000000 00000000 00000000 00000000  ................
01-06 19:28:03.613: I/DEBUG(1829):     5f4f15c0 00000000 00000000 00000000 5f1311e8  ..............._
01-06 19:28:03.613: I/DEBUG(1829):     5f4f15d0 00000000 00000000 00000000 5f1311e8  ..............._
01-06 19:28:03.613: I/DEBUG(1829):     5f4f15e0 00000000 00000000 00000000 5f1311e8  ..............._
01-06 19:28:03.613: I/DEBUG(1829): memory near fp:
01-06 19:28:03.613: I/DEBUG(1829):     5ef0e998 5f4f15c0 00000000 5ef0e9b8 5d2561ab  ..O_.......^.a%]
01-06 19:28:03.613: I/DEBUG(1829):     5ef0e9a8 00000000 5f128c10 00000005 00000001  ......._........
01-06 19:28:03.613: I/DEBUG(1829):     5ef0e9b8 00000005 400e04ab 5f13ab00 00000000  .......@..._....
01-06 19:28:03.613: I/DEBUG(1829):     5ef0e9c8 00000007 00000000 5f128c10 00000000  ..........._....
01-06 19:28:03.613: I/DEBUG(1829):     5ef0e9d8 5f4a92d0 dfc95393 5f2a8768 5ee01b98  ..J_.S..h.*_...^
01-06 19:28:03.613: I/DEBUG(1829): memory near ip:
01-06 19:28:03.613: I/DEBUG(1829):     00746344 ffffffff ffffffff ffffffff ffffffff  ................
01-06 19:28:03.613: I/DEBUG(1829):     00746354 ffffffff ffffffff ffffffff ffffffff  ................
01-06 19:28:03.613: I/DEBUG(1829):     00746364 ffffffff ffffffff ffffffff ffffffff  ................
01-06 19:28:03.613: I/DEBUG(1829):     00746374 ffffffff ffffffff ffffffff ffffffff  ................
01-06 19:28:03.613: I/DEBUG(1829):     00746384 ffffffff ffffffff ffffffff ffffffff  ................
01-06 19:28:03.613: I/DEBUG(1829): memory near sp:
01-06 19:28:03.613: I/DEBUG(1829):     5ef0e8e0 c1ef6a31 dfc95393 b42173d5 5f03d8a8  1j...S...s!...._
01-06 19:28:03.613: I/DEBUG(1829):     5ef0e8f0 5d30c088 5f128c10 df0027ad 00000000  ..0]..._.'......
01-06 19:28:03.613: I/DEBUG(1829):     5ef0e900 5f03d8a8 5d30c088 5f128c10 5d25839d  ..._..0]..._..%]
01-06 19:28:03.613: I/DEBUG(1829):     5ef0e910 02399a18 f322a299 c0000000 00000007  ..9...".........
01-06 19:28:03.613: I/DEBUG(1829):     5ef0e920 00000000 5f042d48 5f0f2070 400e04ab  ....H-._p ._...@
01-06 19:28:03.613: I/DEBUG(1829): code around pc:
01-06 19:28:03.613: I/DEBUG(1829):     5d28c224 60036183 60836043 477060c3 61c32300  .a.`C`.`.`pG.#.a
01-06 19:28:03.613: I/DEBUG(1829):     5d28c234 61436103 60036183 60836043 477060c3  .aCa.a.`C`.`.`pG
01-06 19:28:03.613: I/DEBUG(1829):     5d28c244 6986b570 460d6944 0686eb04 d20942b4  p..iDi.F.....B..
01-06 19:28:03.613: I/DEBUG(1829):     5d28c254 0b04f854 4629b120 ff84f7ff bd70b100  T... .)F......p.
01-06 19:28:03.618: I/DEBUG(1829):     5d28c264 d8f542a6 e7fa2000 69c4b570 b13c4605  .B... ..p..i.F<.
01-06 19:28:03.618: I/DEBUG(1829): code around lr:
01-06 19:28:03.618: I/DEBUG(1829):     5d25837c b09d447d 46174604 3008f855 681b4689  }D...F.FU..0.F.h
01-06 19:28:03.618: I/DEBUG(1829):     5d25838c 4633931b fa2af7fe 46381d21 ff54f033  ..3F..*.!.8F3.T.
01-06 19:28:03.618: I/DEBUG(1829):     5d25839c 00b4f8c4 f8c0b108 49994080 44794630  .........@.I0FyD
01-06 19:28:03.618: I/DEBUG(1829):     5d2583ac f832f7ce b1d84601 f7fb4648 4607fb3f  ..2..F..HF..?..F
01-06 19:28:03.618: I/DEBUG(1829):     5d2583bc 00b0f8c4 f0002f00 49928091 44794630  ...../.....I0FyD

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

FAult Adress with renderToBmp 11 years 3 months ago #1067

  • radaee
  • radaee's Avatar
  • Offline
  • Moderator
  • Moderator
  • Posts: 1123
  • Thank you received: 73
do you check is there memory leaks?
for example: invoke Page.close and Document.close after rendered.

i think the codes are more complex that you said here.
so, may you send me some java codes?
my mail: This email address is being protected from spambots. You need JavaScript enabled to view it.

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

FAult Adress with renderToBmp 11 years 3 months ago #1068

  • radaee
  • radaee's Avatar
  • Offline
  • Moderator
  • Moderator
  • Posts: 1123
  • Thank you received: 73
some documents need password to open.
so, do u check return value form Document.open?

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

Last edit: by .

FAult Adress with renderToBmp 11 years 3 months ago #1069

  • Chumper
  • Chumper's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 18
  • Thank you received: 0
Yes, i check the return value if the PDF opens fine, i also close the Page and the PDF afterwards.
I will prepare a working example and come back to you. Thanks.

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

FAult Adress with renderToBmp 11 years 3 months ago #1070

  • radaee
  • radaee's Avatar
  • Offline
  • Moderator
  • Moderator
  • Posts: 1123
  • Thank you received: 73
OK, you can test grid class(our implement) by:
www.radaee.com/files/PDFGrid.rar

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

Last edit: by .

FAult Adress with renderToBmp 11 years 3 months ago #1071

  • radaee
  • radaee's Avatar
  • Offline
  • Moderator
  • Moderator
  • Posts: 1123
  • Thank you received: 73
i updated codes on that link(some bugs in UI)
you may need download it again.
are you testing?

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

Last edit: by .
Powered by Kunena Forum