AndroidPdfViewer icon indicating copy to clipboard operation
AndroidPdfViewer copied to clipboard

When i scroll pdf, the app sometimes ANR

Open RoyXing opened this issue 9 years ago • 3 comments

When i scroll pdf, the app sometimes will ANR and then it may be restart by system, but restart abnormal, don't launch welcome page, so some i init in welcome page doesn't executed,it makes my app doesn't work well.

it's error log: Fatal signal 6 (SIGABRT), code -6 in tid 5311 (PDF renderer)

RoyXing avatar Apr 25 '17 05:04 RoyXing

Post some code...

1stmetro avatar Apr 25 '17 05:04 1stmetro

@1stmetro File pdf = new File(pdfUrl); pdfView.fromUri(Uri.fromFile(pdf)) .defaultPage(lastPageIndex) .onPageChange(this) .enableSwipe(true) .swipeHorizontal(false) .enableAnnotationRendering(true) .onLoad(this) .enableAntialiasing(true) .scrollHandle(new DefaultScrollHandle(getMbContext())) .load(); the error log only have this: `A/libc: Fatal signal 6 (SIGABRT), code -6 in tid 8647 (PDF renderer)

                                               [ 04-25 13:29:40.393   599:  599 W/         ]
                                               debuggerd: handling request: pid=4429 uid=10243 gid=10243 tid=8647`

RoyXing avatar Apr 25 '17 05:04 RoyXing

First off start with default page and test with page 0 don't think that's the issue but need to rule out not sending a -1 or null, remake out your scroll handler don't have my pc loaded to check the scroll handle code right now.

Everything else is basic, you could always double check the file is valid before opening to rule out file issues, catch errors etc,

1stmetro avatar Apr 25 '17 06:04 1stmetro