Moritz Flöter created PDFBOX-5427:
-------------------------------------

             Summary: 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
            Reporter: Moritz Flöter


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: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to