New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pdfView.fromFile(file) not working. my app goes crash. #49

Open
jitendra7020 opened this Issue Jul 2, 2014 · 14 comments

Comments

Projects
None yet
9 participants
@jitendra7020

jitendra7020 commented Jul 2, 2014

Hi i'm using your PDF viewer and my goes crash .Please help ASAP. Below is my application crash log.

07-02 08:44:44.202: E/AndroidRuntime(32162): java.lang.RuntimeException: error loading page
07-02 08:44:44.202: E/AndroidRuntime(32162): at org.vudroid.pdfdroid.codec.PdfPage.open(Native Method)
07-02 08:44:44.202: E/AndroidRuntime(32162): at org.vudroid.pdfdroid.codec.PdfPage.createPage(PdfPage.java:55)
07-02 08:44:44.202: E/AndroidRuntime(32162): at org.vudroid.pdfdroid.codec.PdfDocument.getPage(PdfDocument.java:18)
07-02 08:44:44.202: E/AndroidRuntime(32162): at org.vudroid.core.DecodeServiceBase.getPage(DecodeServiceBase.java:175)
07-02 08:44:44.202: E/AndroidRuntime(32162): at org.vudroid.core.DecodeServiceBase.getPageWidth(DecodeServiceBase.java:214)
07-02 08:44:44.202: E/AndroidRuntime(32162): at com.joanzapata.pdfview.PDFView.loadComplete(PDFView.java:626)
07-02 08:44:44.202: E/AndroidRuntime(32162): at com.joanzapata.pdfview.DecodingAsyncTask.onPostExecute(DecodingAsyncTask.java:58)
07-02 08:44:44.202: E/AndroidRuntime(32162): at com.joanzapata.pdfview.DecodingAsyncTask.onPostExecute(DecodingAsyncTask.java:1)

@vnh1991

This comment has been minimized.

Show comment
Hide comment
@vnh1991

vnh1991 Nov 18, 2014

Hi i implemented a sample eclipse project which reads file using fromFile()
you can find the same here
https://drive.google.com/file/d/0BwRMp8dK9LMLQmVhZkNMQ19WMUU/view?usp=sharing

vnh1991 commented Nov 18, 2014

Hi i implemented a sample eclipse project which reads file using fromFile()
you can find the same here
https://drive.google.com/file/d/0BwRMp8dK9LMLQmVhZkNMQ19WMUU/view?usp=sharing

@RoelRoel

This comment has been minimized.

Show comment
Hide comment
@RoelRoel

RoelRoel Feb 9, 2015

My app also crashes all the time at some PDF files (especially the ones created with Word 2010) with following strack trace:

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 org.vudroid.core.DecodeServiceBase.getPageWidth(DecodeServiceBase.java:214)
        at com.joanzapata.pdfview.PDFView.loadComplete(PDFView.java:626)
        at com.joanzapata.pdfview.DecodingAsyncTask.onPostExecute(DecodingAsyncTask.java:58)
        at com.joanzapata.pdfview.DecodingAsyncTask.onPostExecute(DecodingAsyncTask.java:31)
        at android.os.AsyncTask.finish(AsyncTask.java:631)
        at android.os.AsyncTask.access$600(AsyncTask.java:177)
        at android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:644)
        at android.os.Handler.dispatchMessage(Handler.java:99)
        at android.os.Looper.loop(Looper.java:153)
        at android.app.ActivityThread.main(ActivityThread.java:5299)
        at java.lang.reflect.Method.invokeNative(Native Method)
        at java.lang.reflect.Method.invoke(Method.java:511)
        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:833)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:600)
        at dalvik.system.NativeStart.main(Native Method)

Maybe this works?
https://code.google.com/p/vudroid/issues/detail?id=55#c1

It happens when I open a new PDF in the PDFview allready showing a PDF (not when inititally opening the PDF).

Another crash; probably with the same cause:

java.lang.RuntimeException: An error occured while executing doInBackground()
        at android.os.AsyncTask$3.done(AsyncTask.java:299)
        at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:352)
        at java.util.concurrent.FutureTask.setException(FutureTask.java:219)
        at java.util.concurrent.FutureTask.run(FutureTask.java:239)
        at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:230)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1080)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:573)
        at java.lang.Thread.run(Thread.java:838)
 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:287)
        at java.util.concurrent.FutureTask.run(FutureTask.java:234)

            at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:230)
            at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1080)
            at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:573)
            at java.lang.Thread.run(Thread.java:838)

RoelRoel commented Feb 9, 2015

