pdfbox-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joel Hirsh <joelehi...@gmail.com>
Subject Re: Problem with "GC overhead limit exceeded" on Mac
Date Tue, 24 Nov 2015 02:16:25 GMT
Sorry, what I meant by frequently is that it happens on a number of Mac's.
So far, it appears to not happen on faster Macs with more memory, but on
slower ones with less memory.  But on the systems it happens on, its 100%
of the time.  I've seen some discussions about this error that indicate it
can be a result of many small objects that need to be garbage collected.

I have noticed that version 2 takes a few seconds to initialize even on
even the fastest systems I have tried it on and am wondering if there is
something happening that could be made more efficient.

On Mon, Nov 23, 2015 at 2:29 PM, Tilman Hausherr <THausherr@t-online.de>
wrote:

> Are you using the latest version (RC2)?
>
> You mention that this happens "frequently". In theory, this should be
> called only once, i.e. when new fonts are discovered. Did you delete the
> .pdfbox.cache file to provoke this?
>
> Tilman
>
>
> Am 23.11.2015 um 20:14 schrieb Joel Hirsh:
>
>> I am finding that the font initialization code is frequently getting this
>> error on the Mac
>>
>> According to Sun, the error happens "if too much time is being spent in
>> garbage collection: if more than 98% of the total time is spent in garbage
>> collection and less than 2% of the heap is recovered, an OutOfMemoryError
>> will be thrown.".  Seems to be a result of too many small objects combined
>> with a not so fast computer.
>>
>> java.lang.OutOfMemoryError: GC overhead limit exceeded
>>   at org.apache.fontbox.cff.IndexData.getBytes(IndexData.java:44)
>>   at org.apache.fontbox.cff.CFFParser.parseFont(CFFParser.java:437)
>>   at org.apache.fontbox.cff.CFFParser.parse(CFFParser.java:115)
>>   at org.apache.fontbox.ttf.CFFTable.read(CFFTable.java:53)
>>   at org.apache.fontbox.ttf.TrueTypeFont.readTable(TrueTypeFont.java:377)
>>   at org.apache.fontbox.ttf.OpenTypeFont.getCFF(OpenTypeFont.java:61)
>>   at
>>
>> org.apache.pdfbox.pdmodel.font.FileSystemFontProvider.addTrueTypeFontImpl(FileSystemFontProvider.java:432)
>>   at
>>
>> org.apache.pdfbox.pdmodel.font.FileSystemFontProvider.addTrueTypeCollection(FileSystemFontProvider.java:344)
>>   at
>>
>> org.apache.pdfbox.pdmodel.font.FileSystemFontProvider.scanFonts(FileSystemFontProvider.java:243)
>>   at
>>
>> org.apache.pdfbox.pdmodel.font.FileSystemFontProvider.<init>(FileSystemFontProvider.java:224)
>>   at
>>
>> org.apache.pdfbox.pdmodel.font.FontMapperImpl$DefaultFontProvider.<clinit>(FontMapperImpl.java:132)
>>   at
>>
>> org.apache.pdfbox.pdmodel.font.FontMapperImpl.getProvider(FontMapperImpl.java:151)
>>   at
>>
>> org.apache.pdfbox.pdmodel.font.FontMapperImpl.findFont(FontMapperImpl.java:415)
>>   at
>>
>> org.apache.pdfbox.pdmodel.font.FontMapperImpl.getTrueTypeFont(FontMapperImpl.java:323)
>>   at
>>
>> org.apache.pdfbox.pdmodel.font.PDTrueTypeFont.<init>(PDTrueTypeFont.java:196)
>>   at
>>
>> org.apache.pdfbox.pdmodel.font.PDFontFactory.createFont(PDFontFactory.java:75)
>>   at org.apache.pdfbox.pdmodel.PDResources.getFont(PDResources.java:123)
>>   at
>>
>> org.apache.pdfbox.contentstream.operator.text.SetFontAndSize.process(SetFontAndSize.java:60)
>>   at
>>
>> org.apache.pdfbox.contentstream.PDFStreamEngine.processOperator(PDFStreamEngine.java:814)
>>   at
>>
>> org.apache.pdfbox.contentstream.PDFStreamEngine.processStreamOperators(PDFStreamEngine.java:471)
>>   at
>>
>> org.apache.pdfbox.contentstream.PDFStreamEngine.processStream(PDFStreamEngine.java:445)
>>   at
>>
>> org.apache.pdfbox.contentstream.PDFStreamEngine.processPage(PDFStreamEngine.java:149)
>>   at
>>
>> org.apache.pdfbox.text.PDFTextStreamEngine.processPage(PDFTextStreamEngine.java:117)
>>   at
>>
>> org.apache.pdfbox.text.PDFTextStripper.processPage(PDFTextStripper.java:370)
>>   at
>>
>> org.apache.pdfbox.text.PDFTextStripper.processPages(PDFTextStripper.java:307)
>>   at
>> org.apache.pdfbox.text.PDFTextStripper.writeText(PDFTextStripper.java:252)
>>
>> Any suggestions on how to deal with this?
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
> For additional commands, e-mail: users-help@pdfbox.apache.org
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message