Please note that an OutOfMemoryError can occur anywhere. A stack trace
in such a case is not an reliable indicator for a problem.

I don't think there's a problem with any specific font. PFM files are
rarely larger than a couple of kilobytes. I'd rather increase the heap
size (as a work-around) or start up a profiler to find out who exactly
uses so much memory (or rather doesn't release it in time). FOP's font
handling is known to be a bit memory-hungry. I've experienced an
OutOfMemoryError myself occasionally during font auto-detection but so
far I haven't been able put my finger on it.

Ingo, you can generate a heap dump if you add the following VM
parameter:
-XX:+HeapDumpOnOutOfMemoryError
The generated file can then be used to figure out memory problems with
the right tools (like IBM's Heap Analyzer or YourKit). If you want you
can put it somewhere on a server and send me a link. I can then take a
look. Don't send those files by mail: they are huge!

On 09.09.2008 11:41:20 Ingo Maas wrote:
> Hi Adrian,
> 
> the fonts are original Adobe fonts, which I took for tests from older
> Acrobat Reader. Therefore, they are trustworthy, at least more than those
> Ghostscript fonts, which have failed for me in metrics generation.
> 
> Having a look at PFMInputStream.readString(), it is evident what is going
> wrong. The stream only catches zero terminations but not EOF (i.e. -1).
> Wouldn't make it sense to catch EOF here as well?
> 
> Greetings, Ingo
> 
> -----Ursprüngliche Nachricht-----
> Von: Adrian Cumiskey [mailto:[EMAIL PROTECTED] 
> Gesendet: Montag, 8. September 2008 18:15
> An: fop-users@xmlgraphics.apache.org
> Betreff: Re: Font autodetection yields Out-of-Memory error
> 
> Hi Ingo,
> 
> Looking at the stack trace it doesn't look to be a problem with font
> autodetection, more to do with 
> a parsing problem on one of your PFM files.  I'm guessing it must be an
> erroneous one as I wasn't 
> able to reproduce the problem with the PFM font file that I tried.
> 
> Could you try isolating which PFM file is the offending one?  You should be
> able to see which font 
> file is causing you the problem by changing your LOGLEVEL variable towards
> the bottom of your fop 
> launcher file to "info" or "debug" and then relaunching.
> 
> Adrian.
> 
> Ingo Maas wrote:
> > Hallo,
> > 
> >  
> > 
> > In font autodetection seems to be a bug, introduced sometime in 
> > June/July. I hoped that this has been fixed in 0.95 or current trunk, 
> > but it has not. See stacktrace for current trunk below.
> > 
> >  
> > 
> > Regards, Ingo
> > 
> >  
> > 
> > Stacktrace: java.lang.OutOfMemoryError: Java heap space
> > 
> >       at java.lang.AbstractStringBuilder.expandCapacity(Unknown Source)
> > 
> >       at java.lang.AbstractStringBuilder.append(Unknown Source)
> > 
> >       at java.lang.StringBuffer.append(Unknown Source)
> > 
> >       at 
> >
> org.apache.fop.fonts.type1.PFMInputStream.readString(_PFMInputStream.java:10
> 2_)
> > 
> >       at org.apache.fop.fonts.type1.PFMFile.loadHeader(_PFMFile.java:135_)
> > 
> >       at org.apache.fop.fonts.type1.PFMFile.load(_PFMFile.java:108_)
> > 
> >       at 
> >
> org.apache.fop.fonts.type1.Type1FontLoader.read(_Type1FontLoader.java:102_)
> > 
> >       at org.apache.fop.fonts.FontLoader.getFont(_FontLoader.java:171_)
> > 
> >       at org.apache.fop.fonts.FontLoader.loadFont(_FontLoader.java:120_)
> > 
> >       at org.apache.fop.fonts.FontLoader.loadFont(_FontLoader.java:98_)
> > 
> >       at 
> >
> org.apache.fop.fonts.autodetect.FontInfoFinder.find(_FontInfoFinder.java:251
> _)
> > 
> > <cut>…<cut/>
> > 
> >  
> > 
> > -- 
> > 
> > Ernst Basler + Partner GmbH
> > Ingo Maas
> > Tuchmacherstraße 47
> > DE-14482 Potsdam
> > 
> >  
> > 
> > +49 331 74 75 9 0  (Zentrale)
> > +49 331 74 75 9 78 (Direkt)
> > +49 331 74 75 9 90 (Fax)
> > 
> >  
> > 
> > Geschäftsführer: Dr. Ludger Paus
> > Amtsgericht Potsdam - HRB 6362 P
> > USt-Id Nr. 152768391
> > 
> >  
> > 
> > mailto:[EMAIL PROTECTED]
> > http://www.ebp.de
> > 
> >  
> > 
> >  
> > 
> >  
> > 
> 




Jeremias Maerki


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to