Skip to content

[SCXML] Error with implicitly defined substate #2238

Open
@Blackhol3

Description

@Blackhol3

PlantUML throws an exception when generating SCXML (-tscxml) output for diagrams where substates are implicitly defined using dot notation.

For instance, the following code works correctly:

@startuml
state A {
  state x
}

A.x -> B
B -> [*]
@enduml

But this code throws an exception:

@startuml
A.x -> B
B -> [*]
@enduml
java.lang.NullPointerException
        at net.sourceforge.plantuml.xmlsc.ScxmlStateDiagramStandard.<init>(ScxmlStateDiagramStandard.java:128)
        at net.sourceforge.plantuml.xmlsc.StateDiagramScxmlMaker.createFiles(StateDiagramScxmlMaker.java:99)
        at net.atmp.CucaDiagram.createFilesScxml(CucaDiagram.java:465)
        at net.atmp.CucaDiagram.exportDiagramInternal(CucaDiagram.java:506)
        at net.sourceforge.plantuml.UmlDiagram.exportDiagramNow(UmlDiagram.java:157)
        at net.sourceforge.plantuml.AbstractPSystem.exportDiagram(AbstractPSystem.java:255)
        at net.sourceforge.plantuml.PSystemUtils.exportDiagramsDefault(PSystemUtils.java:243)
        at net.sourceforge.plantuml.PSystemUtils.exportDiagrams(PSystemUtils.java:133)
        at net.sourceforge.plantuml.SourceFileReaderAbstract.getGeneratedImages(SourceFileReaderAbstract.java:237)
        at net.sourceforge.plantuml.Run.manageFileInternal(Run.java:565)
        at net.sourceforge.plantuml.Run.processArgs(Run.java:459)
        at net.sourceforge.plantuml.Run.manageAllFiles(Run.java:426)
        at net.sourceforge.plantuml.Run.main(Run.java:261)
Exception in thread "main" java.lang.UnsupportedOperationException: SCXML
        at net.atmp.ImageBuilder.createUGraphic(ImageBuilder.java:447)
        at net.atmp.ImageBuilder.writeImageInternal(ImageBuilder.java:301)
        at net.atmp.ImageBuilder.write(ImageBuilder.java:277)
        at net.sourceforge.plantuml.crash.CrashReportHandler.exportDiagramError(CrashReportHandler.java:108)
        at net.sourceforge.plantuml.UmlDiagram.exportDiagramNow(UmlDiagram.java:204)
        at net.sourceforge.plantuml.AbstractPSystem.exportDiagram(AbstractPSystem.java:255)
        at net.sourceforge.plantuml.PSystemUtils.exportDiagramsDefault(PSystemUtils.java:243)
        at net.sourceforge.plantuml.PSystemUtils.exportDiagrams(PSystemUtils.java:133)
        at net.sourceforge.plantuml.SourceFileReaderAbstract.getGeneratedImages(SourceFileReaderAbstract.java:237)
        at net.sourceforge.plantuml.Run.manageFileInternal(Run.java:565)
        at net.sourceforge.plantuml.Run.processArgs(Run.java:459)
        at net.sourceforge.plantuml.Run.manageAllFiles(Run.java:426)
        at net.sourceforge.plantuml.Run.main(Run.java:261)

Image outputs (SVG, PNG, …) are not affected; both codes correctly produce the expected following image:
State diagram example

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions