PCGen / pcgen

Main code and data development for pcgen program release
http://pcgen.org
GNU Lesser General Public License v2.1
432 stars 339 forks source link

Cannot export to PDF #5369

Closed BarbaAlGhul closed 5 years ago

BarbaAlGhul commented 5 years ago

I'm using PCGen 6.08.00 RC4 D&D 5e system and when I try to export to PDF, this happens:

21:30:02.984 SEVERE SwingWorker-pool-2-thread-2 LogAdapter:554 org.xml.sax.SAXParseException; systemId: file:/C:/PCGen/6.08.00%20RC4/outputsheets/d20/5e/pdf/fantasy_master_common_blocks.xslt; lineNumber: 282; columnNumber: 38; java.lang.NullPointerException
21:30:02.985 SEVERE SwingWorker-pool-2-thread-2 FopTask:253 FOP Fatal Error java.lang.NullPointerException at file:/C:/PCGen/6.08.00%20RC4/outputsheets/d20/5e/pdf/fantasy_master_common_blocks.xslt; Line#: 282; Column#: 38; 
21:30:03.162 SEVERE SwingWorker-pool-2-thread-2 FopTask:225 Exception in FopTask:run
; SystemID: file:/C:/PCGen/6.08.00%20RC4/outputsheets/d20/5e/pdf/fantasy_master_common_blocks.xslt; Line#: 282; Column#: 38
javax.xml.transform.TransformerException: java.lang.NullPointerException
    at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2407)
    at org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:1376)
    at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2402)
    at org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:1376)
    at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2402)
    at org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:1376)
    at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2402)
    at org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:1376)
    at org.apache.xalan.templates.ElemApplyTemplates.transformSelectedNodes(ElemApplyTemplates.java:395)
    at org.apache.xalan.templates.ElemApplyTemplates.execute(ElemApplyTemplates.java:178)
    at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2402)
    at org.apache.xalan.transformer.TransformerImpl.applyTemplateToNode(TransformerImpl.java:2272)
    at org.apache.xalan.transformer.TransformerImpl.transformNode(TransformerImpl.java:1358)
    at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:711)
    at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:1275)
    at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:1253)
    at pcgen.util.fop.FopTask.run(FopTask.java:220)
    at pcgen.system.BatchExporter.exportCharacterToPDF(BatchExporter.java:238)
    at pcgen.gui2.dialog.ExportDialog$PDFExporter.doInBackground(ExportDialog.java:583)
    at java.desktop/javax.swing.SwingWorker$1.call(Unknown Source)
    at java.base/java.util.concurrent.FutureTask.run(Unknown Source)
    at java.desktop/javax.swing.SwingWorker.run(Unknown Source)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.base/java.lang.Thread.run(Unknown Source)
Caused by: java.lang.NullPointerException
    at org.apache.fop.fo.FObj.removeChild(FObj.java:279)
    at org.apache.fop.fo.flow.table.Table.finalizeNode(Table.java:256)
    at org.apache.fop.fo.FONode.endOfNode(FONode.java:330)
    at org.apache.fop.fo.flow.table.Table.endOfNode(Table.java:243)
    at org.apache.fop.fo.FOTreeBuilder$MainFOHandler.endElement(FOTreeBuilder.java:360)
    at org.apache.fop.fo.FOTreeBuilder.endElement(FOTreeBuilder.java:190)
    at org.apache.xml.serializer.ToXMLSAXHandler.endElement(ToXMLSAXHandler.java:263)
    at org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:1401)
    at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2402)
    ... 24 more
---------
java.lang.NullPointerException
    at org.apache.fop.fo.FObj.removeChild(FObj.java:279)
    at org.apache.fop.fo.flow.table.Table.finalizeNode(Table.java:256)
    at org.apache.fop.fo.FONode.endOfNode(FONode.java:330)
    at org.apache.fop.fo.flow.table.Table.endOfNode(Table.java:243)
    at org.apache.fop.fo.FOTreeBuilder$MainFOHandler.endElement(FOTreeBuilder.java:360)
    at org.apache.fop.fo.FOTreeBuilder.endElement(FOTreeBuilder.java:190)
    at org.apache.xml.serializer.ToXMLSAXHandler.endElement(ToXMLSAXHandler.java:263)
    at org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:1401)
    at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2402)
    at org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:1376)
    at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2402)
    at org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:1376)
    at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2402)
    at org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:1376)
    at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2402)
    at org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:1376)
    at org.apache.xalan.templates.ElemApplyTemplates.transformSelectedNodes(ElemApplyTemplates.java:395)
    at org.apache.xalan.templates.ElemApplyTemplates.execute(ElemApplyTemplates.java:178)
    at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2402)
    at org.apache.xalan.transformer.TransformerImpl.applyTemplateToNode(TransformerImpl.java:2272)
    at org.apache.xalan.transformer.TransformerImpl.transformNode(TransformerImpl.java:1358)
    at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:711)
    at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:1275)
    at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:1253)
    at pcgen.util.fop.FopTask.run(FopTask.java:220)
    at pcgen.system.BatchExporter.exportCharacterToPDF(BatchExporter.java:238)
    at pcgen.gui2.dialog.ExportDialog$PDFExporter.doInBackground(ExportDialog.java:583)
    at java.desktop/javax.swing.SwingWorker$1.call(Unknown Source)
    at java.base/java.util.concurrent.FutureTask.run(Unknown Source)
    at java.desktop/javax.swing.SwingWorker.run(Unknown Source)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.base/java.lang.Thread.run(Unknown Source)

21:30:03.163 SEVERE SwingWorker-pool-2-thread-2 BatchExporter:241 BatchExporter.exportCharacterToPDF failed: java.lang.NullPointerException

I have java 11 on my machine.

I must say that I'm using the source Dungeons & Dragons 5e - Core Books.

grimreaper commented 5 years ago

Can you provide you the pcg file you're trying to export as well?

BarbaAlGhul commented 5 years ago

I created a new character and tried again, the same error happens.

Here it is: Laucian Ilphukiir.zip

Another thing, my character is a Monk and using the Monk Unarmored Defense, I should have AC = 16 (10 + wis mod + dex mod) but it's showing me AC = 13, for some reason.

I must say that I'm using PCGen Data Sets from BahamutDragon.

grimreaper commented 5 years ago

I don't have BD's data so this isn't a perfect replication - but I can't replicate on either 6.08 or master.

That isn't to say this isn't a bug, but it'll very difficult to fix without me (or someone) being able to replicate.

BarbaAlGhul commented 5 years ago

I will test with a "vanilla" installation of 6.08

BarbaAlGhul commented 5 years ago

Ok, tested with vanilla 6.08 and System Reference Document 5.1, everything seems fine, Looks like it's an issue on BahamutDragon module. I'm closing now.

sculpepper commented 5 years ago

I want to add some information. There isn't an issue with the BahamutDragon module nor PCGen. What is required when you are installing BahamutDragon modules is that you copy over things like gamemodes and output sheets to the correct directly. Check out the README with BahamutDragon and it better explains how things should be installed.