My app also crashes all the time at some PDF files (especially the ones created with Word 2010) with following strack trace:

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 org.vudroid.core.DecodeServiceBase.getPageWidth(DecodeServiceBase.java:214)
        at com.joanzapata.pdfview.PDFView.loadComplete(PDFView.java:626)
        at com.joanzapata.pdfview.DecodingAsyncTask.onPostExecute(DecodingAsyncTask.java:58)
        at com.joanzapata.pdfview.DecodingAsyncTask.onPostExecute(DecodingAsyncTask.java:31)
        at android.os.AsyncTask.finish(AsyncTask.java:631)
        at android.os.AsyncTask.access$600(AsyncTask.java:177)
        at android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:644)
        at android.os.Handler.dispatchMessage(Handler.java:99)
        at android.os.Looper.loop(Looper.java:153)
        at android.app.ActivityThread.main(ActivityThread.java:5299)
        at java.lang.reflect.Method.invokeNative(Native Method)
        at java.lang.reflect.Method.invoke(Method.java:511)
        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:833)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:600)
        at dalvik.system.NativeStart.main(Native Method)

Maybe this works?
https://code.google.com/p/vudroid/issues/detail?id=55#c1

It happens when I open a new PDF in the PDFview allready showing a PDF (not when inititally opening the PDF).

Another crash; probably with the same cause:

java.lang.RuntimeException: An error occured while executing doInBackground()
        at android.os.AsyncTask$3.done(AsyncTask.java:299)
        at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:352)
        at java.util.concurrent.FutureTask.setException(FutureTask.java:219)
        at java.util.concurrent.FutureTask.run(FutureTask.java:239)
        at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:230)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1080)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:573)
        at java.lang.Thread.run(Thread.java:838)
 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:287)
        at java.util.concurrent.FutureTask.run(FutureTask.java:234)

            at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:230)
            at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1080)
            at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:573)
            at java.lang.Thread.run(Thread.java:838)

@RoelRoel

This comment has been minimized.

Show comment
Hide comment
@RoelRoel

RoelRoel Feb 10, 2015

I seemed to be only happening when you load a second PDF file at my project. It had nothing to do with the type of PDF.

I tried this work-around below and it seems to be working! 😄
Before I load a new PDF, I remove the existing PDFview from its parent and add it again.

I call this function before loading a new PDF:

/**
 * Hack because of a bug in PDFview; It crashes when you load a second PDF
 */
private void reinitPdfView(){
    ViewGroup group = (ViewGroup) mPdfView.getParent();
    group.removeView(mPdfView);
    mPdfView = null;
    mPdfView = new PDFView(this, null);
    mPdfView.setLayoutParams(new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT));
    group.addView(mPdfView);
}

RoelRoel commented Feb 10, 2015

I seemed to be only happening when you load a second PDF file at my project. It had nothing to do with the type of PDF.

I tried this work-around below and it seems to be working! 😄
Before I load a new PDF, I remove the existing PDFview from its parent and add it again.

I call this function before loading a new PDF:

/**
 * Hack because of a bug in PDFview; It crashes when you load a second PDF
 */
private void reinitPdfView(){
    ViewGroup group = (ViewGroup) mPdfView.getParent();
    group.removeView(mPdfView);
    mPdfView = null;
    mPdfView = new PDFView(this, null);
    mPdfView.setLayoutParams(new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT));
    group.addView(mPdfView);
}
@dharmakshetri

This comment has been minimized.

Show comment
Hide comment
@dharmakshetri

dharmakshetri Feb 12, 2015

I followed you sample code in your but could display any pdf file, just display out blank:

  public class PDFViewActivity extends Activity implements OnPageChangeListener {

public static final String SAMPLE_FILE = "sample.pdf";

public static final String ABOUT_FILE = "about.pdf";

PDFView pdfView;

String pdfName = SAMPLE_FILE;

Integer pageNumber = 1;

@Override
protected void onCreate(Bundle savedInstanceState) {
    // TODO Auto-generated method stub
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);
    pdfView= (PDFView) findViewById(R.id.pdfView);
}

void afterViews() {
    display(pdfName, false);
}

public void about() {
    if (!displaying(ABOUT_FILE))
        display(ABOUT_FILE, true);
}

private void display(String assetFileName, boolean jumpToFirstPage) {
    if (jumpToFirstPage) pageNumber = 1;
    setTitle(pdfName = assetFileName);

    pdfView.fromAsset(assetFileName)
    .defaultPage(1)
    .showMinimap(false)
    .enableSwipe(true)
    .onPageChange(this)
    .load();
}

@Override
public void onPageChanged(int page, int pageCount) {
    pageNumber = page;
    setTitle(format("%s %s / %s", pdfName, page, pageCount));
}

@Override
public void onBackPressed() {
    if (ABOUT_FILE.equals(pdfName)) {
        display(SAMPLE_FILE, true);
    } else {
        super.onBackPressed();
    }
}

private boolean displaying(String fileName) {
    return fileName.equals(pdfName);
}

}

Guys could you tell me, what is wrong with this code .

dharmakshetri commented Feb 12, 2015

