You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "Moritz Flöter (Jira)" <ji...@apache.org> on 2022/05/03 07:29:00 UTC

[jira] [Updated] (PDFBOX-5427) PDFDebugger does not remove listeners for PagePane when opening new File

     [ https://issues.apache.org/jira/browse/PDFBOX-5427?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Moritz Flöter updated PDFBOX-5427:
----------------------------------
    Affects Version/s: 2.0.26

> PDFDebugger does not remove listeners for PagePane when opening new File
> ------------------------------------------------------------------------
>
>                 Key: PDFBOX-5427
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-5427
>             Project: PDFBox
>          Issue Type: Bug
>          Components: Utilities
>    Affects Versions: 2.0.26
>            Reporter: Moritz Flöter
>            Priority: Minor
>
> A PagePane reacts to changes made to the "Repair AcroForm" setting.
> However this only works without errors for the first document opened in an instance of the PDFDebugger. 
> For any further document opened, an error is produced when changing the setting while the second document is opened. The listeners probably need to be removed when loading a new document (or when closing switching/away from the PagePane).
> {code:java}
> java.lang.RuntimeException: java.util.concurrent.ExecutionException: java.io.IOException: COSStream has been closed and cannot be read. Perhaps its enclosing PDDocument has been closed?
>     org.apache.pdfbox.debugger.pagepane.PagePane$RenderWorker.done(PagePane.java:485)
>     java.desktop/sun.swing.AccumulativeRunnable.run(AccumulativeRunnable.java:112)
>     java.base/java.security.AccessController.doPrivileged(Native Method)
>     java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
> Caused by: java.util.concurrent.ExecutionException: java.io.IOException: COSStream has been closed and cannot be read. Perhaps its enclosing PDDocument has been closed?
>     org.apache.pdfbox.debugger.pagepane.PagePane$RenderWorker.done(PagePane.java:465)
>     java.desktop/sun.swing.AccumulativeRunnable.run(AccumulativeRunnable.java:112)
>     java.base/java.security.AccessController.doPrivileged(Native Method)
>     java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
> Caused by: java.io.IOException: COSStream has been closed and cannot be read. Perhaps its enclosing PDDocument has been closed?
>     org.apache.pdfbox.cos.COSStream.checkClosed(COSStream.java:83)
>     org.apache.pdfbox.cos.COSStream.createInputStream(COSStream.java:168)
>     org.apache.pdfbox.cos.COSStream.createInputStream(COSStream.java:163)
>     org.apache.pdfbox.pdmodel.PDPage.getContents(PDPage.java:157)
>     org.apache.pdfbox.pdfparser.PDFStreamParser.<init>(PDFStreamParser.java:91)
>     org.apache.pdfbox.contentstream.PDFStreamEngine.processStreamOperators(PDFStreamEngine.java:535)
>     org.apache.pdfbox.contentstream.PDFStreamEngine.processStream(PDFStreamEngine.java:516)
>     org.apache.pdfbox.contentstream.PDFStreamEngine.processPage(PDFStreamEngine.java:155)
>     org.apache.pdfbox.rendering.PageDrawer.drawPage(PageDrawer.java:279)
>     org.apache.pdfbox.rendering.PDFRenderer.renderImage(PDFRenderer.java:355)
>     org.apache.pdfbox.debugger.pagepane.PagePane$RenderWorker.doInBackground(PagePane.java:453)
>     org.apache.pdfbox.debugger.pagepane.PagePane$RenderWorker.doInBackground(PagePane.java:435)
>     java.base/java.lang.Thread.run(Thread.java:829) {code}



--
This message was sent by Atlassian Jira
(v8.20.7#820007)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: dev-help@pdfbox.apache.org