Loading ...
Sorry, an error occurred while loading the content.

4888Re: [XSL-FO] PageSequence.java endless loop problem

Expand Messages
  • Chris Bowditch
    Feb 4, 2004
    • 0 Attachment
      Mark Ivs wrote:
      > Hello,
      > I encountered an endless loop problem in the
      > "format" method in PageSequence.java. There is a
      > do-while statement in that method which always sets
      > the status to 3 in my case, so the while loop never
      > terminates. I looked at the FOP bug report, and I
      > couldn't find any bug reported about this issue. Has
      > anyone experienced this problem ?

      Your question is very specific to FOP, and would be better suited to the
      fop-user list.

      > Whats the best way to fix this problem ?
      > This is what I tried.....
      > I can set a counter inside the while loop and if it
      > exceeded the threshold value(I set it 50), then set
      > the status to 1 ? When I did this, the endless loop
      > didn't happen. But I noticed the data was duplicated
      > numerous times in the generated PDF.

      To find a solution, you need to look at exactly what causes this
      infinite loop to be entered in the first place.

      > I am not a java expert and since I don't understand
      > FOP code in detail, I would really appreciate your
      > suggestions.
      > I am using FOP0.20.5. This problem happens only with
      > certain data in the xml.

      You need to try and identify the certain data. Infinite loops can happen
      in FOP when you have some data that is too big for a fixed Area. In
      which case, just having a counter inside the loop you mention above is
      not going to "fix" this issue. It may prevent the infinite loop, but the
      output will not be as expected. Instead you are going to need to find
      what the exact scenario is that causes the loop, and then put an if
      statement in the layout to detect the particular scenario you are
      hitting, and add some code to shrink/truncate the data.

    • Show all 2 messages in this topic