I followed you sample code in your but could display any pdf file, just display out blank:

  public class PDFViewActivity extends Activity implements OnPageChangeListener {

public static final String SAMPLE_FILE = "sample.pdf";

public static final String ABOUT_FILE = "about.pdf";

PDFView pdfView;

String pdfName = SAMPLE_FILE;

Integer pageNumber = 1;

@Override
protected void onCreate(Bundle savedInstanceState) {
    // TODO Auto-generated method stub
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);
    pdfView= (PDFView) findViewById(R.id.pdfView);
}

void afterViews() {
    display(pdfName, false);
}

public void about() {
    if (!displaying(ABOUT_FILE))
        display(ABOUT_FILE, true);
}

private void display(String assetFileName, boolean jumpToFirstPage) {
    if (jumpToFirstPage) pageNumber = 1;
    setTitle(pdfName = assetFileName);

    pdfView.fromAsset(assetFileName)
    .defaultPage(1)
    .showMinimap(false)
    .enableSwipe(true)
    .onPageChange(this)
    .load();
}

@Override
public void onPageChanged(int page, int pageCount) {
    pageNumber = page;
    setTitle(format("%s %s / %s", pdfName, page, pageCount));
}

@Override
public void onBackPressed() {
    if (ABOUT_FILE.equals(pdfName)) {
        display(SAMPLE_FILE, true);
    } else {
        super.onBackPressed();
    }
}

private boolean displaying(String fileName) {
    return fileName.equals(pdfName);
}

}

Guys could you tell me, what is wrong with this code .

@ghost

This comment has been minimized.

Show comment
Hide comment
@ghost

ghost May 25, 2015

Workaround for loading from files:

Copy native libraries to your project. Works for me. Anyway this libvudroid.so is big one :(.

ghost commented May 25, 2015

Workaround for loading from files:

Copy native libraries to your project. Works for me. Anyway this libvudroid.so is big one :(.

@ashwinbhaskar

This comment has been minimized.

Show comment
Hide comment
@ashwinbhaskar

ashwinbhaskar Jun 24, 2015

I am getting the same exception when I try to open a file that is stored in Internal Storage. But when I try to open a file from External Storage it works. Why is this happening?

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 org.vudroid.core.DecodeServiceBase.getPageWidth(DecodeServiceBase.java:214)
            at com.joanzapata.pdfview.PDFView.loadComplete(PDFView.java:644)
            at com.joanzapata.pdfview.DecodingAsyncTask.onPostExecute(DecodingAsyncTask.java:58)
            at com.joanzapata.pdfview.DecodingAsyncTask.onPostExecute(DecodingAsyncTask.java:31)
            at android.os.AsyncTask.finish(AsyncTask.java:632)
            at android.os.AsyncTask.access$600(AsyncTask.java:177)
            at android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:645)
            at android.os.Handler.dispatchMessage(Handler.java:102)
            at android.os.Looper.loop(Looper.java:135)
            at android.app.ActivityThread.main(ActivityThread.java:5312)
            at java.lang.reflect.Method.invoke(Native Method)
            at java.lang.reflect.Method.invoke(Method.java:372)
            at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:901)
            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:696)

ashwinbhaskar commented Jun 24, 2015

I am getting the same exception when I try to open a file that is stored in Internal Storage. But when I try to open a file from External Storage it works. Why is this happening?

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 org.vudroid.core.DecodeServiceBase.getPageWidth(DecodeServiceBase.java:214)
            at com.joanzapata.pdfview.PDFView.loadComplete(PDFView.java:644)
            at com.joanzapata.pdfview.DecodingAsyncTask.onPostExecute(DecodingAsyncTask.java:58)
            at com.joanzapata.pdfview.DecodingAsyncTask.onPostExecute(DecodingAsyncTask.java:31)
            at android.os.AsyncTask.finish(AsyncTask.java:632)
            at android.os.AsyncTask.access$600(AsyncTask.java:177)
            at android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:645)
            at android.os.Handler.dispatchMessage(Handler.java:102)
            at android.os.Looper.loop(Looper.java:135)
            at android.app.ActivityThread.main(ActivityThread.java:5312)
            at java.lang.reflect.Method.invoke(Native Method)
            at java.lang.reflect.Method.invoke(Method.java:372)
            at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:901)
            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:696)
@ashwinbhaskar

This comment has been minimized.

Show comment
Hide comment
@ashwinbhaskar

ashwinbhaskar Jun 24, 2015

@bholota : What did you mean by "copy native libraries to your project"?

ashwinbhaskar commented Jun 24, 2015

@bholota : What did you mean by "copy native libraries to your project"?

@ghost

This comment has been minimized.

Show comment
Hide comment
@ghost

ghost Jun 24, 2015

I bet it's totally different issue. My configuration somehow didn't detect .so files inside library (vudroid ones) and I had add those manually. But you can try.

