[
https://issues.apache.org/jira/browse/PDFBOX-3950?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16195801#comment-16195801
]
Andreas Lehmkühler commented on PDFBOX-3950:
--------------------------------------------
I've added a checker for the pages dictionary. Those entries which are not
dereferenced will be removed. This avoids exception like the attached one. But
there may be some other not dereferenced objects which may lead to other
exceptions, e.g. the attached pdf can be opened now, but throws an exception if
one tries to render page 4
> NPE in PageIterator.enqueueKids
> -------------------------------
>
> Key: PDFBOX-3950
> URL: https://issues.apache.org/jira/browse/PDFBOX-3950
> Project: PDFBox
> Issue Type: Bug
> Components: Parsing
> Affects Versions: 2.0.8
> Reporter: Tilman Hausherr
> Assignee: Andreas Lehmkühler
> Labels: regression
> Attachments: 23EGDHXSBBYQLKYOKGZUOVYVNE675PRD.pdf
>
>
> {code}
> Exception in thread "main" java.lang.NullPointerException
> at java.util.ArrayDeque.addLast(ArrayDeque.java:244)
> at java.util.ArrayDeque.add(ArrayDeque.java:418)
> at
> org.apache.pdfbox.pdmodel.PDPageTree$PageIterator.enqueueKids(PDPageTree.java:178)
> at
> org.apache.pdfbox.pdmodel.PDPageTree$PageIterator.enqueueKids(PDPageTree.java:173)
> at
> org.apache.pdfbox.pdmodel.PDPageTree$PageIterator.<init>(PDPageTree.java:159)
> at
> org.apache.pdfbox.pdmodel.PDPageTree$PageIterator.<init>(PDPageTree.java:153)
> at org.apache.pdfbox.pdmodel.PDPageTree.iterator(PDPageTree.java:123)
> at
> org.apache.pdfbox.text.PDFTextStripper.processPages(PDFTextStripper.java:282)
> {code}
> This worked in 2.0.7. There are about 200 occurences of this exception in the
> tests by Tim.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]