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 2018/03/26 18:32:00 UTC

[jira] [Assigned] (PDFBOX-4167) OutOfMemoryError on FlateFilter - Deflater.end() is missing

     [ https://issues.apache.org/jira/browse/PDFBOX-4167?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Tilman Hausherr reassigned PDFBOX-4167:
---------------------------------------

    Assignee: Tilman Hausherr

> OutOfMemoryError on FlateFilter - Deflater.end() is missing
> -----------------------------------------------------------
>
>                 Key: PDFBOX-4167
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-4167
>             Project: PDFBox
>          Issue Type: Bug
>          Components: Writing
>    Affects Versions: 2.0.8, 2.0.9
>         Environment: Windows 7 x64, Java 8 SE
>            Reporter: MINAKAMI Hiroki
>            Assignee: Tilman Hausherr
>            Priority: Major
>             Fix For: 2.0.10, 3.0.0 PDFBox
>
>
> While creating some large PDF documents by PDFBox 2.0.8 and 2.0.9, I met an OutOfMemoryError on FlateFilter.encode().
> While creating some small PDF documents, there are no problems.
> I checked the source code of org.apache.pdfbox.filter.FlateFilter.java, and I found that calling of Deflater.end() method is missing.
> When DeflaterOutputStream object is created by the 'new DeflaterOutputStream(encoded,deflater)' constructor method (i.e. 'custom deflater' is given),  
> DeflaterOutputStream.close() API does *not* call 'deflater.end()' method automatically.
> Deflater.end() method may be called by the finalizer at GC, of cource, but the timing of GC is undecidable by user. So 'deflater.end()' method should be called explicitly. Otherwise it may cause an OutOfMemoryError.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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