ghost commented Jun 24, 2015

I bet it's totally different issue. My configuration somehow didn't detect .so files inside library (vudroid ones) and I had add those manually. But you can try.

@ashwinbhaskar

This comment has been minimized.

Show comment
Hide comment
@ashwinbhaskar

ashwinbhaskar Jun 24, 2015

@bholota : I am not sure if including the files manually would solve the issue. Because the problem lies in the PdfPage.open(Native Method) method. This is a native method. I am really not sure what the problem could be.

ashwinbhaskar commented Jun 24, 2015

@bholota : I am not sure if including the files manually would solve the issue. Because the problem lies in the PdfPage.open(Native Method) method. This is a native method. I am really not sure what the problem could be.

@ghost

This comment has been minimized.

Show comment
Hide comment
@ghost

ghost Jun 24, 2015

I'm also thinking that my problem was related with something else. Maybe with older release.

ghost commented Jun 24, 2015

I'm also thinking that my problem was related with something else. Maybe with older release.

@baakonn

This comment has been minimized.

Show comment
Hide comment
@baakonn

baakonn Aug 14, 2015

Have you solved it

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 org.vudroid.core.DecodeServiceBase.getPageWidth(DecodeServiceBase.java:214)
at com.joanzapata.pdfview.PDFView.loadComplete(PDFView.java:648)
at com.joanzapata.pdfview.DecodingAsyncTask.onPostExecute(DecodingAsyncTask.java:58)
at com.joanzapata.pdfview.DecodingAsyncTask.onPostExecute(DecodingAsyncTask.java:1)
at android.os.AsyncTask.finish(AsyncTask.java:632)

baakonn commented Aug 14, 2015

Have you solved it

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 org.vudroid.core.DecodeServiceBase.getPageWidth(DecodeServiceBase.java:214)
at com.joanzapata.pdfview.PDFView.loadComplete(PDFView.java:648)
at com.joanzapata.pdfview.DecodingAsyncTask.onPostExecute(DecodingAsyncTask.java:58)
at com.joanzapata.pdfview.DecodingAsyncTask.onPostExecute(DecodingAsyncTask.java:1)
at android.os.AsyncTask.finish(AsyncTask.java:632)

@pzienowicz

This comment has been minimized.

Show comment
Hide comment
@pzienowicz

pzienowicz Nov 8, 2015

I still have this problem.
Loading file from assets works like a charm, but when I try to open the same file by "fromFile" method my app crashes!

pzienowicz commented Nov 8, 2015

I still have this problem.
Loading file from assets works like a charm, but when I try to open the same file by "fromFile" method my app crashes!

@Awdhesh

This comment has been minimized.

Show comment
Hide comment
@Awdhesh

Awdhesh Dec 12, 2015

Get issue in some pdf file :

12-12 14:30:42.663 32122-972/com.xxx.xxx E/AndroidRuntime: FATAL EXCEPTION: AsyncTask #4
Process: com.xxx.xxx, PID: 32122
java.lang.RuntimeException: An error occured while executing doInBackground()
at android.os.AsyncTask$3.done(AsyncTask.java:300)
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:288)
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) 
12-12 14:30:42.856 1007-1028/? E/GMPM: getGoogleAppId failed with status: 10
12-12 14:30:42.859 1007-1028/? E/GMPM: Uploading is not possible. App measurement disabled

Awdhesh commented Dec 12, 2015

Get issue in some pdf file :

12-12 14:30:42.663 32122-972/com.xxx.xxx E/AndroidRuntime: FATAL EXCEPTION: AsyncTask #4
Process: com.xxx.xxx, PID: 32122
java.lang.RuntimeException: An error occured while executing doInBackground()
at android.os.AsyncTask$3.done(AsyncTask.java:300)
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:288)
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) 
12-12 14:30:42.856 1007-1028/? E/GMPM: getGoogleAppId failed with status: 10
12-12 14:30:42.859 1007-1028/? E/GMPM: Uploading is not possible. App measurement disabled

@GuilhE

This comment has been minimized.

Show comment
Hide comment
@GuilhE

GuilhE Dec 22, 2015

Having this problem too, some .pdf files just give me this exception:

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)

I'm using the latest build 'com.joanzapata.pdfview:android-pdfview:1.0.4@aar':
mPdfView.fromFile(file)
.defaultPage(mPageNumber)
.onPageChange(this)
.onLoad(this)
.swipeVertical(true)
.load();

GuilhE commented Dec 22, 2015

Having this problem too, some .pdf files just give me this exception:

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)

I'm using the latest build 'com.joanzapata.pdfview:android-pdfview:1.0.4@aar':
mPdfView.fromFile(file)
.defaultPage(mPageNumber)
.onPageChange(this)
.onLoad(this)
.swipeVertical(true)
.load();

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment