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 bu...@apache.org on 2012/09/02 17:36:14 UTC

[Bug 53817] New: java.lang.NullPointerException

https://issues.apache.org/bugzilla/show_bug.cgi?id=53817

          Priority: P2
            Bug ID: 53817
          Assignee: fop-dev@xmlgraphics.apache.org
           Summary: java.lang.NullPointerException
          Severity: normal
    Classification: Unclassified
                OS: Linux
          Reporter: mathieu.malaterre@gmail.com
          Hardware: PC
            Status: NEW
           Version: 1.0
         Component: pdf
           Product: Fop

Created attachment 29317
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=29317&action=edit
generated fo file

Hi,

I cannot process the following dobbook slides:


<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE slides PUBLIC "-//Norman Walsh//DTD Slides XML V3.4.0//EN"
"http://docbook.sourceforge.net/release/slides/3.4.0/schema/dtd/slides-full.dtd">
<slides>
  <foil>
  <title>My Title<footnote><para><ulink
url="http://www.example.com/"/></para></footnote></title>
  <para/>
  </foil>
</slides>


it keeps on failing with:

$ xsltproc -o t.fo /usr/share/xml/docbook/custom/slides/3.4.0/xsl/fo/plain.xsl
s.xml
$ fop t.fo t.pdf 
Image not found. URI: images/draft.png. (See position 2:9711)
Image not found. URI: images/draft.png. (See position 2:10376)
Image not found. URI: images/draft.png. (See position 2:11039)
Image not found. URI: images/draft.png. (See position 2:11699)
Image not found. URI: images/draft.png. (See position 2:12356)
Image not found. URI: images/draft.png. (See position 2:13013)
Image not found. URI: images/draft.png. (See position 2:13667)
Image not found. URI: images/draft.png. (See position 2:14326)
Image not found. URI: images/draft.png. (See position 2:14985)
Image not found. URI: images/draft.png. (See position 2:15641)
Image not found. URI: images/draft.png. (See position 2:16299)
Image not found. URI: images/draft.png. (See position 2:16957)
Image not found. URI: images/draft.png. (See position 2:17612)
Image not found. URI: images/draft.png. (See position 2:18270)
Image not found. URI: images/draft.png. (See position 2:18928)
Image not found. URI: images/draft.png. (See position 2:19583)
Image not found. URI: images/draft.png. (See position 2:20242)
Image not found. URI: images/draft.png. (See position 2:20901)
Image not found. URI: images/draft.png. (See position 2:21557)
Exception
java.lang.NullPointerException

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 53817] java.lang.NullPointerException

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=53817

--- Comment #1 from Glenn Adams <ga...@apache.org> ---
just verified this on dev trunk, the full backtrace is


java.lang.NullPointerException
        at
org.apache.fop.layoutmgr.PageBreakingAlgorithm.handleFootnotes(PageBreakingAlgorithm.java:370)
        at
org.apache.fop.layoutmgr.PageBreakingAlgorithm.handleBox(PageBreakingAlgorithm.java:319)
        at
org.apache.fop.layoutmgr.BreakingAlgorithm.handleElementAt(BreakingAlgorithm.java:751)
        at
org.apache.fop.layoutmgr.BreakingAlgorithm.findBreakingPoints(BreakingAlgorithm.java:554)
        at
org.apache.fop.layoutmgr.BreakingAlgorithm.findBreakingPoints(BreakingAlgorithm.java:503)
        at
org.apache.fop.layoutmgr.AbstractBreaker.doLayout(AbstractBreaker.java:421)
        at
org.apache.fop.layoutmgr.StaticContentLayoutManager.doLayout(StaticContentLayoutManager.java:144)
        at
org.apache.fop.layoutmgr.PageSequenceLayoutManager.layoutSideRegion(PageSequenceLayoutManager.java:180)
        at
org.apache.fop.layoutmgr.PageSequenceLayoutManager.finishPage(PageSequenceLayoutManager.java:186)
        at
org.apache.fop.layoutmgr.PageSequenceLayoutManager.activateLayout(PageSequenceLayoutManager.java:115)
        at
org.apache.fop.area.AreaTreeHandler.endPageSequence(AreaTreeHandler.java:267)
        at
org.apache.fop.fo.pagination.PageSequence.endOfNode(PageSequence.java:128)
        at
org.apache.fop.fo.FOTreeBuilder$MainFOHandler.endElement(FOTreeBuilder.java:347)
        at org.apache.fop.fo.FOTreeBuilder.endElement(FOTreeBuilder.java:181)
        at
org.apache.xalan.transformer.TransformerIdentityImpl.endElement(TransformerIdentityImpl.java:1101)
        at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown
Source)
        at org.apache.xerces.xinclude.XIncludeHandler.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.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown
Source)
        at
org.apache.xalan.transformer.TransformerIdentityImpl.transform(TransformerIdentityImpl.java:484)
        at org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:285)
        at org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:115)
        at org.apache.fop.cli.Main.startFOP(Main.java:177)
        at org.apache.fop.cli.Main.main(Main.java:208)

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 53817] java.lang.NullPointerException

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=53817

Glenn Adams <ga...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |adelmelle@apache.org

--- Comment #2 from Glenn Adams <ga...@apache.org> ---
looks like this code was last modified by Andreas in

http://svn.apache.org/viewvc?view=revision&revision=1067762

Andreas would you have time to take a look at this?

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 53817] java.lang.NullPointerException

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=53817

Pascal Sancho <ps...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #29317|0                           |1
        is obsolete|                            |

--- Comment #3 from Pascal Sancho <ps...@gmail.com> ---
Created attachment 29318
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=29318&action=edit
Minimal test case

The NPE is thrown when foot-note is declared within the static-before region.
If I move the foot-note to the body, the NPE disappears.

Note that FOP behaves in the same way whatever the version is (tried against
v0.95, v1.0, latest trunk).

That said, IMHO I don't think that a static region is the right place for a
footnote declaration, so author should avoid to use that at this place, as a
good practice/workaround.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 53817] FOP throws NPE if a foot-note is declared within a static-region

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=53817

Pascal Sancho <ps...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|java.lang.NullPointerExcept |FOP throws NPE if a
                   |ion                         |foot-note is declared
                   |                            |within a static-region

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 53817] FOP throws NPE if a foot-note is declared within a static-region

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=53817

Mathieu Malaterre <ma...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #4 from Mathieu Malaterre <ma...@gmail.com> ---
As per comment on:

https://lists.oasis-open.org/archives/docbook-apps/201209/msg00062.html

This is a bug in the original fo generator (docbook). Closing issue as fixed.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 53817] FOP throws NPE if a foot-note is declared within a static-region

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=53817

Pascal Sancho <ps...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|FIXED                       |---

--- Comment #5 from Pascal Sancho <ps...@gmail.com> ---
FOP should throw/warn a more explicit Exception/message than throwing NPE in
this case.
So, I reopen it as a reminder.

-- 
You are receiving this mail because:
You are the assignee for the bug.