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

Tim Allison commented on TIKA-2045:
-----------------------------------

Y, I get an OOM with -Xmx1g in PDFBox's ExtractText if I turn off the access 
checking.  It looks like PDFBox has to load the font (= 65536 characters) ~640 
times during the processing of this document.  I'm not sure if this is by 
design or not, but PDTextState is cloned quite a bit (~18k times), and that may 
(intentionally or not) introduce a memory leak meaning that the ~640 character 
maps are stored throughout the processing of the document.  

Further, even though the font appears to be the same throughout (largely), it 
isn't getting pulled from the cache in PDResources' {{getFont}} because the 
{{indirect}} is always null.

I'd recommend opening an issue on PDFBox's jira and linking to this one.

> TIKA crashes / runs out of memory on simple PDF
> -----------------------------------------------
>
>                 Key: TIKA-2045
>                 URL: https://issues.apache.org/jira/browse/TIKA-2045
>             Project: Tika
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 1.13
>         Environment: Linux, Java 8
>            Reporter: Egbert
>
> We're using TIKA embedded in a webcrawler and today I've encountered a PDF 
> that results in OutOfMemory errors while being processed by TIKA.
> It's a small, 1 page PDF file, so I don't think that it should consume that 
> much memory.
> I verified the problem by using the GUI from the tika-app-1.13.jar file and 
> that results in the same error on the same file. The file can be found at:
> http://www.spesmea.nl/pdf/algemene_voorwaarden_bbztcn_2010_nl.pdf
> If I can help by providing any additional information, please let me know.



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

Reply via email to