xmlgraphics-fop-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vincent Hennebert <vhenneb...@gmail.com>
Subject Re: assertion error during LayoutEngineTestCase
Date Tue, 20 Dec 2011 17:31:15 GMT
On 19/12/11 22:07, Glenn Adams wrote:
> If junit is run with assertions enabled (and they should always be enabled
> during junit, but are not configured that way in the standard build.xml
> invocations),

I wanted to do that some time ago but was facing this same
AssertionError.


> then an assertion occurs at:
> 
> PageBreakingAlgorithm(BreakingAlgorithm).getLineWidth(int) line: 1393
> PageBreakingAlgorithm.getLineWidth(int) line: 1084
> ...
> LayoutEngineTestCase.runTest() line: 160
> 
> due to lineWidth being negative (-2000 in this case)
> 
> while running the following test file:
> 
> test/layoutengine/standard-testcases/block-container_reference-orientation_bug36391.xml
> 
> I can't tell readily when the assertion failure appeared in trunk,

Back then I did a git bisect and identified the commit that introduced
the regression to be rev. 1069154:
http://svn.apache.org/viewvc?revision=1069154&view=revision


> since
> assertions have not normally been enabled when running junit; however, it
> looks like the assertion was added at:
> 
> Revision *808157*<http://svn.apache.org/viewvc?diff_format=h&view=revision&revision=808157>
> -
> (*show annotations*<http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/BreakingAlgorithm.java?annotate=808157&diff_format=h>)
> (*download*<http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/BreakingAlgorithm.java?revision=808157&view=co>
> )
> *Wed Aug 26 18:50:10 2009 UTC* (2 years, 3 months ago) by *vhennebert*
> File size: 54321 byte(s)
> 
> Merged back ChangingIPDHack branch into Trunk
> 
> 
> It would be nice if assertions were enabled by default when running junit;
> also, it would be useful if someone could fix the above test case so there
> are no assertions when running junit on LayoutEngineTestCase.

I haven’t had time to find out exactly what the changes are breaking.
There is something fishy in BlockContainerLM.makeChildLayoutContext
whose code doesn’t everywhere match what it is supposed to replace.

I’m tempted to revert the whole commit but I’m not sure it’s
self-contained (i.e., that related changes don’t appear in other
commits). Besides, a quick attempt introduced conflicts.

But yes, I agree that assertions should be enabled when running JUnit.

Vincent

Mime
View raw message