xmlgraphics-fop-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matthias Reischenbacher <matthias8...@gmx.at>
Subject Use of soft hyphen causes IllegalArgumentException in some cases
Date Thu, 11 Mar 2010 19:53:47 GMT
Hi,

I think the changes introduced in FOP trunk by the patch of bugzilla 
entry #48071 are causing an IllegalArgumentException in some cases. 
Specifically the exception occurs when a soft hyphen character is used 
and it is surrounded by white spaces. I know that this doesn't make much 
sense because the white space would trigger a linebreak anyway but I 
think it would be better to log a warn message instead of throwing the 
exception.

Attached you'll find a sample fo file which reproduces the error.

Should I add a new bugzilla entry? Can anyone fix this please?

Regards,
Matthias Reischenbacher

The complete stacktrace:
java.lang.IllegalArgumentException: factor < 0; was: -1
	at org.apache.fop.traits.MinOptMax.mult(MinOptMax.java:251)
	at 
org.apache.fop.layoutmgr.inline.TextLayoutManager.processWord(TextLayoutManager.java:825)
	at 
org.apache.fop.layoutmgr.inline.TextLayoutManager.getNextKnuthElements(TextLayoutManager.java:710)
	at 
org.apache.fop.layoutmgr.inline.LineLayoutManager.collectInlineKnuthElements(LineLayoutManager.java:639)
	at 
org.apache.fop.layoutmgr.inline.LineLayoutManager.getNextKnuthElements(LineLayoutManager.java:579)
	at 
org.apache.fop.layoutmgr.BlockStackingLayoutManager.getNextChildElements(BlockStackingLayoutManager.java:571)
	at 
org.apache.fop.layoutmgr.BlockStackingLayoutManager.getNextChildElements(BlockStackingLayoutManager.java:552)
	at 
org.apache.fop.layoutmgr.BlockStackingLayoutManager.getNextKnuthElements(BlockStackingLayoutManager.java:280)
	at 
org.apache.fop.layoutmgr.BlockLayoutManager.getNextKnuthElements(BlockLayoutManager.java:123)
	at 
org.apache.fop.layoutmgr.BlockLayoutManager.getNextKnuthElements(BlockLayoutManager.java:115)
	at 
org.apache.fop.layoutmgr.BlockStackingLayoutManager.getNextChildElements(BlockStackingLayoutManager.java:571)
	at 
org.apache.fop.layoutmgr.BlockStackingLayoutManager.getNextChildElements(BlockStackingLayoutManager.java:552)
	at 
org.apache.fop.layoutmgr.BlockStackingLayoutManager.getNextKnuthElements(BlockStackingLayoutManager.java:280)
	at 
org.apache.fop.layoutmgr.BlockLayoutManager.getNextKnuthElements(BlockLayoutManager.java:123)
	at 
org.apache.fop.layoutmgr.BlockLayoutManager.getNextKnuthElements(BlockLayoutManager.java:115)
	at 
org.apache.fop.layoutmgr.BlockContainerLayoutManager.getNextKnuthElements(BlockContainerLayoutManager.java:287)
	at 
org.apache.fop.layoutmgr.BlockStackingLayoutManager.getNextChildElements(BlockStackingLayoutManager.java:571)
	at 
org.apache.fop.layoutmgr.BlockStackingLayoutManager.getNextChildElements(BlockStackingLayoutManager.java:552)
	at 
org.apache.fop.layoutmgr.BlockStackingLayoutManager.getNextKnuthElements(BlockStackingLayoutManager.java:280)
	at 
org.apache.fop.layoutmgr.BlockLayoutManager.getNextKnuthElements(BlockLayoutManager.java:123)
	at 
org.apache.fop.layoutmgr.BlockLayoutManager.getNextKnuthElements(BlockLayoutManager.java:115)
	at 
org.apache.fop.layoutmgr.BlockStackingLayoutManager.getNextChildElements(BlockStackingLayoutManager.java:571)
	at 
org.apache.fop.layoutmgr.BlockStackingLayoutManager.getNextChildElements(BlockStackingLayoutManager.java:552)
	at 
org.apache.fop.layoutmgr.BlockStackingLayoutManager.getNextKnuthElements(BlockStackingLayoutManager.java:280)
	at 
org.apache.fop.layoutmgr.BlockLayoutManager.getNextKnuthElements(BlockLayoutManager.java:123)
	at 
org.apache.fop.layoutmgr.BlockLayoutManager.getNextKnuthElements(BlockLayoutManager.java:115)
	at 
org.apache.fop.layoutmgr.FlowLayoutManager.getNextChildElements(FlowLayoutManager.java:199)
	at 
org.apache.fop.layoutmgr.FlowLayoutManager.addChildElements(FlowLayoutManager.java:140)
	at 
org.apache.fop.layoutmgr.FlowLayoutManager.addChildElements(FlowLayoutManager.java:129)
	at 
org.apache.fop.layoutmgr.FlowLayoutManager.getNextKnuthElements(FlowLayoutManager.java:70)
	at 
org.apache.fop.layoutmgr.PageBreaker.getNextKnuthElements(PageBreaker.java:216)
	at 
org.apache.fop.layoutmgr.AbstractBreaker.getNextBlockList(AbstractBreaker.java:697)
	at 
org.apache.fop.layoutmgr.PageBreaker.getNextBlockList(PageBreaker.java:149)
	at 
org.apache.fop.layoutmgr.PageBreaker.getNextBlockList(PageBreaker.java:132)
	at 
org.apache.fop.layoutmgr.AbstractBreaker.doLayout(AbstractBreaker.java:341)
	at org.apache.fop.layoutmgr.PageBreaker.doLayout(PageBreaker.java:85)
	at 
org.apache.fop.layoutmgr.PageSequenceLayoutManager.activateLayout(PageSequenceLayoutManager.java:107)
	at 
org.apache.fop.area.AreaTreeHandler.endPageSequence(AreaTreeHandler.java:238)
	at 
org.apache.fop.fo.pagination.PageSequence.endOfNode(PageSequence.java:120)
	at 
org.apache.fop.fo.FOTreeBuilder$MainFOHandler.endElement(FOTreeBuilder.java:349)
	at org.apache.fop.fo.FOTreeBuilder.endElement(FOTreeBuilder.java:177)

Mime
View raw message