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 MARTIN Paul <pa...@rta.nsw.gov.au> on 2000/09/27 10:54:07 UTC

[BUG]

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>> 


Re: [BUG]

Posted by Hani Elabed <ha...@elabed.net>.
Stefano,
I have seen this a while ago..
If my memory still serves, I think it has to do
with region-before and region after overflowing, i.e taking
more area than is allocated for them..
my 2 centimes.
Hani

Stefano Mazzocchi wrote:

> 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)
>
> I've been bugged by ArrayIndexOutOfBoundsException as well, but was not
> really able to reproduce it or understand what was going on .... sounds
> like a problem with area overflow BTW....
>
> Sorry but I don't have any more indication :(
>
> --
> Stefano Mazzocchi      One must still have chaos in oneself to be
>                           able to give birth to a dancing star.
> <st...@apache.org>                             Friedrich Nietzsche
> --------------------------------------------------------------------
>  Missed us in Orlando? Make it up with ApacheCON Europe in London!
> ------------------------- http://ApacheCon.Com ---------------------


Re: [BUG]

Posted by Stefano Mazzocchi <st...@apache.org>.
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)

I've been bugged by ArrayIndexOutOfBoundsException as well, but was not
really able to reproduce it or understand what was going on .... sounds
like a problem with area overflow BTW....

Sorry but I don't have any more indication :(

-- 
Stefano Mazzocchi      One must still have chaos in oneself to be
                          able to give birth to a dancing star.
<st...@apache.org>                             Friedrich Nietzsche
--------------------------------------------------------------------
 Missed us in Orlando? Make it up with ApacheCON Europe in London!
------------------------- http://ApacheCon.Com ---------------------

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

Posted by Keiron Liddle <ke...@aftexsw.com>.
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


Re: [BUG]

Posted by Keiron Liddle <ke...@aftexsw.com>.
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