Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Duplicate
-
2.5, 2.4
-
None
-
None
Description
Starting with 2.4 printing an FO results in a NPE:
Jul 09, 2020 7:56:37 PM org.apache.fop.events.LoggingEventListener processEvent WARNING: The following feature isn't implemented by Apache FOP, yet: table-layout="auto" (on fo:table) (See position 37:11) Jul 09, 2020 7:56:37 PM org.apache.fop.events.LoggingEventListener processEvent WARNING: The following feature isn't implemented by Apache FOP, yet: table-layout="auto" (on fo:table) (See position 297:11) Jul 09, 2020 7:56:37 PM org.apache.fop.events.LoggingEventListener processEvent WARNING: The following feature isn't implemented by Apache FOP, yet: table-layout="auto" (on fo:table) (See position 557:11) Jul 09, 2020 7:56:37 PM org.apache.fop.events.LoggingEventListener processEvent WARNING: The following feature isn't implemented by Apache FOP, yet: table-layout="auto" (on fo:table) (See position 817:11) Jul 09, 2020 7:56:37 PM org.apache.fop.events.LoggingEventListener processEvent WARNING: The following feature isn't implemented by Apache FOP, yet: table-layout="auto" (on fo:table) (See position 1065:11) Jul 09, 2020 7:56:37 PM org.apache.fop.events.LoggingEventListener processEvent WARNING: The contents of fo:block line 9 exceed the available area in the inline-progression direction by 7012 millipoints. (See position 568:13) Jul 09, 2020 7:56:46 PM org.apache.fop.cli.Main startFOP SEVERE: Exception org.apache.fop.apps.FOPException: java.lang.NullPointerException 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 at org.apache.fop.render.AbstractRenderer.renderMainReference(AbstractRenderer.java:527) at org.apache.fop.render.AbstractRenderer.renderBodyRegion(AbstractRenderer.java:433) at org.apache.fop.render.AbstractRenderer.renderRegionViewport(AbstractRenderer.java:380) at org.apache.fop.render.AbstractRenderer.renderPageAreas(AbstractRenderer.java:345) at org.apache.fop.render.java2d.Java2DRenderer.print(Java2DRenderer.java:1008) at java.desktop/sun.print.RasterPrinterJob.printPage(RasterPrinterJob.java:2275) at java.desktop/sun.print.RasterPrinterJob.print(RasterPrinterJob.java:1654) at java.desktop/sun.print.RasterPrinterJob.print(RasterPrinterJob.java:1484) at org.apache.fop.render.print.PrintRenderer.stopRenderer(PrintRenderer.java:137) at org.apache.fop.area.RenderPagesModel.endDocument(RenderPagesModel.java:265) at org.apache.fop.area.AreaTreeHandler.endDocument(AreaTreeHandler.java:342) at org.apache.fop.fo.FOTreeBuilder.endDocument(FOTreeBuilder.java:170) at org.apache.xalan.transformer.TransformerIdentityImpl.endDocument(TransformerIdentityImpl.java:963) at org.apache.xerces.parsers.AbstractSAXParser.endDocument(Unknown Source) at org.apache.xerces.xinclude.XIncludeHandler.endDocument(Unknown Source) at org.apache.xerces.impl.XMLDocumentScannerImpl.endEntity(Unknown Source) at org.apache.xerces.impl.XMLEntityManager.endEntity(Unknown Source) at org.apache.xerces.impl.XMLEntityScanner.load(Unknown Source) at org.apache.xerces.impl.XMLEntityScanner.skipSpaces(Unknown Source) at org.apache.xerces.impl.XMLDocumentScannerImpl$TrailingMiscDispatcher.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:485) at org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:293) ... 3 more --------- java.lang.NullPointerException at org.apache.fop.render.AbstractRenderer.renderMainReference(AbstractRenderer.java:527) at org.apache.fop.render.AbstractRenderer.renderBodyRegion(AbstractRenderer.java:433) at org.apache.fop.render.AbstractRenderer.renderRegionViewport(AbstractRenderer.java:380) at org.apache.fop.render.AbstractRenderer.renderPageAreas(AbstractRenderer.java:345) at org.apache.fop.render.java2d.Java2DRenderer.print(Java2DRenderer.java:1008) at java.desktop/sun.print.RasterPrinterJob.printPage(RasterPrinterJob.java:2275) at java.desktop/sun.print.RasterPrinterJob.print(RasterPrinterJob.java:1654) at java.desktop/sun.print.RasterPrinterJob.print(RasterPrinterJob.java:1484) at org.apache.fop.render.print.PrintRenderer.stopRenderer(PrintRenderer.java:137) at org.apache.fop.area.RenderPagesModel.endDocument(RenderPagesModel.java:265) at org.apache.fop.area.AreaTreeHandler.endDocument(AreaTreeHandler.java:342) at org.apache.fop.fo.FOTreeBuilder.endDocument(FOTreeBuilder.java:170) at org.apache.xalan.transformer.TransformerIdentityImpl.endDocument(TransformerIdentityImpl.java:963) at org.apache.xerces.parsers.AbstractSAXParser.endDocument(Unknown Source) at org.apache.xerces.xinclude.XIncludeHandler.endDocument(Unknown Source) at org.apache.xerces.impl.XMLDocumentScannerImpl.endEntity(Unknown Source) at org.apache.xerces.impl.XMLEntityManager.endEntity(Unknown Source) at org.apache.xerces.impl.XMLEntityScanner.load(Unknown Source) at org.apache.xerces.impl.XMLEntityScanner.skipSpaces(Unknown Source) at org.apache.xerces.impl.XMLDocumentScannerImpl$TrailingMiscDispatcher.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:485) at org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:293) 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)
To reproduce this, simply start fop with fop fonts.fo -print (I've used fonts.fo from the Examples page).
Attachments
Issue Links
- is fixed by
-
FOP-2919 Direct Printing throws NullpointerException in AbstractRenderer
- Resolved