Summary: PageBreakingAlgorithm endless loop
           Product: Fop
           Version: 0.95
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: major
          Priority: P2
         Component: general

The createFootnotePages(KnuthPageNode lastNode) method can go to an endless
Check this part from line 818:

while (insertedFootnotesLength < totalFootnotesLength) {
   final int tmpLength = ((Integer)
   // try adding some more content
   if ((tmpLength - insertedFootnotesLength) <= availableBPD) {
      // add a whole footnote
      availableBPD -= tmpLength - insertedFootnotesLength;
      insertedFootnotesLength = tmpLength;
      footnoteElementIndex = getFootnoteList(footnoteListIndex).size() - 1;

Most of the times it works OK, but if tmpLength=insertedFootnotesLength, the
while loop will never end. It can happen, I transformed a document where this
while cycle never stop.

I put this line into the while cycle:

if (tmpLength == insertedFootnotesLength) {

Now it works fine, but I do not know if it gives a correct result in every


Configure bugmail:
------- You are receiving this mail because: -------
You are the assignee for the bug.

Reply via email to