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

Dennis Noordsij commented on PDFBOX-4965:
-----------------------------------------

Maybe I misunderstand your conclusion, haven't looked at this in a while, but 
how is it not a bug if a "very complex PDF" causes a stack overflow exception 
in pdfbox ?

Which is solved (for a particular document) if the stack size is increased? If 
the problem was with a reference to itself, then it shouldn't have worked with 
a bigger stack either?

In 2.0.26 there is still a lot of recursion in cloning, which can only go so 
deep depending on stack size.

I have to look if I can find or craft a PDF that might (still) trigger this.

 

 

> Stack overflow in PDFCloneUtility
> ---------------------------------
>
>                 Key: PDFBOX-4965
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-4965
>             Project: PDFBox
>          Issue Type: Bug
>          Components: Utilities
>    Affects Versions: 2.0.21
>         Environment: FreeBSD
>            Reporter: Dennis Noordsij
>            Priority: Minor
>
> My production system crashed with the following trace:
> java.lang.StackOverflowError
>  at java.util.HashMap.hash(HashMap.java:339)
>  at java.util.HashMap.get(HashMap.java:557)
>  at 
> org.apache.pdfbox.multipdf.PDFCloneUtility.cloneForNewDocument(PDFCloneUtility.java:81)
>  at 
> org.apache.pdfbox.multipdf.PDFCloneUtility.cloneForNewDocument(PDFCloneUtility.java:146)
>  at 
> org.apache.pdfbox.multipdf.PDFCloneUtility.cloneForNewDocument(PDFCloneUtility.java:109)
>  at 
> org.apache.pdfbox.multipdf.PDFCloneUtility.cloneForNewDocument(PDFCloneUtility.java:146)
>  at 
> org.apache.pdfbox.multipdf.PDFCloneUtility.cloneForNewDocument(PDFCloneUtility.java:109)
>  at 
> org.apache.pdfbox.multipdf.PDFCloneUtility.cloneForNewDocument(PDFCloneUtility.java:146)
> (repeated)
>  
> We do a lot with PDF files and I don't have the actual PDF or action which 
> caused this at the moment, but perhaps this already rings a bell with someone 
> of what kind of bug this could be or wether I am doing something strange?
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: dev-h...@pdfbox.apache.org

Reply via email to