Bug 8778 - Infinite loop while rendering list-block
Summary: Infinite loop while rendering list-block
Status: CLOSED FIXED
Alias: None
Product: Fop - Now in Jira
Classification: Unclassified
Component: general (show other bugs)
Version: 0.20.3
Hardware: All other
: P3 normal
Target Milestone: ---
Assignee: fop-dev
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-05-03 15:29 UTC by J.Pietschmann
Modified: 2012-04-01 06:37 UTC (History)
0 users



Attachments
Testcase FO file (1.77 KB, text/plain)
2002-05-03 15:30 UTC, J.Pietschmann
Details
Same document as original poster, but doesn't break FOP (1.75 KB, text/plain)
2002-05-03 15:56 UTC, J. Rhett Aultman
Details
Simple FO that shows the attribute breaking FOP (463 bytes, text/plain)
2002-05-03 15:59 UTC, J. Rhett Aultman
Details
Proposed patch (diff -u) (1.05 KB, patch)
2002-11-27 21:06 UTC, J. Rhett Aultman
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description J.Pietschmann 2002-05-03 15:29:15 UTC
The attached testcase causes FOP to loop infinitely.
Comment 1 J.Pietschmann 2002-05-03 15:30:59 UTC
Created attachment 1774 [details]
Testcase FO file
Comment 2 J. Rhett Aultman 2002-05-03 15:54:44 UTC
I don't think this is actually being caused by the list-block.  I was able to 
stop the infinite looping by removing the space-before="85mm" attribute from 
the first block in the document.  I'm attaching my "doesn't break" document.
Comment 3 J. Rhett Aultman 2002-05-03 15:56:01 UTC
Created attachment 1775 [details]
Same document as original poster, but doesn't break FOP
Comment 4 J. Rhett Aultman 2002-05-03 15:57:14 UTC
Additionally, the infinite loop persisted on another document that had no list 
at all, but just the block with the aforementioned attribute.  I'm also 
attaching that document.
Comment 5 J. Rhett Aultman 2002-05-03 15:59:07 UTC
Created attachment 1776 [details]
Simple FO that shows the attribute breaking FOP
Comment 6 J. Rhett Aultman 2002-05-03 17:51:47 UTC
Further tests show that 85mm is the threshhold size for for space-before 
attribute in this case.  When it was changed to 84mm in the test document, it 
rendered fine.  Likewise, it also worked fine in the super-simple test I posted 
earlier.  What I suspect is happening is that FOP is attempting to place the 
leading block while honoring its space-before attrubute, but the test for break 
is leading FOP to try and reposition the block on the next page.  The block 
naturally spills off the next page, leading FOP to try again...ad nauseum.  
This can be fixed with the addition of some logic to see if FOP is trying to 
reposition the entire element as it would be in this case and to either choose 
not to honor the space-before attribute after the second try (or maybe it just 
gives up after the second try, since the block is a natural conundrum that 
can't be handled effectively).
Comment 7 J. Rhett Aultman 2002-11-27 21:05:19 UTC
Patch supplied (I hope I did things right with diff).  This causes the infinite 
loop to terminate for both cases of bug 8778 and cause no abnormal halts of 
processing on the examples.  Since no layout is manipulated (it just halts 
processing), this should be enough testing.
Comment 8 J. Rhett Aultman 2002-11-27 21:06:18 UTC
Created attachment 3975 [details]
Proposed patch (diff -u)
Comment 9 Christian Geisert 2002-11-28 15:29:32 UTC
Committed, thank you.

Patch did not work, I had to apply it manually (no problem in this case,
looks like your changes weren't againt current cvs)

Best thing is to work with current cvs, make your changes and then
cvs diff -u > coolpatch.diff
Comment 10 Glenn Adams 2012-04-01 06:37:28 UTC
batch transition pre-FOP1.0 resolved+fixed bugs to closed+fixed