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

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

Assertion was added in 
http://svn.apache.org/viewvc?diff_format=h&view=revision&revision=1419183. 
As it happens, none of the test cases added with said patch bothers to check 
the empty block / empty table condition... 
Almost like nobody sees these as valid use cases anymore. ;)

The par sequence in the call that fails consists of:
- a zero-width auxiliary box
- an infinite penalty
- a glue
- a forced break

Only the last element is a legal break, but the penalty's width is zero, so we 
never reach the point where anything gets added to initialColumns, which makes 
the assertion fail.

Not sure what the original intention was, but could be fixed in two ways:
- change the assertion to "initialColumns.size() <= ..."
- change the condition some 20 lines up from "breakLength > idealBreakLength" 
to "breakLength >= idealBreakLength"

My gut would go for the latter, and keep the assertion as is, but that's just 
me...

> AssertionError at BalancingColumnBreakingAlgorithm.getInitialBreaks
> -------------------------------------------------------------------
>
>                 Key: FOP-2481
>                 URL: https://issues.apache.org/jira/browse/FOP-2481
>             Project: FOP
>          Issue Type: Bug
>            Reporter: simon steiner
>         Attachments: exception.fo
>
>
> AssertionError
>       at 
> org.apache.fop.layoutmgr.BalancingColumnBreakingAlgorithm.getInitialBreaks(BalancingColumnBreakingAlgorithm.java:171)
> export FOP_OPTS=-ea
> fop exception.fo out.pdf



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

Reply via email to