Closed VortanaSay01 closed 3 months ago
Thank you for creating your first issue. We appreciate your help in making this project better. We will look into it, and get back to you soon.
I had reported one crash similar to your case, and this issue still exists but it is closed without a fix or solution.
I noticed this bug when you close the PDF while displaying a page with a huge image, like the cover of a book
Hey, Can you share what device you are using? It could be a performance-related issue, as I could not reproduce it.
Thanks
I tested on an Asus M2 and on a Samsung A1, both had this same issue
I saw the issue in Samsung Galaxy. Android 12. I also noticed the issue when open pdf before it load or quickly press back to previous screen.
Hi, The Above issue has been fixed in new release. https://github.com/afreakyelf/Pdf-Viewer/releases/tag/v2.1.0
Please migrate to Maven central. More here: https://github.com/afreakyelf/Pdf-Viewer/releases/tag/v2.1.0
Thank you for using the library. Please reopen/raise a new issue if you still face this error.
Join our discord for more updates!
📝 Describe the Bug
App crash when repeat these these steps: open pdf via pdfViewerActivity then back from activity.
📖 Library Version
🚶 Steps to Reproduce
Please follow these steps to reproduce the issue:
🤔 Expected Behavior
App should open pdf and no crash
🖼️ Screenshots/Videos
If applicable, add screenshots or videos to help explain your problem.
📱 Smartphone Info:
💻 Code Snippets
startActivity( PdfViewerActivity.launchPdfFromUrl( context = this, pdfUrl = uri.toString(), pdfTitle = "", saveTo = saveTo.ASK_EVERYTIME, enableDownload = true ) )
📜 Log Output/Stack Trace
Caused by: java.lang.IllegalStateException: Current page not closed at android.graphics.pdf.PdfRenderer.throwIfPageOpened(PdfRenderer.java:279) at android.graphics.pdf.PdfRenderer.close(PdfRenderer.java:191) at com.rajat.pdfviewer.PdfRendererCore.closePdfRender(PdfRendererCore.kt:175) at com.rajat.pdfviewer.PdfRendererView.closePdfRender(PdfRendererView.kt:242) at com.rajat.pdfviewer.PdfViewerActivity.onDestroy(PdfViewerActivity.kt:507) at android.app.Activity.performDestroy(Activity.java:8571) at android.app.Instrumentation.callActivityOnDestroy(Instrumentation.java:1364) at android.app.ActivityThread.performDestroyActivity(ActivityThread.java:5937) at android.app.ActivityThread.handleDestroyActivity(ActivityThread.java:5995) at android.app.servertransaction.DestroyActivityItem.execute(DestroyActivityItem.java:47) at android.app.servertransaction.ActivityTransactionItem.execute(ActivityTransactionItem.java:45) at android.app.servertransaction.TransactionExecutor.executeLifecycleState(TransactionExecutor.java:176) at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:97) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2438) at android.os.Handler.dispatchMessage(Handler.java:106) at android.os.Looper.loopOnce(Looper.java:226) at android.os.Looper.loop(Looper.java:313) at android.app.ActivityThread.main(ActivityThread.java:8663) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:567) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1135)
💬 Additional Context
Add any other context about the problem here. Mention if the issue is consistent, specific scenarios where the bug occurs, etc.