xmlgraphics-fop-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Adrian Cumiskey <adrian.cumis...@gmail.com>
Subject Re: Multithreading issue with fonts for PDF/Postscript renderers
Date Mon, 21 Jul 2008 16:22:20 GMT
Hi Ingo,

Many thanks for reporting this problem.  My guess is that the static (and unsynchronized)

createFontKey() method in org.apache.fop.fonts.FontInfo may be causing the problem...

I will commit a fix shortly and then will ask you to update your FOP trunk and re-test.

Adrian.

Ingo Maas wrote:
> Hi,
> 
>  
> 
> I’m in serious trouble running 20 threads in parallel for PDF and 
> Postscript rendering. Each thread uses an own FOUserAgent created by a 
> singleton FopFactory. I’m using FOP trunk compiled at 2008-06-03.
> 
>  
> 
> Below you can see a typical stacktrace. One of the LayoutManager-s tries 
> to retrieve a Font instance from a FontInfo object. The returned 
> instance is null and so a NullPointerException will be thrown at the 
> first access to the Font reference. Usually the first PDF/PS files will 
> be produced fine but at some point some (not all!) of the remaining 
> tasks fail.
> 
>  
> 
> Any help on this is very appreciated.
> 
>  
> 
> Regards, Ingo
> 
>  
> 
>  
> 
> Stacktrace: java.lang.NullPointerException
> 
>             at org.apache.fop.fonts.Font.getAscender(Font.java:105)
> 
>             at 
> org.apache.fop.layoutmgr.inline.AlignmentContext.<init>(AlignmentContext.java:127)
> 
>             at 
> org.apache.fop.layoutmgr.inline.InlineLayoutManager.getNextKnuthElements(InlineLayoutManager.java:254)
> 
>             at 
> org.apache.fop.layoutmgr.inline.LineLayoutManager.collectInlineKnuthElements(LineLayoutManager.java:658)
> 
>             at 
> org.apache.fop.layoutmgr.inline.LineLayoutManager.getNextKnuthElements(LineLayoutManager.java:594)
> 
>             at 
> org.apache.fop.layoutmgr.BlockStackingLayoutManager.getNextKnuthElements(BlockStackingLayoutManager.java:298)
> 
>             at 
> org.apache.fop.layoutmgr.BlockLayoutManager.getNextKnuthElements(BlockLayoutManager.java:118)
> 
>             at 
> org.apache.fop.layoutmgr.BlockContainerLayoutManager.getNextKnuthElements(BlockContainerLayoutManager.java:287)
> 
>             at 
> org.apache.fop.layoutmgr.table.TableCellLayoutManager.getNextKnuthElements(TableCellLayoutManager.java:150)
> 
>             at 
> org.apache.fop.layoutmgr.table.RowGroupLayoutManager.createElementsForRowGroup(RowGroupLayoutManager.java:119)
> 
>             at 
> org.apache.fop.layoutmgr.table.RowGroupLayoutManager.getNextKnuthElements(RowGroupLayoutManager.java:61)
> 
>             at 
> org.apache.fop.layoutmgr.table.TableContentLayoutManager.getKnuthElementsForRowIterator(TableContentLayoutManager.java:234)
> 
>             at 
> org.apache.fop.layoutmgr.table.TableContentLayoutManager.getNextKnuthElements(TableContentLayoutManager.java:173)
> 
>             at 
> org.apache.fop.layoutmgr.table.TableLayoutManager.getNextKnuthElements(TableLayoutManager.java:249)
> 
>             at 
> org.apache.fop.layoutmgr.BlockStackingLayoutManager.getNextKnuthElements(BlockStackingLayoutManager.java:298)
> 
>             at 
> org.apache.fop.layoutmgr.BlockLayoutManager.getNextKnuthElements(BlockLayoutManager.java:118)
> 
>             at 
> org.apache.fop.layoutmgr.table.TableCellLayoutManager.getNextKnuthElements(TableCellLayoutManager.java:150)
> 
>             at 
> org.apache.fop.layoutmgr.table.RowGroupLayoutManager.createElementsForRowGroup(RowGroupLayoutManager.java:119)
> 
>             at 
> org.apache.fop.layoutmgr.table.RowGroupLayoutManager.getNextKnuthElements(RowGroupLayoutManager.java:61)
> 
>             at 
> org.apache.fop.layoutmgr.table.TableContentLayoutManager.getKnuthElementsForRowIterator(TableContentLayoutManager.java:220)
> 
>             at 
> org.apache.fop.layoutmgr.table.TableContentLayoutManager.getNextKnuthElements(TableContentLayoutManager.java:173)
> 
>             at 
> org.apache.fop.layoutmgr.table.TableLayoutManager.getNextKnuthElements(TableLayoutManager.java:249)
> 
>             at 
> org.apache.fop.layoutmgr.BlockStackingLayoutManager.getNextKnuthElements(BlockStackingLayoutManager.java:298)
> 
>             at 
> org.apache.fop.layoutmgr.BlockLayoutManager.getNextKnuthElements(BlockLayoutManager.java:118)
> 
>             at 
> org.apache.fop.layoutmgr.BlockStackingLayoutManager.getNextKnuthElements(BlockStackingLayoutManager.java:298)
> 
>             at 
> org.apache.fop.layoutmgr.BlockLayoutManager.getNextKnuthElements(BlockLayoutManager.java:118)
> 
>             at 
> org.apache.fop.layoutmgr.FlowLayoutManager.getNextKnuthElements(FlowLayoutManager.java:109)
> 
>             at 
> org.apache.fop.layoutmgr.PageBreaker.getNextKnuthElements(PageBreaker.java:142)
> 
>             at 
> org.apache.fop.layoutmgr.AbstractBreaker.getNextBlockList(AbstractBreaker.java:552)
> 
>             at 
> org.apache.fop.layoutmgr.PageBreaker.getNextBlockList(PageBreaker.java:134)
> 
>             at 
> org.apache.fop.layoutmgr.AbstractBreaker.doLayout(AbstractBreaker.java:302)
> 
>             at 
> org.apache.fop.layoutmgr.AbstractBreaker.doLayout(AbstractBreaker.java:264)
> 
>             at 
> org.apache.fop.layoutmgr.PageSequenceLayoutManager.activateLayout(PageSequenceLayoutManager.java:106)
> 
>             at 
> org.apache.fop.area.AreaTreeHandler.endPageSequence(AreaTreeHandler.java:234)
> 
>             at 
> org.apache.fop.fo.pagination.PageSequence.endOfNode(PageSequence.java:120)
> 
>             at 
> org.apache.fop.fo.FOTreeBuilder$MainFOHandler.endElement(FOTreeBuilder.java:332)
> 
>             at 
> org.apache.fop.fo.FOTreeBuilder.endElement(FOTreeBuilder.java:174)
> 
>             at 
> net.sf.saxon.event.ContentHandlerProxy.endElement(ContentHandlerProxy.java:372)
> 
>             at 
> net.sf.saxon.event.ProxyReceiver.endElement(ProxyReceiver.java:171)
> 
>             at 
> net.sf.saxon.event.NamespaceReducer.endElement(NamespaceReducer.java:192)
> 
>             at 
> net.sf.saxon.event.ComplexContentOutputter.endElement(ComplexContentOutputter.java:396)
> 
>             at 
> net.sf.saxon.instruct.ElementCreator.processLeavingTail(ElementCreator.java:243)
> 
>             at 
> net.sf.saxon.instruct.Instruction.process(Instruction.java:91)
> 
>             at 
> net.sf.saxon.expr.LetExpression.process(LetExpression.java:268)
> 
>             at 
> net.sf.saxon.instruct.ForEach.processLeavingTail(ForEach.java:243)
> 
>             at 
> net.sf.saxon.expr.LetExpression.processLeavingTail(LetExpression.java:405)
> 
>             at net.sf.saxon.instruct.Template.expand(Template.java:112)
> 
>             at 
> net.sf.saxon.instruct.CallTemplate.process(CallTemplate.java:212)
> 
>             at 
> net.sf.saxon.instruct.CallTemplate.processLeavingTail(CallTemplate.java:237)
> 
>             at 
> net.sf.saxon.instruct.Block.processLeavingTail(Block.java:365)
> 
>             at 
> net.sf.saxon.instruct.Instruction.process(Instruction.java:91)
> 
>             at 
> net.sf.saxon.instruct.ElementCreator.processLeavingTail(ElementCreator.java:240)
> 
>             at 
> net.sf.saxon.instruct.Template.applyLeavingTail(Template.java:98)
> 
>             at 
> net.sf.saxon.instruct.ApplyTemplates.applyTemplates(ApplyTemplates.java:317)
> 
>             at 
> net.sf.saxon.instruct.ApplyTemplates.defaultAction(ApplyTemplates.java:349)
> 
>             at 
> net.sf.saxon.instruct.ApplyTemplates.applyTemplates(ApplyTemplates.java:310)
> 
>             at 
> net.sf.saxon.Controller.transformDocument(Controller.java:1706)
> 
>             at net.sf.saxon.Controller.transform(Controller.java:1513)
> 
>             at 
> de.dwd.omedes.server.executables.FopExecutor.execute(FopExecutor.java:106)
> 
>             at 
> de.dwd.omedes.server.engine.EngineImpl.executeTaskSync(EngineImpl.java:724)
> 
>             at 
> de.dwd.omedes.server.executables.FsProduce.execute(FsProduce.java:154)
> 
>             at 
> de.dwd.omedes.server.executables.EpmExecute.execute(EpmExecute.java:41)
> 
>             at de.dwd.omedes.server.engine.ExecTask$1.call(ExecTask.java:44)
> 
>             at de.dwd.omedes.server.engine.ExecTask$1.call(ExecTask.java:43)
> 
>             at 
> java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:269)
> 
>             at java.util.concurrent.FutureTask.run(FutureTask.java:123)
> 
>             at 
> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:417)
> 
>             at 
> java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:269)
> 
>             at java.util.concurrent.FutureTask.run(FutureTask.java:123)
> 
>             at 
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
> 
>             at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
> 
>             at java.lang.Thread.run(Thread.java:595)
> 
>             at 
> de.dwd.omedes.server.engine.ExecThread.run(ExecThread.java:65)
> 
>  
> 
> -- 
> 
> 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:Ingo.Maas@ebp.de
> http://www.ebp.de
> 
>  
> 
>  
> 
>  
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Mime
View raw message