Elk crashes with ports

0 votes
asked Jun 2 in Bug by m0squito (120 points)

Whenever I try to define a port inside a component, it crashes., Here's a minimal example that demonstrates the problem:

@startuml
!pragma layout elk

component comp1 {
 port "port1"
}
@enduml

Here's the stack trace:

java.lang.NullPointerException: Cannot invoke "net.sourceforge.plantuml.svek.Cluster.getClusterPosition()" because "this.parent" is null

    at net.sourceforge.plantuml.svek.image.EntityImagePort.upPosition(EntityImagePort.java:81)

    at net.sourceforge.plantuml.svek.image.EntityImagePort.drawU(EntityImagePort.java:106)

    at net.sourceforge.plantuml.elk.CucaDiagramFileMakerElk$Drawing.drawSingleNode(CucaDiagramFileMakerElk.java:305)

    at net.sourceforge.plantuml.elk.CucaDiagramFileMakerElk$Drawing.drawAllNodes(CucaDiagramFileMakerElk.java:233)

    at net.sourceforge.plantuml.elk.CucaDiagramFileMakerElk$Drawing.drawU(CucaDiagramFileMakerElk.java:221)

    at net.sourceforge.plantuml.graphic.TextBlockUtils.getMinMax(TextBlockUtils.java:170)

    at net.sourceforge.plantuml.elk.CucaDiagramFileMakerElk.createFile(CucaDiagramFileMakerElk.java:364)

    at net.sourceforge.plantuml.cucadiagram.CucaDiagram.exportDiagramInternal(CucaDiagram.java:610)

    at net.sourceforge.plantuml.UmlDiagram.exportDiagramNow(UmlDiagram.java:134)

    at net.sourceforge.plantuml.AbstractPSystem.exportDiagram(AbstractPSystem.java:178)

    at net.sourceforge.plantuml.SourceStringReader.outputImage(SourceStringReader.java:172)

    at net.sourceforge.plantuml.SourceStringReader.outputImage(SourceStringReader.java:143)

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
Anti-spam verification:

[Antispam2 Feature: please please wait 1 or 2 minutes (this message will disappear) before pressing the button otherwise it will fail](--------)
To avoid this verification in future, please log in or register.
...