You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tika.apache.org by "Tyler Palsulich (JIRA)" <ji...@apache.org> on 2015/03/04 01:20:06 UTC

[jira] [Commented] (TIKA-1038) Parsing PDF with StackOverlowError

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

Tyler Palsulich commented on TIKA-1038:
---------------------------------------

Just commented on PDFBOX-1835 with this issue. I was able to reproduce with Tika 1.8-SNAPSHOT. Here is an updated stack trace:
{code}
➜  trunk  tika http://downloads.joomlacode.org/frsrelease/5/4/0/54089/handbuch_ckforms-DE-1.3.2.pdf
INFO - Document is encrypted
Exception in thread "main" java.lang.StackOverflowError
	at java.util.LinkedHashMap$LinkedHashIterator.<init>(LinkedHashMap.java:366)
	at java.util.LinkedHashMap$LinkedHashIterator.<init>(LinkedHashMap.java:366)
	at java.util.LinkedHashMap$KeyIterator.<init>(LinkedHashMap.java:404)
	at java.util.LinkedHashMap$KeyIterator.<init>(LinkedHashMap.java:404)
	at java.util.LinkedHashMap.newKeyIterator(LinkedHashMap.java:417)
	at java.util.HashMap$KeySet.iterator(HashMap.java:1002)
	at org.apache.pdfbox.cos.COSDictionary.toString(COSDictionary.java:1554)
	at org.apache.pdfbox.cos.COSDictionary.toString(COSDictionary.java:1560)
	at org.apache.pdfbox.cos.COSDictionary.toString(COSDictionary.java:1560)
	at org.apache.pdfbox.cos.COSDictionary.toString(COSDictionary.java:1560)
	at org.apache.pdfbox.cos.COSDictionary.toString(COSDictionary.java:1560)
{code}

> Parsing PDF with StackOverlowError 
> -----------------------------------
>
>                 Key: TIKA-1038
>                 URL: https://issues.apache.org/jira/browse/TIKA-1038
>             Project: Tika
>          Issue Type: Bug
>          Components: parser
>    Affects Versions: 1.2
>            Reporter: Konstantin Privezentsev
>
> Tika corrupt with StackOverflowError on some pdf documents:
> http://www.ellipse-labo.com/fiches/1303214351.pdf
> http://downloads.joomlacode.org/frsrelease/5/4/0/54089/handbuch_ckforms-DE-1.3.2.pdf
> Code:
> {code:java}
> AutoDetectParser parser = new AutoDetectParser(
>                 new TypeDetector(),
>                 new PDFParser(),
>                 new OfficeParser(),
>                 new HtmlParser(),
>                 new RTFParser(),
>                 new OOXMLParser());
> WriteOutContentHandler contentHandler = new WriteOutContentHandler();
> Metadata metadata = new Metadata();
> parser.parse(contentStream, new BodyContentHandler(contentHandler), metadata, new ParseContext());
> {code}
> Stack trace:
> {code}
> java.lang.StackOverflowError
> 	at java.util.LinkedHashMap$LinkedHashIterator.<init>(LinkedHashMap.java:345)
> 	at java.util.LinkedHashMap$LinkedHashIterator.<init>(LinkedHashMap.java:345)
> 	at java.util.LinkedHashMap$KeyIterator.<init>(LinkedHashMap.java:383)
> 	at java.util.LinkedHashMap$KeyIterator.<init>(LinkedHashMap.java:383)
> 	at java.util.LinkedHashMap.newKeyIterator(LinkedHashMap.java:396)
> 	at java.util.HashMap$KeySet.iterator(HashMap.java:874)
> 	at org.apache.pdfbox.cos.COSDictionary.toString(COSDictionary.java:1416)
> 	at org.apache.pdfbox.cos.COSDictionary.toString(COSDictionary.java:1421)
> 	at org.apache.pdfbox.cos.COSDictionary.toString(COSDictionary.java:1421)
> 	at org.apache.pdfbox.cos.COSDictionary.toString(COSDictionary.java:1421)
> 	at org.apache.pdfbox.cos.COSDictionary.toString(COSDictionary.java:1421)
> ...
> {code}
>  



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)