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

Andreas L. Delmelle commented on FOP-2525:
------------------------------------------


Thanks for the clarification. Makes a lot of sense now. I personally am no 
expert in that particular part of the FOP code either, but if GlyphTable is 
used as  -- or better: if I interpret the code correctly, _indirectly used in_ 
-- a key in a Map, then it should indeed have proper {{equals()}} and 
{{hashCode()}} implementations. 
The {{ScriptProcessor.AssembledLookupsKey.equals()}} method performs a check on 
whether one GlyphTable equals another, so if the implementation is absent, the 
default implementation from {{java.lang.Object}} is used, which only considers 
x and y equal if they are truly identical (i.e. {{x == y}})...

As to the static and unbounded characteristic, it remains to be investigated 
whether this is really the most appropriate solution here...

For now, I will see about getting those two methods committed to the trunk, so 
at least this particular problem is resolved.

Thanks again for your efforts!

> Memory leak present when using Truetype Collection (.ttc)
> ---------------------------------------------------------
>
>                 Key: FOP-2525
>                 URL: https://issues.apache.org/jira/browse/FOP-2525
>             Project: FOP
>          Issue Type: Bug
>    Affects Versions: 2.0
>         Environment: At least Mac and Linux, both Oracle VM and OpenJDK
>            Reporter: Jeremy Smith
>            Priority: Minor
>
> When a TrueType Collection file is used to specify custom fonts, and a 
> long-running FopFactory is used to create FOP instances to process many FO 
> input documents, millions of 
> org.apache.fop.complexscripts.fonts.GlyphPositioningTable$PairValues and 
> org.apache.fop.complexscripts.fonts.GlyphPositioningTable$Values instances 
> get created which are never collected.  Thus the heap continues to grow, 
> leading to eventual GC thrashing or crash.
> When the same fonts are used, but extracted from the TTC file, the issue does 
> not occur, and the instances of those classes are collected normally.
> The issue can be seen by repeatedly processing a document with a config.xml 
> which specifies fonts inside of a Truetype Collection file.  Attaching 
> VisualVM to such a process will show continuous heap growth and millions of 
> aforementioned instances whose numbers never decrease.



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

Reply via email to