You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "Tilman Hausherr (JIRA)" <ji...@apache.org> on 2017/12/18 23:21:00 UTC

[jira] [Commented] (PDFBOX-4041) Memory Leak while converting pdf to images

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

Tilman Hausherr commented on PDFBOX-4041:
-----------------------------------------

Your code is fine. Please add your version, and read the section "getting started" (tell whether you're using that KCMS option), "FAQ" (re how to save memory) and "dependencies" (jbig2, there's an error message you got).

I did search for memory leaks some time ago... it took hours and was frustrating. There were left over BufferedImages, but these weren't held by any pdfbox structures, so I suspected a java bug. I can't find it, maybe it was in jira, maybe it was in the mailing list.

> Memory Leak while converting pdf to images
> ------------------------------------------
>
>                 Key: PDFBOX-4041
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-4041
>             Project: PDFBox
>          Issue Type: Bug
>            Reporter: Ajit
>         Attachments: File2_5Mb.pdf, PDFConverter.java, heap.jpg, output.txt
>
>
> I am observing memory leak in PDF to images conversion simple program. I realise the PDF that I am converting is bit bigger in size.
> Check the heap image and you will see that leak is happening even though I have flushed the buffered image and set it to null explicitly. I have also closed the document too.
> !heap.jpg|thumbnail! If you notice the image, the process was running at 2 GBs in only two runs. I am not able to attach the heap, because of its bigger size. But note the image at the bottom and you will see that BufferedImage is taking about 500 MBs.
> I have also provided the source code (few lines) and hoping I haven't done any stupid mistake. 



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

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