https://issues.apache.org/bugzilla/show_bug.cgi?id=50985
Summary: Block elements inside inline elements that cause a
page break where the next page has a different IPD
causes NullPointerException
Product: Fop
Version: 1.1dev
Platform: PC
OS/Version: Windows XP
Status: NEW
Severity: normal
Priority: P2
Component: page-master/layout
AssignedTo: [email protected]
ReportedBy: [email protected]
The attached test case creates the following NullPointerException:
java.lang.NullPointerException
at
org.apache.fop.layoutmgr.AbstractBreaker.getNextBlockListChangedIPD(AbstractBreaker.java:815)
at
org.apache.fop.layoutmgr.AbstractBreaker.doLayout(AbstractBreaker.java:428)
at org.apache.fop.layoutmgr.PageBreaker.doLayout(PageBreaker.java:90)
at
org.apache.fop.layoutmgr.PageSequenceLayoutManager.activateLayout(PageSequenceLayoutManager.java:107)
at
org.apache.fop.area.AreaTreeHandler.endPageSequence(AreaTreeHandler.java:238)
at
org.apache.fop.fo.pagination.PageSequence.endOfNode(PageSequence.java:120)
at
org.apache.fop.fo.FOTreeBuilder$MainFOHandler.endElement(FOTreeBuilder.java:349)
at org.apache.fop.fo.FOTreeBuilder.endElement(FOTreeBuilder.java:177)
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 embedding.ExampleFO2PDF.convertFO2PDF(ExampleFO2PDF.java:91)
at embedding.ExampleFO2PDF.main(ExampleFO2PDF.java:143)
This error occurs on FOP 1.0 and the latest version from the TRUNK.
The error gets resolved if I remove the text "Page 2", convert the inline to a
block or simply remove the left margin from the simple page master.
After looking into the code it appears that block elements that are inside
inline elements that cause a page break where the next page has a different IPD
is not supported.
The getNextBlockListChangedIPD() function seems to be where it only looks at
for block elements and as a result keeps looking for something it will never
find (since the block is in an inline element).
Thanks
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.