Bug 12262 - Lacking detection of endless loops
Summary: Lacking detection of endless loops
Status: CLOSED FIXED
Alias: None
Product: Fop - Now in Jira
Classification: Unclassified
Component: pdf (show other bugs)
Version: 0.20.4
Hardware: PC other
: P3 minor
Target Milestone: ---
Assignee: fop-dev
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-09-03 15:21 UTC by E. Michael Akerman
Modified: 2012-04-01 07:10 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description E. Michael Akerman 2002-09-03 15:21:56 UTC
On a "simple-page-master" if the sum of "margin-top" and the "margin-bottom" is 
equal to or greater than the "page-height", Apache FOP will get stuck in an 
endless loop, continually generating pages in an attempt to add content that 
will never fit.  Now clearly this is a user error, but FOP should make efforts 
to detect this scenario.  

Similarly, I would suspect that if the sum of "margin-left" and "margin-right" 
is equal to or greater than "page-width" another endless loop is caused.  I've 
not tested this scenario, though
Comment 1 J. Rhett Aultman 2002-09-03 15:30:42 UTC
This bug has some relationships to bug #8778 which I've offered some commentary 
on.  The same problem may be occurring in each case- a FO document is being 
generated such that some single element is spilling over the pagebreak, causing 
FOP to put it on a new page, where it then spills over the pagebreak...ad 
nauseum.  The comments in bug #8778 were for FOP 0.20.3, but the bug hasn't 
been assigned or resolved, so it's probably valid in FOP 0.20.4.  Any attempt 
at addressing this issue of the infinite looping should address both the cases 
mentioned here and in bug #8778 as well.

Possibly a simple solution is to track whether or not FOP tries to position the 
same object on a new page more than twice?  The moment an object is placed on a 
fresh, new page and cannot fit, there is no need to continue- no future pages 
are going to fit it, either.
Comment 2 J. Rhett Aultman 2002-11-30 20:51:05 UTC
The fix for bug #8778 should aid with this issue, though without real testing, 
that's only speculation.  Thus far, it has caused loop termination in the other 
infinite looping bugs.
Comment 3 Pascal Sancho 2007-10-23 07:31:54 UTC
Bug fixed in latest Trunk (rev 584703), and probably in FOP 0.94
Comment 4 Glenn Adams 2012-04-01 07:10:25 UTC
batch transition pre-FOP1.0 resolved+fixed bugs to closed+fixed