Skip to content

Crash when more than two cases in switch statement #75

@Godsmith

Description

@Godsmith

Steps to reproduce

  1. Go to https://plantuml.github.io/plantuml.js/
  2. Paste the following code:
@startuml
start
switch (test?)
case ( condition A )
  :Text 1;
case ( condition B ) 
  :Text 2;
case ( condition C )
  :Text 3;
endswitch
stop
@enduml

Expected

A diagram

Actual

An error message:

An error has occured : java.lang.NullPointerException
If there is no solution, there is no problem
 
Diagram size: 13 lines / 165 characters.
 
PlantUML (1.2023.2beta4) cannot parse result from dot/GraphViz.
 
This version of PlantUML is 512 days old, so you should
consider upgrading from https://plantuml.com/download
 
Please go to https://plantuml.com/graphviz-dot to check your GraphViz version.
 
 
This may be caused by :
- a bug in PlantUML
- a problem in GraphViz
 
You should send this diagram and this image to
plantuml@gmail.com
or
post to
https://plantuml.com/qa
to solve this issue.
You can try to turn around this issue by simplifing your diagram.
 
java.lang.NullPointerException
net.sourceforge.plantuml.activitydiagram3.ftile.Snake.getTextBlockPosition(Unknown Source)
net.sourceforge.plantuml.activitydiagram3.ftile.Snake.drawInternalLabel(Unknown Source)
net.sourceforge.plantuml.activitydiagram3.ftile.Snake.drawInternal(Unknown Source)
net.sourceforge.plantuml.svek.UGraphicForSnake$PendingSnake.drawInternal(Unknown Source)
net.sourceforge.plantuml.svek.UGraphicForSnake.flushUg(Unknown Source)
net.sourceforge.plantuml.activitydiagram3.ftile.TextBlockInterceptorUDrawable.drawU(Unknown Source)
net.sourceforge.plantuml.activitydiagram3.ftile.Swimlanes.drawU(Unknown Source)
net.sourceforge.plantuml.ugraphic.comp.CompressionXorYBuilder.getPiecewiseAffineTransform(Unknown Source)
net.sourceforge.plantuml.ugraphic.comp.CompressionXorYBuilder.build(Unknown Source)
net.sourceforge.plantuml.activitydiagram3.ActivityDiagram3.getTextBlock(Unknown Source)
internal.internal(Unknown Source)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions