Coder Social home page Coder Social logo

Thread safety issue about android-pdfview HOT 3 OPEN

JoanZapata avatar JoanZapata commented on June 2, 2024
Thread safety issue

from android-pdfview.

Comments (3)

Kresshy avatar Kresshy commented on June 2, 2024

Hi,

I have a similar problem. After the pdf loaded and seems to be fully rendered (while or after the rendering) the application crashes.

java.lang.RuntimeException: An error occured while executing doInBackground()
        at android.os.AsyncTask$3.done(AsyncTask.java:304)
        at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:355)
        at java.util.concurrent.FutureTask.setException(FutureTask.java:222)
        at java.util.concurrent.FutureTask.run(FutureTask.java:242)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
        at java.lang.Thread.run(Thread.java:818)
 Caused by: java.lang.RuntimeException: error loading page
        at org.vudroid.pdfdroid.codec.PdfPage.open(Native Method)
        at org.vudroid.pdfdroid.codec.PdfPage.createPage(PdfPage.java:55)
        at org.vudroid.pdfdroid.codec.PdfDocument.getPage(PdfDocument.java:18)
        at org.vudroid.core.DecodeServiceBase.getPage(DecodeServiceBase.java:175)
        at com.joanzapata.pdfview.RenderingAsyncTask.proceed(RenderingAsyncTask.java:100)
        at com.joanzapata.pdfview.RenderingAsyncTask.doInBackground(RenderingAsyncTask.java:63)
        at com.joanzapata.pdfview.RenderingAsyncTask.doInBackground(RenderingAsyncTask.java:33)
        at android.os.AsyncTask$2.call(AsyncTask.java:292)
        at java.util.concurrent.FutureTask.run(FutureTask.java:237)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
        at java.lang.Thread.run(Thread.java:818)

This happens only for a few pdf files. I can send you these to reproduce the issue if you wish.

from android-pdfview.

JoanZapata avatar JoanZapata commented on June 2, 2024

This error comes from the underlying library so there's no way I can fix it.
An issue is currently opened to at least be able to catch those exceptions. See #29

from android-pdfview.

Kresshy avatar Kresshy commented on June 2, 2024

Thanks for the answer :)

from android-pdfview.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.