Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PMLC 3.1.0 Crashes on Empty [options Node #98

Closed
tajmone opened this issue Dec 8, 2022 · 2 comments
Closed

PMLC 3.1.0 Crashes on Empty [options Node #98

tajmone opened this issue Dec 8, 2022 · 2 comments
Labels
bug Something isn't working

Comments

@tajmone
Copy link
Contributor

tajmone commented Dec 8, 2022

Converting the following PML document with empty [options node:

[doc [title Test] [options ]]

results in the following crash error:

ERROR:
The operation has been aborted due to the following unexpected application error:
java.lang.NullPointerException: Cannot invoke "dev.pp.parameters.textTokenParameter.TextTokenParameters.getList()" because "parameters" is null
    at dev.pp.parameters.textTokenParameter.TextTokenParameters.merge(TextTokenParameters.java:112)
    at dev.pmlc.ext.utilities.pmltohtml.options.PMLToHTMLOptionsHelper.createMergedOptions(PMLToHTMLOptionsHelper.java:71)
    at dev.pmlc.commands.pmltohtml.PMLToHTMLCommand.convertDocumentNode(PMLToHTMLCommand.java:147)
    at dev.pmlc.commands.pmltohtml.PMLToHTMLCommand$Executor.execute(PMLToHTMLCommand.java:120)
    at dev.pmlc.commands.pmltohtml.PMLToHTMLCommand$Executor.execute(PMLToHTMLCommand.java:39)
    at dev.pp.commands.command.CommandExecutor.execute(CommandExecutor.java:17)
    at dev.pp.commands.command.FormalCommand.execute(FormalCommand.java:159)
    at dev.pp.commands.picocli.PicocliCommandLineExecutor.executeSubCommand(PicocliCommandLineExecutor.java:72)
    at dev.pp.commands.picocli.PicocliCommandLineExecutor.executeCommand(PicocliCommandLineExecutor.java:41)
    at dev.pmlc.commands.PMLCommands.runCommand(PMLCommands.java:29)
    at dev.pmlc.commands.Start.main(Start.java:20)

Please consider sending the above message to the developers of the application, so that this problem can be fixed.
[Finished in 1.7s]

Empty options should be acceptable, e.g. for procedurally generated documents which might or might not inject options into the node, and in any case PMLC should at the most produce a warning but still convert the rest of the document (if valid).

@tajmone tajmone added the bug Something isn't working label Dec 8, 2022
@pml-lang
Copy link
Owner

Empty options should be acceptable, e.g. for procedurally generated documents which might or might not inject options into the node, and in any case PMLC should at the most produce a warning but still convert the rest of the document (if valid).

Yes, PMLC must not crash in case of an empty options node. Instead, a warning should be emitted, and execution should continue.

@pml-lang
Copy link
Owner

Fixed in version 4.0.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants