You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Android PDF crash while scrolling | java.lang.IllegalStateException: Already closed #989
Process: com.ey.eyinteractpayroll, PID: 3936
java.lang.IllegalStateException: Already closed
at io.legere.pdfiumandroid.util.ConfigKt.handleAlreadyClosed(Config.kt:24)
at io.legere.pdfiumandroid.PdfPage.close(PdfPage.kt:733)
at kotlin.io.CloseableKt.closeFinally(Closeable.kt:56)
at io.legere.pdfiumandroid.PdfiumCore.renderPageBitmap(PdfiumCore.kt:503)
at com.github.barteksc.pdfviewer.PdfFile.renderPageBitmap(PdfFile.java:301)
at com.github.barteksc.pdfviewer.RenderingHandler.proceed(RenderingHandler.java:109)
at com.github.barteksc.pdfviewer.RenderingHandler.handleMessage(RenderingHandler.java:66)
at android.os.Handler.dispatchMessage(Handler.java:110)
at android.os.Looper.loopOnce(Looper.java:273)
at android.os.Looper.loop(Looper.java:363)
at android.os.HandlerThread.run(HandlerThread.java:85)
changed the title [-]Android PDF crash while scrolling.[/-][+]Android PDF crash while scrolling | java.lang.IllegalStateException: Already closed[/+]on Dec 9, 2025
We upgraded to react-native-pdf@7.0.4, which includes PR #999, but we are still seeing IllegalStateException: Already closed in Crashlytics.
Stack trace:
Fatal Exception: java.lang.IllegalStateException: Already closed
at io.legere.pdfiumandroid.util.ConfigKt.handleAlreadyClosed(Config.kt:24)
at io.legere.pdfiumandroid.PdfPage.renderPageBitmap(PdfPage.kt:457)
at io.legere.pdfiumandroid.PdfPage.renderPageBitmap$default(PdfPage.kt:445)
at io.legere.pdfiumandroid.PdfiumCore.renderPageBitmap(PdfiumCore.kt:506)
at com.github.barteksc.pdfviewer.PdfFile.renderPageBitmap(PdfFile.java:301)
at com.github.barteksc.pdfviewer.RenderingHandler.proceed(RenderingHandler.java:109)
at com.github.barteksc.pdfviewer.RenderingHandler.handleMessage(RenderingHandler.java:66)
Can maintainers confirm whether PR #999 is expected to cover PdfPage.renderPageBitmap(...) as well as PdfPage.close(...)? Or is there another lifecycle/rendering race still open?
Activity
[-]Android PDF crash while scrolling.[/-][+]Android PDF crash while scrolling | java.lang.IllegalStateException: Already closed[/+]ersyhsyn commentedon Dec 15, 2025
same for me
NJneeraj commentedon Dec 18, 2025
When this issue will be fixed?
MuhammadAnwaar9 commentedon Dec 19, 2025
same for me
NJneeraj commentedon Dec 19, 2025
Try this library react-native-pdf-crash-fix. It worked for me.
ersyhsyn commentedon Dec 22, 2025
iOS not work for me.
DuLe-FinX commentedon Jan 5, 2026
@ersyhsyn
it means can not fix this crash or can not render pdf?
adammonteil commentedon Jan 8, 2026
+1
ersyhsyn commentedon Jan 8, 2026
not render pdf on iOS.
Fix Android PDF crash: IllegalStateException: Already closed (wonday#989
Fix Android PDF crash: IllegalStateException: Already closed (wonday#989
Fix Android PDF crash: IllegalStateException: Already closed (wonday#989
coolsoftwaretyler commentedon Feb 13, 2026
Hey folks, I think I've got a fix over in #999, along with a reproducer app using the patch in this other PR: coolsoftwaretyler/pdf-989-reproduction#1.
I can only reproduce with certain PDFs. Not sure what the key difference is yet.
Fix Android PDF crash: IllegalStateException: Already closed (#989) (#…
Siddhantshelake commentedon Jun 10, 2026
We upgraded to
react-native-pdf@7.0.4, which includes PR #999, but we are still seeingIllegalStateException: Already closedin Crashlytics.Stack trace: