You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-dev@xmlgraphics.apache.org by Keiron Liddle <ke...@aftexsw.com> on 2000/09/30 07:26:03 UTC

Re: [BUG] and WARNING : read this !!!

After reading the warning I now know why it was stuck in the infinite loop. There is
a serious problem with a 'break-after="page"' inside a block in a table. This causes
FOP to keep creating more and more pages, as a result the JVM keeps using more
memory, in the case of a unix machine this could cause it to run out of memory  and
crash (isn't unix great sometimes).

So the bugs are:
- if a static region contains data that overflows the area it causes an
"ArrayIndexOutOfBoundsException" due to being layed out twice and the overflow
setting the start text position to -1
- putting a page break in a table causes an infinite loop.


Keiron Liddle wrote:

> After a bit of a look at your fo file I have a better idea of what is
> causing the
> problem, although I'm still not sure what is the ultimate cause.
>
> In the class FOText the variable 'this.marker' is -1 when it is adding
> text to the
> BlockArea. From my reading of the code this can only hapen if the FOText
> object is
> being layed out twice (ie. layout() is being called twice).
> It seems a Static area is being layed out for each page, which may be
> causing the
> problem.
>
> I could not easily read the file since the lines are extremely long,
> maybe you
> could try adding some more line breaks in the fo file.
>
> I tried removing all the static regions. The file no longer seemed to
> have the same problem. BUT the rest of the file seemed to cause fop to
> go into an infinite loop (after 20,000 pages I gave up). I'm guessing
> there is a problem with the tables.
>
> I don't know the code well enough to fix the array problem properly.
>
> Your best option may be to restructure the fo file.
>
> MARTIN Paul wrote:
>
> > When I run the attached file through FOP, I get the following error. Please
> > note that as suggested in
> > a reply to a previous posting, I have increased the memory size by using
> > -mx100m (and even -mx200m),
> > but I still get the same error.
> > HELP !!!!!!
> > Thanks very much in advance.
> >                                         Regards
> >                                            Paul
> >
> > Task Fop - FATAL ERROR:0
> > java.lang.ArrayIndexOutOfBoundsException: 0
> >         at org.apache.fop.layout.LineArea.addText(Compiled Code)
> >         at org.apache.fop.layout.BlockArea.addText(Compiled Code)
> >         at org.apache.fop.fo.FOText.layout(Compiled Code)
> >         at org.apache.fop.fo.flow.Block.layout(Compiled Code)
> >         at org.apache.fop.fo.flow.StaticContent.layout(Compiled Code)
> >         at org.apache.fop.fo.pagination.PageSequence.format(Compiled Code)
> >         at org.apache.fop.fo.pagination.Root.format(Compiled Code)
> >         at org.apache.fop.fo.FOTreeBuilder.format(FOTreeBuilder.java:295)
> >         at org.apache.fop.apps.Driver.format(Driver.java:380)
> >         at XMLGeneration.CEDFleets.CEDFleetsXMLGenerator.run(Compiled Code)
> >
> >  <<10046709090068980731.fot>>
> >
> >   ------------------------------------------------------------------------
> >                                Name: 10046709090068980731.fot
> >    10046709090068980731.fot    Type: unspecified type (application/octet-stream)
> >                            Encoding: quoted-printable