[Starfinder] Error exporting character to PDF in 6.07.09

Description

Here are the log entries that happen when trying to export a character to PDF using the csheet_fantasy_std_*.xslt templates:

10:56:18.166 SEVERE SwingWorker-pool-2-thread-2 ExportHandler:1988 Error replacing WEAPONH.TOTALHIT
java.lang.NullPointerException
at pcgen.core.Equipment.getEffectiveWieldCategory(Equipment.java:5183)
at pcgen.core.Equipment.isWeaponTwoHanded(Equipment.java:5099)
at pcgen.io.exporttoken.WeaponToken.getToHit(WeaponToken.java:1802)
at pcgen.io.exporttoken.WeaponToken.getTotalHitToken(WeaponToken.java:1623)
at pcgen.io.exporttoken.WeaponToken.getWeaponToken(WeaponToken.java:396)
at pcgen.io.exporttoken.WeaponhToken.getToken(WeaponhToken.java:86)
at pcgen.io.ExportHandler.replaceToken(ExportHandler.java:1957)
at pcgen.io.freemarker.CharacterExportAction.getExportVariable(CharacterExportAction.java:50)
at pcgen.io.freemarker.PCStringDirective.exec(PCStringDirective.java:99)
at freemarker.core.MethodCall._eval(MethodCall.java:65)
at freemarker.core.Expression.eval(Expression.java:83)
at freemarker.core.Expression.evalAndCoerceToStringOrUnsupportedMarkup(Expression.java:123)
at freemarker.core.BuiltInForString.getTargetString(BuiltInForString.java:34)
at freemarker.core.BuiltInForString._eval(BuiltInForString.java:29)
at freemarker.core.Expression.eval(Expression.java:83)
at freemarker.core.MethodCall._eval(MethodCall.java:58)
at freemarker.core.Expression.eval(Expression.java:83)
at freemarker.core.Expression.evalAndCoerceToStringOrUnsupportedMarkup(Expression.java:123)
at freemarker.core.BuiltInForString.getTargetString(BuiltInForString.java:34)
at freemarker.core.BuiltInForString._eval(BuiltInForString.java:29)
at freemarker.core.Expression.eval(Expression.java:83)
at freemarker.core.Assignment.accept(Assignment.java:134)
at freemarker.core.Environment.visit(Environment.java:330)
at freemarker.core.Environment.visit(Environment.java:336)
at freemarker.core.Environment.visit(Environment.java:336)
at freemarker.core.Environment.process(Environment.java:309)
at freemarker.template.Template.process(Template.java:384)
at pcgen.io.ExportHandler.exportCharacterUsingFreemarker(ExportHandler.java:333)
at pcgen.io.ExportHandler.write(ExportHandler.java:222)
at pcgen.gui2.facade.CharacterFacadeImpl.export(CharacterFacadeImpl.java:2676)
at pcgen.system.BatchExporter.exportCharacter(BatchExporter.java:514)
at pcgen.system.BatchExporter.exportCharacter(BatchExporter.java:494)
at pcgen.system.BatchExporter.exportCharacterToPDF(BatchExporter.java:227)
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)

10:56:18.182 SEVERE SwingWorker-pool-2-thread-2 _JULLoggerFactory:59 Error executing FreeMarker template
FreeMarker template error:
Can't convert this string to number: ""
The blamed expression:
==> pcstring('WEAPONH.TOTALHIT')?keep_before("/")?number [in template "base.xml.ftl" at line 775, column 40]


FTL stack trace ("~" means nesting-related):

  • Failed at: #assign fab = pcstring("WEAPONH.TOTAL... [in template "base.xml.ftl" at line 775, column 25]


Java stack trace (for programmers):


freemarker.core.NonNumericalException: [... Exception message was already printed; see it above ...]
at freemarker.core.NonNumericalException.newMalformedNumberException(NonNumericalException.java:70)
at freemarker.core.BuiltInsForStringsMisc$numberBI.calculateResult(BuiltInsForStringsMisc.java:122)
at freemarker.core.BuiltInForString._eval(BuiltInForString.java:29)
at freemarker.core.Expression.eval(Expression.java:83)
at freemarker.core.Assignment.accept(Assignment.java:134)
at freemarker.core.Environment.visit(Environment.java:330)
at freemarker.core.Environment.visit(Environment.java:336)
at freemarker.core.Environment.visit(Environment.java:336)
at freemarker.core.Environment.process(Environment.java:309)
at freemarker.template.Template.process(Template.java:384)
at pcgen.io.ExportHandler.exportCharacterUsingFreemarker(ExportHandler.java:333)
at pcgen.io.ExportHandler.write(ExportHandler.java:222)
at pcgen.gui2.facade.CharacterFacadeImpl.export(CharacterFacadeImpl.java:2676)
at pcgen.system.BatchExporter.exportCharacter(BatchExporter.java:514)
at pcgen.system.BatchExporter.exportCharacter(BatchExporter.java:494)
at pcgen.system.BatchExporter.exportCharacterToPDF(BatchExporter.java:227)
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)

