Community
Participate
Working Groups
Build Identifier: BIRT Report Engine 2.6.2 Creating a PDF report from HTML can fail with a NPE with the following HTML: ******************************************** <table style="background-image: none;"> <tbody> <tr> <td> Test</td> </tr> </tbody> </table> ********************************************* The resulting stacktrace: ********************************************* java.lang.NullPointerException at org.eclipse.birt.report.engine.nLayout.area.style.BackgroundImageInfo.<init>(BackgroundImageInfo.java:70) at org.eclipse.birt.report.engine.nLayout.area.impl.TableArea.buildProperties(TableArea.java:147) at org.eclipse.birt.report.engine.nLayout.area.impl.TableArea.initialize(TableArea.java:186) at org.eclipse.birt.report.engine.nLayout.LayoutEngine.setContainer(LayoutEngine.java:352) at org.eclipse.birt.report.engine.nLayout.LayoutEngine._startContainer(LayoutEngine.java:404) at org.eclipse.birt.report.engine.nLayout.LayoutEngine.startContainer(LayoutEngine.java:340) at org.eclipse.birt.report.engine.emitter.ContentEmitterAdapter.startTable(ContentEmitterAdapter.java:75) at org.eclipse.birt.report.engine.emitter.ContentEmitterUtil.startContent(ContentEmitterUtil.java:50) at org.eclipse.birt.report.engine.nLayout.LayoutEngine.visitContent(LayoutEngine.java:628) at org.eclipse.birt.report.engine.nLayout.LayoutEngine.visitContent(LayoutEngine.java:636) at org.eclipse.birt.report.engine.nLayout.LayoutEngine.startForeign(LayoutEngine.java:670) at org.eclipse.birt.report.engine.emitter.CompositeContentEmitter.startForeign(CompositeContentEmitter.java:266) at org.eclipse.birt.report.engine.emitter.ContentEmitterUtil.startContent(ContentEmitterUtil.java:77) at org.eclipse.birt.report.engine.layout.html.HTMLTableLayoutEmitter.startContent(HTMLTableLayoutEmitter.java:146) at org.eclipse.birt.report.engine.emitter.ContentEmitterAdapter.startForeign(ContentEmitterAdapter.java:168) at org.eclipse.birt.report.engine.emitter.ContentEmitterUtil.startContent(ContentEmitterUtil.java:77) at org.eclipse.birt.report.engine.layout.html.HTMLTableLayoutEmitter.startContent(HTMLTableLayoutEmitter.java:146) at org.eclipse.birt.report.engine.emitter.ContentEmitterAdapter.startForeign(ContentEmitterAdapter.java:168) at org.eclipse.birt.report.engine.emitter.ContentEmitterUtil.startContent(ContentEmitterUtil.java:77) at org.eclipse.birt.report.engine.layout.html.buffer.HTMLPageBuffer.startContent(HTMLPageBuffer.java:116) at org.eclipse.birt.report.engine.layout.html.buffer.TableBreakBuffer.startContent(TableBreakBuffer.java:287) at org.eclipse.birt.report.engine.layout.html.HTMLLeafItemLM.start(HTMLLeafItemLM.java:67) at org.eclipse.birt.report.engine.layout.html.HTMLAbstractLM.layout(HTMLAbstractLM.java:139) at org.eclipse.birt.report.engine.layout.html.HTMLBlockStackingLM.layoutNodes(HTMLBlockStackingLM.java:70) at org.eclipse.birt.report.engine.layout.html.HTMLStackingLM.layoutChildren(HTMLStackingLM.java:26) at org.eclipse.birt.report.engine.layout.html.HTMLAbstractLM.layout(HTMLAbstractLM.java:140) at org.eclipse.birt.report.engine.layout.html.HTMLInlineStackingLM.resumeLayout(HTMLInlineStackingLM.java:111) at org.eclipse.birt.report.engine.layout.html.HTMLInlineStackingLM.layoutNodes(HTMLInlineStackingLM.java:160) at org.eclipse.birt.report.engine.layout.html.HTMLStackingLM.layoutChildren(HTMLStackingLM.java:26) at org.eclipse.birt.report.engine.layout.html.HTMLAbstractLM.layout(HTMLAbstractLM.java:140) at org.eclipse.birt.report.engine.layout.html.HTMLBlockStackingLM.layoutNodes(HTMLBlockStackingLM.java:70) at org.eclipse.birt.report.engine.layout.html.HTMLStackingLM.layoutChildren(HTMLStackingLM.java:26) at org.eclipse.birt.report.engine.layout.html.HTMLTableBandLM.layoutChildren(HTMLTableBandLM.java:67) at org.eclipse.birt.report.engine.layout.html.HTMLAbstractLM.layout(HTMLAbstractLM.java:140) at org.eclipse.birt.report.engine.layout.html.HTMLBlockStackingLM.layoutNodes(HTMLBlockStackingLM.java:70) at org.eclipse.birt.report.engine.layout.html.HTMLStackingLM.layoutChildren(HTMLStackingLM.java:26) at org.eclipse.birt.report.engine.layout.html.HTMLTableLM.layoutChildren(HTMLTableLM.java:132) at org.eclipse.birt.report.engine.layout.html.HTMLAbstractLM.layout(HTMLAbstractLM.java:140) at org.eclipse.birt.report.engine.layout.html.HTMLBlockStackingLM.layoutNodes(HTMLBlockStackingLM.java:70) at org.eclipse.birt.report.engine.layout.html.HTMLStackingLM.layoutChildren(HTMLStackingLM.java:26) at org.eclipse.birt.report.engine.layout.html.HTMLAbstractLM.layout(HTMLAbstractLM.java:140) at org.eclipse.birt.report.engine.layout.html.HTMLInlineStackingLM.resumeLayout(HTMLInlineStackingLM.java:111) at org.eclipse.birt.report.engine.layout.html.HTMLInlineStackingLM.layoutNodes(HTMLInlineStackingLM.java:160) at org.eclipse.birt.report.engine.layout.html.HTMLStackingLM.layoutChildren(HTMLStackingLM.java:26) at org.eclipse.birt.report.engine.layout.html.HTMLAbstractLM.layout(HTMLAbstractLM.java:140) at org.eclipse.birt.report.engine.layout.html.HTMLBlockStackingLM.layoutNodes(HTMLBlockStackingLM.java:70) at org.eclipse.birt.report.engine.layout.html.HTMLStackingLM.layoutChildren(HTMLStackingLM.java:26) at org.eclipse.birt.report.engine.layout.html.HTMLTableLM.layoutChildren(HTMLTableLM.java:132) at org.eclipse.birt.report.engine.layout.html.HTMLAbstractLM.layout(HTMLAbstractLM.java:140) at org.eclipse.birt.report.engine.layout.html.HTMLBlockStackingLM.layoutNodes(HTMLBlockStackingLM.java:70) at org.eclipse.birt.report.engine.layout.html.HTMLPageLM.layout(HTMLPageLM.java:90) at org.eclipse.birt.report.engine.layout.html.HTMLReportLayoutEngine.layout(HTMLReportLayoutEngine.java:99) at org.eclipse.birt.report.engine.api.impl.RunAndRenderTask.doRun(RunAndRenderTask.java:180) at org.eclipse.birt.report.engine.api.impl.RunAndRenderTask.run(RunAndRenderTask.java:77) ******************************************************* Clearly this is because it is not handling the background-image very well. In out case, we are using user-input to run the report, so we can't restrict against this form of useless HTML. Reproducible: Always Steps to Reproduce: Run a PDF report, giving it HTML shown in the DETAILS above, and BIRT will fail to create the PDF, instead throwing the exception above.
I can not reproduce this issue with latest 3.7.2 release build. Please try the latest release.