You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by Mark Ivs <ma...@yahoo.com> on 2004/02/02 02:54:01 UTC

FOP - infinite loop problem

    I encountered an endless loop problem in the
addRealText method in FOText.java. "la.addText" in the
while loop always returns 0. So the while statement
goes into an endless loop. The way I fixed the problem
is by adding a counter inside the while loop and once
it exceeds the threshold (I set it to 50) I throw a
FOP Exception.
    Has anyone else encountered this problem before ?
Is this problem already reported in FOP bug list ?
    Also, please let me know if there is a better
solution to fix this problem.
I really appreciate your help.

I am using FOP0.20.5. This problem dosen't happen
everytime. It happens only with certain data in the
XML. So, not sure what triggers this.

One thing to note. I have hyphenate="true" in one of
the fo:block. When I remove the hyphenate property,
FOP never goes into endless loop.

Thanks.   

__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free web site building tool. Try it!
http://webhosting.yahoo.com/ps/sb/

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org


Re: FOP - infinite loop problem

Posted by Chris Bowditch <bo...@hotmail.com>.
Mark Ivs wrote:

>     I encountered an endless loop problem in the
> addRealText method in FOText.java. "la.addText" in the
> while loop always returns 0. So the while statement
> goes into an endless loop. The way I fixed the problem
> is by adding a counter inside the while loop and once
> it exceeds the threshold (I set it to 50) I throw a
> FOP Exception.
>     Has anyone else encountered this problem before ?

yes weve seen this problem a few times before.

> Is this problem already reported in FOP bug list ?

take a look at:

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21641

>     Also, please let me know if there is a better
> solution to fix this problem.
> I really appreciate your help.
> 
> I am using FOP0.20.5. This problem dosen't happen
> everytime. It happens only with certain data in the
> XML. So, not sure what triggers this.

Usually when your data is too big for a small area (like a table-cell)

> One thing to note. I have hyphenate="true" in one of
> the fo:block. When I remove the hyphenate property,
> FOP never goes into endless loop.

Chris



---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org