You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "ASF subversion and git services (JIRA)" <ji...@apache.org> on 2015/10/24 14:22:27 UTC
[jira] [Commented] (PDFBOX-3051) COSArray.getObject() incorrect
handling of indirect reference to COSNull
[ https://issues.apache.org/jira/browse/PDFBOX-3051?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14972568#comment-14972568 ]
ASF subversion and git services commented on PDFBOX-3051:
---------------------------------------------------------
Commit 1710338 from [~tilman] in branch 'pdfbox/trunk'
[ https://svn.apache.org/r1710338 ]
PDFBOX-3051: convert indirect reference to COSNull to null
> COSArray.getObject() incorrect handling of indirect reference to COSNull
> ------------------------------------------------------------------------
>
> Key: PDFBOX-3051
> URL: https://issues.apache.org/jira/browse/PDFBOX-3051
> Project: PDFBox
> Issue Type: Bug
> Components: PDModel
> Affects Versions: 1.8.10, 1.8.11, 2.0.0
> Reporter: Tilman Hausherr
> Assignee: Tilman Hausherr
> Fix For: 1.8.11, 2.0.0
>
> Attachments: EIMKRH5MJJPH3VHKE753U4VCLH64EOL2.pdf
>
>
> The attached (broken) file has this exception when displaying page 10:
> {code}
> java.lang.RuntimeException: java.util.concurrent.ExecutionException: java.io.IOException: Error: Unknown annotation type COSNull{}
> org.apache.pdfbox.debugger.pagepane.PagePane$RenderWorker.done(PagePane.java:175)
> sun.swing.AccumulativeRunnable.run(Unknown Source)
> java.security.AccessController.doPrivileged(Native Method)
> java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
> Caused by: java.util.concurrent.ExecutionException: java.io.IOException: Error: Unknown annotation type COSNull{}
> org.apache.pdfbox.debugger.pagepane.PagePane$RenderWorker.done(PagePane.java:164)
> sun.swing.AccumulativeRunnable.run(Unknown Source)
> java.security.AccessController.doPrivileged(Native Method)
> java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
> Caused by: java.io.IOException: Error: Unknown annotation type COSNull{}
> org.apache.pdfbox.pdmodel.interactive.annotation.PDAnnotation.createAnnotation(PDAnnotation.java:164)
> org.apache.pdfbox.pdmodel.PDPage.getAnnotations(PDPage.java:664)
> org.apache.pdfbox.rendering.PageDrawer.drawPage(PageDrawer.java:181)
> org.apache.pdfbox.rendering.PDFRenderer.renderPage(PDFRenderer.java:208)
> org.apache.pdfbox.rendering.PDFRenderer.renderImage(PDFRenderer.java:139)
> org.apache.pdfbox.rendering.PDFRenderer.renderImage(PDFRenderer.java:68)
> org.apache.pdfbox.debugger.pagepane.PagePane$RenderWorker.doInBackground(PagePane.java:155)
> org.apache.pdfbox.debugger.pagepane.PagePane$RenderWorker.doInBackground(PagePane.java:138)
> java.lang.Thread.run(Unknown Source)
> {code}
> The cause is this code:
> {code}
> public COSBase getObject( int index )
> {
> Object obj = objects.get( index );
> if( obj instanceof COSObject )
> {
> obj = ((COSObject)obj).getObject();
> }
> else if( obj instanceof COSNull )
> {
> obj = null;
> }
> return (COSBase)obj;
> }
> {code}
> i.e. a COSObject that points to a COSNull object isn't returned as null, but as COSNull. COSDictionary.getDictionaryObject() does not have this bug.
> Solution: remove the "else".
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: dev-help@pdfbox.apache.org