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

[PATCH] NPE on combination of ZWSP, NBSP and <fo:inline>

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 2.6
    • None
    • renderer/pdf
    • None
    • Linux SLES 11 running on Intel x86_64

    Description

      The following line in my XSL:FO reliably causes a NPE when generating a PDF:

       

      <fo:inline>&#x200B;<fo:inline>&#xA0;</fo:inline>x</fo:inline> 

      Removing any single element of this line makes the NPE go away:

       

      • The outer <fo:inline>
      • The Zero-Width Space
      • The inner <fo:inline>
      • The Non-Breaking Space
      • The "x" text

      (My actual document has more content within the outer <fo:inline>; I just removed everything else to provide the minimum content needed to reproduce the NPE.)

      The NPE is reported as:

       

      SEVERE: Exception
      org.apache.fop.apps.FOPException
      java.lang.NullPointerException
              at org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:296)
              at org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:116)
              at org.apache.fop.cli.Main.startFOP(Main.java:183)
              at org.apache.fop.cli.Main.main(Main.java:214)
      Caused by: java.lang.NullPointerException
      ... 

       

      The complete FOP output is attached as fop.log.

      The complete input XSL:F0 is attached as bad.fo. The line of interest is near the bottom of the file. I have placed a comment above it listing several variations of the line with each element removed one at a time. Any of those alternatives prevents the NPE from occurring.

      My command line is:

       

      fop/fop-2.6/fop/fop -c WD/fop-config.xml -fo bad.fo bad.pdf 2>&1 | tee fop.log

      My FOP config file is attached as fop-config.xml.

       

       

       

      Attachments

        1. fop.log
          10 kB
          Paul Katz
        2. bad.fo
          12 kB
          Paul Katz
        3. fop-config.xml
          0.4 kB
          Paul Katz
        4. patch-FOP-3035-8.diff
          5 kB
          J Frank

        Activity

          People

            jagruti.frank@gmail.com J Frank
            polecat Paul Katz
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: