Using the plantuml/plantuml-server:jetty-v1.2021.7 image as well as an image I compiled from the latest source on github for 1.2021.9 plantuml, I get exception. I do not the exception running the 1.2021.9 plantuml.jar on Ubuntu 20.04.2 LTS with graphviz 2.42.2-3build2 where strangely enough dot -V reports graphviz version 2.43.0 (0)
To reproduce, I mounted the latest plantuml.jar and diagram source into the docker container and executed there
jetty@49949750aca0:/tmp$ java -jar /plantuml.jar -tsvg vdjm.plantuml
Exception java.lang.IndexOutOfBoundsException: Index: 0
net.sourceforge.plantuml.cucadiagram.UnparsableGraphvizException: java.lang.IndexOutOfBoundsException: Index: 0
at net.sourceforge.plantuml.svek.GeneralImageBuilder.buildImage(GeneralImageBuilder.java:481)
at net.sourceforge.plantuml.svek.CucaDiagramFileMakerSvek.createFileInternal(CucaDiagramFileMakerSvek.java:102)
at net.sourceforge.plantuml.svek.CucaDiagramFileMakerSvek.createFile(CucaDiagramFileMakerSvek.java:67)
at net.sourceforge.plantuml.cucadiagram.CucaDiagram.exportDiagramInternal(CucaDiagram.java:639)
at net.sourceforge.plantuml.UmlDiagram.exportDiagramNow(UmlDiagram.java:144)
at net.sourceforge.plantuml.AbstractPSystem.exportDiagram(AbstractPSystem.java:157)
at net.sourceforge.plantuml.PSystemUtils.exportDiagramsCuca(PSystemUtils.java:233)
at net.sourceforge.plantuml.PSystemUtils.exportDiagrams(PSystemUtils.java:89)
at net.sourceforge.plantuml.SourceFileReaderAbstract.getGeneratedImages(SourceFileReaderAbstract.java:171)
at net.sourceforge.plantuml.Run.manageFileInternal(Run.java:527)
at net.sourceforge.plantuml.Run.processArgs(Run.java:410)
at net.sourceforge.plantuml.Run.manageAllFiles(Run.java:377)
at net.sourceforge.plantuml.Run.main(Run.java:205)
Caused by: java.lang.IndexOutOfBoundsException: Index: 0
at java.base/java.util.Collections$EmptyList.get(Unknown Source)
at net.sourceforge.plantuml.svek.SvekUtils.getMinX(SvekUtils.java:85)
at net.sourceforge.plantuml.svek.DotStringFactory.solve(DotStringFactory.java:391)
at net.sourceforge.plantuml.svek.GeneralImageBuilder.buildImage(GeneralImageBuilder.java:475)
... 12 more
jetty@49949750aca0:/tmp$ java -jar /plantuml.jar -version
PlantUML version 1.2021.9 (Sun Jul 25 10:13:56 UTC 2021)
(GPL source distribution)
Java Runtime: OpenJDK Runtime Environment
JVM: OpenJDK 64-Bit Server VM
Default Encoding: UTF-8
Language: en
Country: null
PLANTUML_LIMIT_SIZE: 4096
Dot version: dot - graphviz version 2.40.1 (20161225.0304)
Installation seems OK. File generation OK
The cyphered source that was able to reproduce the problem is
@startuml vdjm
state ouwytfp {
state whctqpbh
state colzcimiwss {
state saeeblh
state tfiwij
state anrzlcsp
}
whctqpbh --> colzcimiwss : gifuurtrqtqazgojgtkigd
}
state cizslvns {
state ahfepoqbxiqlev
state ccgpgnuj
state stop <<entryPoint>>
state stop_syhegge
state ctyygnlpdsi <<entryPoint>>
stop -> ahfepoqbxiqlev
ctyygnlpdsi -> ccgpgnuj
ahfepoqbxiqlev -> ccgpgnuj : trpgcpfpubxrpmslhnozrch
ahfepoqbxiqlev -> stop_syhegge : trpgcpfpubxrpmslhnozrch
ccgpgnuj -> stop_syhegge : trpgcpfpubxrpmslhnozrch
}
state diyg {
state qfahki <<entryPoint>>
state sucmbse <<entryPoint>>
qfahki -> fhemvx
sucmbse -> mrslsoa
}
diyg : stop /
[*] -> recztbg
recztbg --> ouwytfp : pfokmhgnrboqbdfkodn
recztbg --> stop : lhnl
recztbg --> ctyygnlpdsi : anfi
recztbg --> dswslteliezkp : trpgcpfpubxrpmslhnozrch
recztbg --> sucmbse : trpgcpfpubxrpmslhnozrch
ouwytfp --> stop : trpgcpfpubxrpmslhnozrch
ouwytfp : gifuurtrqtqazgojgtkigd
ouwytfp --> qfahki : gpnjojr
ouwytfp --> diyg : gifuurtrqtqazgojgtkigd
dswslteliezkp --> stop : trpgcpfpubxrpmslhnozrch
dswslteliezkp --> ouwytfp : pfokmhgnrboqbdfkodn
dswslteliezkp --> diyg : nnyioifolwcdepek
dswslteliezkp : nnyioifolwcdepek
cizslvns -> diyg : nnyioifolwcdepek
stop_syhegge --> qfahki
diyg --> dswslteliezkp : anfi
@enduml