When trying to convert the attached fo-file to rtf using the fop.sh shell script, the renderer reproducingly crashes with the following NullPointerException: ------------ Exception in thread "main" java.lang.NullPointerException at org.apache.fop.render.rtf.rtflib.rtfdoc.RtfListTable.writeListTableEntry(RtfListTable.java:191) at org.apache.fop.render.rtf.rtflib.rtfdoc.RtfListTable.writeRtfContent(RtfListTable.java:136) at org.apache.fop.render.rtf.rtflib.rtfdoc.RtfElement.writeRtf(RtfElement.java:86) at org.apache.fop.render.rtf.rtflib.rtfdoc.RtfContainer.writeRtfContent(RtfContainer.java:135) at org.apache.fop.render.rtf.rtflib.rtfdoc.RtfElement.writeRtf(RtfElement.java:86) at org.apache.fop.render.rtf.rtflib.rtfdoc.RtfContainer.writeRtfContent(RtfContainer.java:135) at org.apache.fop.render.rtf.rtflib.rtfdoc.RtfElement.writeRtf(RtfElement.java:86) at org.apache.fop.render.rtf.rtflib.rtfdoc.RtfFile.flush(RtfFile.java:219) at org.apache.fop.render.rtf.RTFHandler.endDocument(RTFHandler.java:157) at org.apache.fop.fo.FOTreeBuilder.endDocument(FOTreeBuilder.java:224) at org.apache.xerces.parsers.AbstractSAXParser.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.XMLEntityManager$EntityScanner.load(Unknown Source) at org.apache.xerces.impl.XMLEntityManager$EntityScanner.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.DTDConfiguration.parse(Unknown Source) at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source) at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source) at org.apache.fop.apps.Driver.render(Driver.java:230) at org.apache.fop.apps.Driver.render(Driver.java:203) at org.apache.fop.apps.Fop.main(Fop.java:57) --------------------- The code base is that of 2004-07-16 around 9.00 MEZ (head). Commenting out the offending line 191 in RtfListTable caused the conversion to run through, though resulting in not conformant rtf. The same file converted OK with a fop version that was approximately three months old (also head). The fo is produced using the current docbook stylesheets, originating from a docbook source.
Created attachment 12125 [details] fo file that causes the bug
Marc Your input FO File isn't working on my machine because it's requesting a lot of graphics that you did not attach. I'm getting too many other errors. I asked you for a minimal FO file to reproduce the error. You sent me a 910-line file that's requesting several graphics instead. Note: do not attach the graphics, rather, again, reduce the FO to its minimal size that causes this error to occur. When you're willing to do so, please re-open this bug--your FO file you send us should probably be under 150 lines. Glen
Marc, I added a NPE check to the code, the error should no longer occur. The code in question was added 4 months, 10 days ago. There may be other formatting problems still, however, if that is the case please reopen the bug or create new ones as appropriate. Glen
Thanks for your help. Unfortunately, the error persists also with the new version. I've attached a slashed down version of bug.fo (some 180 lines) that still produces the same NullPointerException.
Created attachment 12127 [details] Slashed down version of bug.fo
Hi, this error was caused by the fact, that the rtf renderer did not set an rtf style to the list. I've set the bullet list as default style, so the processing of your file should not crash anymore. But it may not look like you expect. Guess i have to invest some time in support for lists in near future. I set this bug to FIXED. Kind regards Peter Herweg
Vielen Dank, Herr Herweg. Ich bin sehr froh, dass dieser Bug nicht mein Fehler war! ;) Glen
Thanks und vielen Dank!
batch transition pre-FOP1.0 resolved+fixed bugs to closed+fixed