Uploaded image for project: 'FOP'
  1. FOP
  2. FOP-1473

IndexOutOfBoundsException when creating pdf

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Resolution: Fixed
    • 2.5
    • None
    • layout/unqualified
    • None
    • Operating System: All
      Platform: All
    • 44160

    Description

      Hi,

      I create a FO-file from a pretty large docbook-xml (60 pages so far)
      with saxon (or xslt - doesn't matter) whith the docbook-xsl-1.71.1
      stylesheets.
      After that I use fop to convert it to pdf. I used 0.94 and the svn trunk
      version - with both I occasionally run into the error below.

      I was able to track the error down to the attached file
      (http://www.nabble.com/file/p14488145/tmp_sip.xml.fo).
      I tried to delete as much content as possible. If I delete any further paragraph
      of the text, the error doesn't occur any more. Also if I set hyphenation to true
      in my stylesheet, the error goes away.

      I tried it with fop 0.94 and trunk with the same result. For some reason fop
      0.92 doesn't show the error with that file, although it did before with other files.
      I hope that helps somehow to find the error.

      thanks Bjoern

      > 13.12.2007 13:27:30 org.apache.fop.cli.Main startFOP
      > SCHWERWIEGEND: Exception
      > java.lang.IndexOutOfBoundsException: Index: 4, Size: 1
      > at org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:168)
      > at org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:115)
      > at org.apache.fop.cli.Main.startFOP(Main.java:166)
      > at org.apache.fop.cli.Main.main(Main.java:197)
      >
      > ---------
      >
      > java.lang.IndexOutOfBoundsException: Index: 4, Size: 1
      > at java.util.ArrayList.RangeCheck(ArrayList.java:546)
      > at java.util.ArrayList.get(ArrayList.java:321)
      > at
      org.apache.fop.layoutmgr.PageBreakingAlgorithm.computeDemerits(PageBreakingAlgorithm.java:644)
      > at
      org.apache.fop.layoutmgr.BreakingAlgorithm.considerLegalBreak(BreakingAlgorithm.java:737)
      > at
      org.apache.fop.layoutmgr.PageBreakingAlgorithm.considerLegalBreak(PageBreakingAlgorithm.java:309)
      > at
      org.apache.fop.layoutmgr.BreakingAlgorithm.findBreakingPoints(BreakingAlgorithm.java:485)
      > at
      org.apache.fop.layoutmgr.BreakingAlgorithm.findBreakingPoints(BreakingAlgorithm.java:403)
      > at
      org.apache.fop.layoutmgr.AbstractBreaker.doLayout(AbstractBreaker.java:338)
      > at
      org.apache.fop.layoutmgr.AbstractBreaker.doLayout(AbstractBreaker.java:263)
      > at
      org.apache.fop.layoutmgr.PageSequenceLayoutManager.activateLayout(PageSequenceLayoutManager.java:144)
      > at
      org.apache.fop.area.AreaTreeHandler.endPageSequence(AreaTreeHandler.java:233)
      > at
      org.apache.fop.fo.pagination.PageSequence.endOfNode(PageSequence.java:145)
      > at
      org.apache.fop.fo.FOTreeBuilder$MainFOHandler.endElement(FOTreeBuilder.java:378)
      > at org.apache.fop.fo.FOTreeBuilder.endElement(FOTreeBuilder.java:194)
      > at
      org.apache.xalan.transformer.TransformerIdentityImpl.endElement(TransformerIdentityImpl.java:1101)
      > at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source)
      > at
      org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown Source)
      > at
      org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown
      Source)
      > at
      org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
      > at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
      > at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
      > at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
      > at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
      > at
      org.apache.xalan.transformer.TransformerIdentityImpl.transform(TransformerIdentityImpl.java:484)
      > at org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:165)
      > at org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:115)
      > at org.apache.fop.cli.Main.startFOP(Main.java:166)
      > at org.apache.fop.cli.Main.main(Main.java:197)

      Attachments

        1. tmp_sip.xml.fo
          50 kB
          Bjoern

        Activity

          People

            fop-dev@xmlgraphics.apache.org fop-dev
            bhaje@gmx.de Bjoern
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: