[
https://issues.apache.org/jira/browse/FOP-1749?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13776489#comment-13776489
]
Alexey Neyman commented on FOP-1749:
------------------------------------
Hi Vincent,
This is the separate issue I mentioned above: it does appear in the Area Tree,
but the footnote has
incorrect top-offset value (bpd size of the viewport/region is 50000):
<footnote top-offset="38000">
<block ipd="240000" bpd="12000" ipda="240000" bpda="32000" bap="0 0 0 0"
space-before="20000">
This happens even if footnote splitting is not considered, i.e. when this
infinite loop is not
triggered, both with and without this patch - which is why I believe this is a
separate issue.
I think it's probably a bug somewhere in addAreas, but I am yet to look at that
code.
As to the glue: as I indicated in the comment, above, this glue element is
following a dummy box
(one with zero width). As far as I understand, this is FOP's way of describing
a retained space
at the beginning of a sequence. Would it be more appropriate instead to set
boxPreceding to true
only for boxes of non-zero width, as follows?
if (element.isBox()) {
// element is a box
splitLength += element.getWidth();
if (splitLength > prevSplitLength) {
// and it is non-empty
boxPreceding = true;
somethingAdded = true;
}
} else if (element.isGlue()) {
// element is a glue
if (boxPreceding) {
// end of the sub-sequence
index = noteListIterator.previousIndex();
break;
}
boxPreceding = false;
splitLength += element.getWidth();
} else {
And by the way, could you also review/check in the patch in FOP-2106, another
footnote-related issue?
> [PATCH] infinite loop in footnotes (see also #47424)
> ----------------------------------------------------
>
> Key: FOP-1749
> URL: https://issues.apache.org/jira/browse/FOP-1749
> Project: Fop
> Issue Type: Bug
> Components: page-master/layout
> Affects Versions: trunk
> Environment: Operating System: Windows XP
> Platform: PC
> Reporter: Heidi Vanparys
> Attachments: bug47424.patch, c.fo, fop-1749.diff
>
>
> This patch solves the problem of an infinite loop in footnotes as reported in
> FOP-1678.
> The infinite loop occurred in
> org.apache.fop.layoutmgr.PageBreakingAlgorithm.getFootnoteSplit(int, int,
> int, int, boolean).
> This patch does not solve the problem of another infinite loop in footnotes
> as reported in bugs 48063 and 48162. This infinite loop occurs in
> org.apache.fop.layoutmgr.PageBreakingAlgorithm.createFootnotePages(KnuthPageNode).
> The test attached to 48063 is converted to a testcase and added to the list
> of disabled testcases.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira