[ 
https://issues.apache.org/jira/browse/PDFBOX-3626?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15861100#comment-15861100
 ] 

Andreas Lehmkühler edited comment on PDFBOX-3626 at 2/10/17 11:16 AM:
----------------------------------------------------------------------

There are two 16 0 objects 
{code}
16 0 obj
631
{code}
The second one is the correct one and it's the one which is referenced in the 
xref table. Somehow the repair mechanism uses the wrong one. 

The brute force search doesn't stop at the end of the pdf but scans the rubbish 
as well. The second 16 0 obj ist part of the rubbish.


was (Author: lehmi):
There are two 16 0 objects 
{code}
16 0 obj
631
{code}
The second one is the correct one and it's the one which is referenced in the 
xref table. Somehow the repair mechanism uses the wrong one. 

> StackOverflowException on a valid PDF
> -------------------------------------
>
>                 Key: PDFBOX-3626
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-3626
>             Project: PDFBox
>          Issue Type: Bug
>          Components: Parsing
>    Affects Versions: 2.0.3
>         Environment: Windows 7 x64, JVM 1.8.0_101
>            Reporter: Seva Alekseyev
>         Attachments: PDF-01555.PDF
>
>
> On the attached document, which opens fine in Acrobat, PDDocument,load() 
> throws a StackOverflowException:
> Exception in thread "main" java.lang.StackOverflowError
>       at sun.nio.cs.UTF_8$Decoder.decodeLoop(UTF_8.java:412)
>       at java.nio.charset.CharsetDecoder.decode(CharsetDecoder.java:579)
>       at java.nio.charset.CharsetDecoder.decode(CharsetDecoder.java:802)
>       at 
> org.apache.pdfbox.pdfparser.BaseParser.isValidUTF8(BaseParser.java:805)
>       at 
> org.apache.pdfbox.pdfparser.BaseParser.parseCOSName(BaseParser.java:785)
>       at 
> org.apache.pdfbox.pdfparser.BaseParser.parseDirObject(BaseParser.java:905)
>       at 
> org.apache.pdfbox.pdfparser.BaseParser.parseCOSDictionaryValue(BaseParser.java:153)
>       at 
> org.apache.pdfbox.pdfparser.BaseParser.parseCOSDictionaryNameValuePair(BaseParser.java:277)
>       at 
> org.apache.pdfbox.pdfparser.BaseParser.parseCOSDictionary(BaseParser.java:210)
>       at 
> org.apache.pdfbox.pdfparser.BaseParser.parseDirObject(BaseParser.java:885)
>       at 
> org.apache.pdfbox.pdfparser.COSParser.parseFileObject(COSParser.java:772)
>       at 
> org.apache.pdfbox.pdfparser.COSParser.parseObjectDynamically(COSParser.java:741)
>       at 
> org.apache.pdfbox.pdfparser.COSParser.parseObjectDynamically(COSParser.java:672)
>       at org.apache.pdfbox.pdfparser.COSParser.getLength(COSParser.java:897)
>       at 
> org.apache.pdfbox.pdfparser.COSParser.parseCOSStream(COSParser.java:949)
>       at 
> org.apache.pdfbox.pdfparser.COSParser.parseFileObject(COSParser.java:780)
>       at 
> org.apache.pdfbox.pdfparser.COSParser.parseObjectDynamically(COSParser.java:741)
>       at 
> org.apache.pdfbox.pdfparser.COSParser.parseObjectDynamically(COSParser.java:672)
> ...



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to