Fop
  1. Fop
  2. FOP-1118

FOP SVN TRUNK crashes at inline page manager and Knuth inline box.

    Details

    • Type: Bug Bug
    • Status: Closed
    • Resolution: Fixed
    • Affects Version/s: trunk
    • Fix Version/s: None
    • Component/s: page-master/layout
    • Labels:
      None
    • Environment:
      Operating System: All
      Platform: All
    • External issue ID:
      38053

      Description

      I'm attaching 2docs... 1st crashes FOP with:
      java.lang.ClassCastException: org.apache.fop.layoutmgr.inline.KnuthInlineBox
      cannot be cast to org.apache.fop.layoutmgr.KnuthGlue
      at
      org.apache.fop.layoutmgr.InlineKnuthSequence.addALetterSpace(InlineKnuthSequence.java:124)
      at
      org.apache.fop.layoutmgr.inline.LineLayoutManager.collectInlineKnuthElements(LineLayoutManager.java:727)
      at
      org.apache.fop.layoutmgr.inline.LineLayoutManager.getNextKnuthElements(LineLayoutManager.java:630)
      at
      org.apache.fop.layoutmgr.BlockStackingLayoutManager.getNextKnuthElements(BlockStackingLayoutManager.java:272)
      at
      org.apache.fop.layoutmgr.BlockLayoutManager.getNextKnuthElements(BlockLayoutManager.java:104)
      at
      org.apache.fop.layoutmgr.BlockStackingLayoutManager.getNextKnuthElements(BlockStackingLayoutManager.java:272)
      at
      org.apache.fop.layoutmgr.BlockLayoutManager.getNextKnuthElements(BlockLayoutManager.java:104)
      at
      org.apache.fop.layoutmgr.BlockStackingLayoutManager.getNextKnuthElements(BlockStackingLayoutManager.java:272)
      at
      org.apache.fop.layoutmgr.BlockLayoutManager.getNextKnuthElements(BlockLayoutManager.java:104)
      at
      org.apache.fop.layoutmgr.BlockStackingLayoutManager.getNextKnuthElements(BlockStackingLayoutManager.java:272)
      at
      org.apache.fop.layoutmgr.BlockLayoutManager.getNextKnuthElements(BlockLayoutManager.java:104)
      at
      org.apache.fop.layoutmgr.BlockStackingLayoutManager.getNextKnuthElements(BlockStackingLayoutManager.java:272)
      at
      org.apache.fop.layoutmgr.BlockLayoutManager.getNextKnuthElements(BlockLayoutManager.java:104)
      at
      org.apache.fop.layoutmgr.FlowLayoutManager.getNextKnuthElements(FlowLayoutManager.java:98)
      at
      org.apache.fop.layoutmgr.PageSequenceLayoutManager$PageBreaker.getNextKnuthElements(PageSequenceLayoutManager.java:223)
      at
      org.apache.fop.layoutmgr.AbstractBreaker.getNextBlockList(AbstractBreaker.java:488)
      at
      org.apache.fop.layoutmgr.PageSequenceLayoutManager$PageBreaker.getNextBlockList(PageSequenceLayoutManager.java:215)
      at
      org.apache.fop.layoutmgr.AbstractBreaker.doLayout(AbstractBreaker.java:252)
      at
      org.apache.fop.layoutmgr.AbstractBreaker.doLayout(AbstractBreaker.java:220)
      at
      org.apache.fop.layoutmgr.PageSequenceLayoutManager.activateLayout(PageSequenceLayoutManager.java:147)
      at
      org.apache.fop.area.AreaTreeHandler.endPageSequence(AreaTreeHandler.java:305)
      at
      org.apache.fop.fo.pagination.PageSequence.endOfNode(PageSequence.java:156)
      at org.apache.fop.fo.FOTreeBuilder.endElement(FOTreeBuilder.java:324)
      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:141)
      at org.apache.fop.cli.InputHandler.render(InputHandler.java:101)
      at org.apache.fop.cli.Main.startFOP(Main.java:167)
      at org.apache.fop.cli.Main.main(Main.java:200)

      Second is pushed trough xml tidy and crashed FOP with:
      java.lang.NullPointerException
      at
      org.apache.fop.layoutmgr.AbstractLayoutManager.isLast(AbstractLayoutManager.java:369)
      at
      org.apache.fop.layoutmgr.inline.InlineLayoutManager.addAreas(InlineLayoutManager.java:426)
      at
      org.apache.fop.layoutmgr.inline.LineLayoutManager.addAreas(LineLayoutManager.java:1769)
      at
      org.apache.fop.layoutmgr.BlockLayoutManager.addAreas(BlockLayoutManager.java:381)
      at
      org.apache.fop.layoutmgr.list.ListItemContentLayoutManager.addAreas(ListItemContentLayoutManager.java:164)
      at
      org.apache.fop.layoutmgr.list.ListItemLayoutManager.addAreas(ListItemLayoutManager.java:479)
      at
      org.apache.fop.layoutmgr.list.ListBlockLayoutManager.addAreas(ListBlockLayoutManager.java:192)
      at
      org.apache.fop.layoutmgr.BlockLayoutManager.addAreas(BlockLayoutManager.java:381)
      at
      org.apache.fop.layoutmgr.BlockLayoutManager.addAreas(BlockLayoutManager.java:381)
      at
      org.apache.fop.layoutmgr.AreaAdditionUtil.addAreas(AreaAdditionUtil.java:108)
      at
      org.apache.fop.layoutmgr.FlowLayoutManager.addAreas(FlowLayoutManager.java:289)
      at
      org.apache.fop.layoutmgr.PageSequenceLayoutManager$PageBreaker.addAreas(PageSequenceLayoutManager.java:306)
      at
      org.apache.fop.layoutmgr.AbstractBreaker.addAreas(AbstractBreaker.java:441)
      at
      org.apache.fop.layoutmgr.PageSequenceLayoutManager$PageBreaker.doPhase3(PageSequenceLayoutManager.java:366)
      at
      org.apache.fop.layoutmgr.AbstractBreaker.doLayout(AbstractBreaker.java:296)
      at
      org.apache.fop.layoutmgr.AbstractBreaker.doLayout(AbstractBreaker.java:220)
      at
      org.apache.fop.layoutmgr.PageSequenceLayoutManager.activateLayout(PageSequenceLayoutManager.java:147)
      at
      org.apache.fop.area.AreaTreeHandler.endPageSequence(AreaTreeHandler.java:305)
      at
      org.apache.fop.fo.pagination.PageSequence.endOfNode(PageSequence.java:156)
      at org.apache.fop.fo.FOTreeBuilder.endElement(FOTreeBuilder.java:324)
      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:141)
      at org.apache.fop.cli.InputHandler.render(InputHandler.java:101)
      at org.apache.fop.cli.Main.startFOP(Main.java:167)
      at org.apache.fop.cli.Main.main(Main.java:200)

      Sorry attached files are quite big... however I had no time to seek for certain
      part of FO document that causes the crash.

      1. param.fo.zip
        207 kB
        Adam Strzelecki

        Activity

        Hide
        Adam Strzelecki added a comment -

        Attachment param.fo.zip has been added with description: Bug testcase... 2 FO files crashing FOP.

        Show
        Adam Strzelecki added a comment - Attachment param.fo.zip has been added with description: Bug testcase... 2 FO files crashing FOP.
        Hide
        Manuel Mall added a comment -

        The first problem: CastClassException is already documented in FOP-1105.

        The second problem: NullPointerException is a new issue.

        I'll have a go a fixing both of them (but it won't be pretty...).

        Show
        Manuel Mall added a comment - The first problem: CastClassException is already documented in FOP-1105 . The second problem: NullPointerException is a new issue. I'll have a go a fixing both of them (but it won't be pretty...).
        Hide
        Manuel Mall added a comment -

        The ClassCastException has been fixed as part of FOP-1105.

        For the NPE fix see http://svn.apache.org/viewcvs?rev=359383&view=rev

        I didn't manage to construct a small test case for the NPE. Any attempts to cut
        down the large param-tidy.fo to a reasonable size but still exhibiting the
        problem failed. I must be missing something. Any help / suggestions appreciated.

        Show
        Manuel Mall added a comment - The ClassCastException has been fixed as part of FOP-1105 . For the NPE fix see http://svn.apache.org/viewcvs?rev=359383&view=rev I didn't manage to construct a small test case for the NPE. Any attempts to cut down the large param-tidy.fo to a reasonable size but still exhibiting the problem failed. I must be missing something. Any help / suggestions appreciated.
        Hide
        Glenn Adams added a comment -

        batch transition pre-FOP1.0 resolved+fixed bugs to closed+fixed

        Show
        Glenn Adams added a comment - batch transition pre-FOP1.0 resolved+fixed bugs to closed+fixed

          People

          • Assignee:
            fop-dev
            Reporter:
            Adam Strzelecki
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development