10:56:18.197 SEVERE SwingWorker-pool-2-thread-2 ExportHandler:338 Error exporting character using template C:\Users\bjohnsen\AppData\Local\PCGen\6.07.09\system\gameModes\Starfinder\base.xml.ftl
FreeMarker template error:
Can't convert this string to number: ""
The blamed expression:
==> pcstring('WEAPONH.TOTALHIT')?keep_before("/")?number [in template "base.xml.ftl" at line 775, column 40]


FTL stack trace ("~" means nesting-related):

  • Failed at: #assign fab = pcstring("WEAPONH.TOTAL... [in template "base.xml.ftl" at line 775, column 25]


Java stack trace (for programmers):


freemarker.core.NonNumericalException: [... Exception message was already printed; see it above ...]
at freemarker.core.NonNumericalException.newMalformedNumberException(NonNumericalException.java:70)
at freemarker.core.BuiltInsForStringsMisc$numberBI.calculateResult(BuiltInsForStringsMisc.java:122)
at freemarker.core.BuiltInForString._eval(BuiltInForString.java:29)
at freemarker.core.Expression.eval(Expression.java:83)
at freemarker.core.Assignment.accept(Assignment.java:134)
at freemarker.core.Environment.visit(Environment.java:330)
at freemarker.core.Environment.visit(Environment.java:336)
at freemarker.core.Environment.visit(Environment.java:336)
at freemarker.core.Environment.process(Environment.java:309)
at freemarker.template.Template.process(Template.java:384)
at pcgen.io.ExportHandler.exportCharacterUsingFreemarker(ExportHandler.java:333)
at pcgen.io.ExportHandler.write(ExportHandler.java:222)
at pcgen.gui2.facade.CharacterFacadeImpl.export(CharacterFacadeImpl.java:2676)
at pcgen.system.BatchExporter.exportCharacter(BatchExporter.java:514)
at pcgen.system.BatchExporter.exportCharacter(BatchExporter.java:494)
at pcgen.system.BatchExporter.exportCharacterToPDF(BatchExporter.java:227)
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)

10:56:18.197 SEVERE SwingWorker-pool-2-thread-2 BatchExporter:253 BatchExporter.exportCharacterToPDF failed
pcgen.io.ExportException: Error exporting character using template C:\Users\bjohnsen\AppData\Local\PCGen\6.07.09\system\gameModes\Starfinder\base.xml.ftl : Can't convert this string to number: ""
The blamed expression:
==> pcstring('WEAPONH.TOTALHIT')?keep_before("/")?number [in template "base.xml.ftl" at line 775, column 40]


FTL stack trace ("~" means nesting-related):

  • Failed at: #assign fab = pcstring("WEAPONH.TOTAL... [in template "base.xml.ftl" at line 775, column 25]


  • at pcgen.io.ExportHandler.exportCharacterUsingFreemarker(ExportHandler.java:339)
    at pcgen.io.ExportHandler.write(ExportHandler.java:222)
    at pcgen.gui2.facade.CharacterFacadeImpl.export(CharacterFacadeImpl.java:2676)
    at pcgen.system.BatchExporter.exportCharacter(BatchExporter.java:514)
    at pcgen.system.BatchExporter.exportCharacter(BatchExporter.java:494)
    at pcgen.system.BatchExporter.exportCharacterToPDF(BatchExporter.java:227)
    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: freemarker.core.NonNumericalException: Can't convert this string to number: ""
    The blamed expression:
    ==> pcstring('WEAPONH.TOTALHIT')?keep_before("/")?number [in template "base.xml.ftl" at line 775, column 40]


FTL stack trace ("~" means nesting-related):

  • Failed at: #assign fab = pcstring("WEAPONH.TOTAL... [in template "base.xml.ftl" at line 775, column 25]


  • at freemarker.core.NonNumericalException.newMalformedNumberException(NonNumericalException.java:70)
    at freemarker.core.BuiltInsForStringsMisc$numberBI.calculateResult(BuiltInsForStringsMisc.java:122)
    at freemarker.core.BuiltInForString._eval(BuiltInForString.java:29)
    at freemarker.core.Expression.eval(Expression.java:83)
    at freemarker.core.Assignment.accept(Assignment.java:134)
    at freemarker.core.Environment.visit(Environment.java:330)
    at freemarker.core.Environment.visit(Environment.java:336)
    at freemarker.core.Environment.visit(Environment.java:336)
    at freemarker.core.Environment.process(Environment.java:309)
    at freemarker.template.Template.process(Template.java:384)
    at pcgen.io.ExportHandler.exportCharacterUsingFreemarker(ExportHandler.java:333)
    ... 12 more

Environment

Java 10.0.2

Assignee

Andrew Maitland

Reporter

Brian Johnsen

Labels

None

Epic/Theme

None

Pending User Input

No

Components

Fix versions

Affects versions

Priority

Minor
Configure