Skip to content
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 shows blank on the first launch, but opening the next pdf works fine #100

Closed
bettdouglas opened this issue Aug 27, 2020 · 3 comments

Comments

@bettdouglas
Copy link

I have this error where after first installing the app, first time opening a pdf shows a blank page yet the file exists.

Has anyone experienced this?

@endigo
Copy link
Owner

endigo commented Aug 27, 2020

#98 (comment)

@endigo endigo closed this as completed Aug 27, 2020
@bettdouglas
Copy link
Author

D/com.shockwave.pdfium.PdfiumCore(13697): Starting PdfiumAndroid 1.9.0
D/jniPdfium(13697): Init FPDF library
D/jniPdfium(13697): Destroy FPDF library
E/com.shockwave.pdfium.PdfiumCore(13697): mContext may be null
W/System.err(13697): java.lang.NullPointerException: Attempt to invoke virtual method 'long java.lang.Long.longValue()' on a null object reference
W/System.err(13697): at com.shockwave.pdfium.PdfiumCore.renderPageBitmap(PdfiumCore.java:312)
W/System.err(13697): at com.github.barteksc.pdfviewer.PdfFile.renderPageBitmap(PdfFile.java:289)
W/System.err(13697): at com.github.barteksc.pdfviewer.RenderingHandler.proceed(RenderingHandler.java:109)
W/System.err(13697): at com.github.barteksc.pdfviewer.RenderingHandler.handleMessage(RenderingHandler.java:66)
W/System.err(13697): at android.os.Handler.dispatchMessage(Unknown Source:21)
W/System.err(13697): at android.os.Looper.loop(Unknown Source:207)
W/System.err(13697): at android.os.HandlerThread.run(Unknown Source:28)
E/BufferQueueProducer(13697): [SurfaceTexture-0-13697-0] dequeueBuffer: BufferQueue has been abandoned

Why does this happen just after installing the app and opening my first pdf.

I have a list of pdf from our db which are downloaded and displayed on the app. Once downloaded, by dio.download(pdf_url) then after I open it and confirm that the file exists, I open the file.
But I have errors which happen on first launch. Could you have an idea why this happens?

@endigo
Copy link
Owner

endigo commented Sep 29, 2020

Please follow this solution.

#98 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants