Unstable height when using partition and if sequence in activity diagram.

0 votes
asked Apr 29, 2016 in Bug by anonymous
retagged Apr 29, 2016

Hello.

plantUML is very useful tool for me but I have a problem.

When I use partition and if sequence, an output image height becomes unstable.

Does anybody have a solution?

I'm using

  • OSX el capitan (10.11.4)
  • java version "1.8.0_45"
  • plantUML 8039

This is sample code.

@startuml
 
(*) --> "A"
--> "B"
 
partition Activation {
--> "C"
--> "D"
--> "E"
}
 
--> "F"
 
if "G" then
partition Setup {
-> [a] "H"
--> "I"
--> "J"
}
--> "K" as last
else
--> [b] last
endif
 
--> (*)
 
@enduml

1 Answer

0 votes
answered Apr 29, 2016 by plantuml (294,960 points)
Not sure to understand "unstable".

In your example, the height is about 1000 pixel, but it does not change (so it looks stable)

http://www.plantuml.com/plantuml/png/K-3IqD9KqDMrKr1oLE82qqvAN0fS1Ob59PabcVbv2ex99PbbYM1cDKI1CrIX2vHsLUAg1Me1izr0cZFJ59JSbHHACbBpa0mAJYqfBG2POQSGdHYheEG1rUu9fRr0ne1PtaeAYSKAEOd59LofESMfOC7ef5YeI5vAPXhKEg3RkHG0

Could you give some more details ? Thanks!
commented Apr 29, 2016 by anonymous
Thanks for your reply!

I tried with online demo server then it's correct.
But in my environment, not stabled.
I download plantUML from here and it may be latest version.
http://sourceforge.net/projects/plantuml/files/plantuml.jar/download

This is my output.
https://www.dropbox.com/s/hhgyrwwczumht3f/first_instruction.png?dl=0

When I remove partition section, it works fine and when I remove if sequence, it not works fine.
Here is my sample code which is removed if sequence.

@startuml
 
(*) --> "A"
--> "B"
 
partition Activation {
--> "C"
--> "D"
--> "E"
}
--> "F"
partition Setup {
-> [a] "H"
--> "I"
--> "J"
}
--> "K"
--> (*)
 
@enduml
commented Apr 29, 2016 by plantuml (294,960 points)
That's indeed really weird !
Could you check you plantuml version using:
@startuml
version
@enduml
and post here the result.

Which tool are you using to launch plantuml ? Command line ?
commented Apr 29, 2016 by anonymous
This is the result.

https://www.dropbox.com/s/hfi9tkt3vzd7hu0/plantUML_version.png?dl=0

It seems that I'm using beta version.
I tried another version like planUML 8037, still same problem occurred.

I'm using from command line and I defined alias like this.
alias pluml="java -jar ~/plantUML/plantuml.jar"
commented Apr 29, 2016 by plantuml (294,960 points)
Ok, thanks for the info.
You are using V8039 (There is bug is this version : V8040beta0 means V8039).
However, you are using GraphViz 2.39, and I think this is the cause of the problem.

Could you please add a line "!pragma svek_trace on" in your test ?
That is, using :
@startuml
!pragma svek_trace on

(*) --> "A"
--> "B"
 
partition Activation {
--> "C"
--> "D"
--> "E"
}
 
--> "F"
 
if "G" then
partition Setup {
-> [a] "H"
--> "I"
--> "J"
}
--> "K" as last
else
--> [b] last
endif
 
--> (*)
 
@enduml

This will cause plantuml to create two debug files "svek.dot" and "svek.svg" in your current directory. And then send us those file so that we can investigate. Thanks!
commented Apr 29, 2016 by anonymous
Thanks a lot ;)

Here are files you need.
https://www.dropbox.com/sh/nlxwpn995ab1737/AABsuAXPz_g2HJAoY-vNcGFMa?dl=0

Thanks!
commented Apr 29, 2016 by plantuml (294,960 points)
Ok. The issue is caused by the result in "svek.svg" (you can open this file in a browser). As you see, GraphViz 2.39 create a buggy SVG file.

If you compare with the DOT file generated with GraphViz 2.38:

For debug purpose, it's possible to give DOT file to plantuml as input, so you can check:

@startuml
digraph unix {
nodesep=0.277778;
ranksep=0.555556;
remincross=true;
searchsize=500;
sh0018->sh0011[arrowtail=none,arrowhead=empty,arrowsize=0.5,color="#000031",label=<<TABLE BGCOLOR="#000032" FIXEDSIZE="TRUE" WIDTH="9" HEIGHT="17"><TR><TD></TD></TR></TABLE>>];
sh0014 [shape=circle,label="",width=0.277778,height=0.277778,color="#00000E"];
sh0015 [shape=rect,style=rounded,label="",width=0.388889,height=0.474067,color="#00000F"];
sh0016 [shape=rect,style=rounded,label="",width=0.375000,height=0.474067,color="#000010"];
sh0017 [shape=rect,style=rounded,label="",width=0.361111,height=0.474067,color="#000011"];
sh0018 [shape=diamond,label="",width=0.333333,height=0.333333,color="#000012"];
sh0019 [shape=rect,style=rounded,label="",width=0.388889,height=0.474067,color="#000013"];
sh0020 [shape=circle,label="",width=0.277778,height=0.277778,color="#000014"];
subgraph cluster4p0 {label="";subgraph cluster4 {style=solid;color="#000004";label=<<TABLE BGCOLOR="#000005" FIXEDSIZE="TRUE" WIDTH="73" HEIGHT="11"><TR><TD></TD></TR></TABLE>>;
subgraph cluster4p1 {label="";
sh0006 [shape=rect,style=rounded,label="",width=0.388889,height=0.474067,color="#000006"];
sh0007 [shape=rect,style=rounded,label="",width=0.402778,height=0.474067,color="#000007"];
sh0008 [shape=rect,style=rounded,label="",width=0.375000,height=0.474067,color="#000008"];
}}}
subgraph cluster9p0 {label="";subgraph cluster9 {style=solid;color="#000009";label=<<TABLE BGCOLOR="#00000A" FIXEDSIZE="TRUE" WIDTH="40" HEIGHT="11"><TR><TD></TD></TR></TABLE>>;
subgraph cluster9p1 {label="";
sh0011 [shape=rect,style=rounded,label="",width=0.402778,height=0.474067,color="#00000B"];
sh0012 [shape=rect,style=rounded,label="",width=0.319444,height=0.474067,color="#00000C"];
sh0013 [shape=rect,style=rounded,label="",width=0.333333,height=0.474067,color="#00000D"];
}}}
sh0014->sh0015[arrowtail=none,arrowhead=empty,arrowsize=0.5,minlen=1,color="#000015"];
sh0015->sh0016[arrowtail=none,arrowhead=empty,arrowsize=0.5,minlen=1,color="#000019"];
sh0016->sh0006[arrowtail=none,arrowhead=empty,arrowsize=0.5,minlen=1,color="#00001D"];
sh0006->sh0007[arrowtail=none,arrowhead=empty,arrowsize=0.5,minlen=1,color="#000021"];
sh0007->sh0008[arrowtail=none,arrowhead=empty,arrowsize=0.5,minlen=1,color="#000025"];
sh0008->sh0017[arrowtail=none,arrowhead=empty,arrowsize=0.5,minlen=1,color="#000029"];
sh0017->sh0018[arrowtail=none,arrowhead=empty,arrowsize=0.5,minlen=1,color="#00002D",headlabel=<<TABLE BGCOLOR="#000030" FIXEDSIZE="TRUE" WIDTH="9" HEIGHT="15"><TR><TD></TD></TR></TABLE>>];
sh0011->sh0012[arrowtail=none,arrowhead=empty,arrowsize=0.5,minlen=1,color="#000035"];
sh0012->sh0013[arrowtail=none,arrowhead=empty,arrowsize=0.5,minlen=1,color="#000039"];
sh0013->sh0019[arrowtail=none,arrowhead=empty,arrowsize=0.5,minlen=1,color="#00003D"];
sh0018->sh0019[arrowtail=none,arrowhead=empty,arrowsize=0.5,minlen=1,color="#000041",label=<<TABLE BGCOLOR="#000042" FIXEDSIZE="TRUE" WIDTH="10" HEIGHT="17"><TR><TD></TD></TR></TABLE>>];
sh0019->sh0020[arrowtail=none,arrowhead=empty,arrowsize=0.5,minlen=1,color="#000045"];

}
@enduml


You see a different result:
http://www.plantuml.com/plantuml/png/hPPTRvim58RlyokGTyis6yo7bJXIKsWJgLAbBDEcLRkWO1Kq0X4GTLsK_pu734wMb1RDHmg9GJoyEQyFvqJ9Kn5iOcsR9R-rtIZB8rQo3OMV38U7EnuLGVQhEMCTmkPds3h9mY8lIreLMpOUbImemhXC_Z1gGSZNCOJ8_JYjlz53K1JvSnKaAStoZEdrCcP1HDbwKxqqw_fc_WWzpDEyeE03v64YeAV18qlfPBAwcjtvskps-lxkVjbUDu1si_ZkUryMFtmALiklFj2-BRpLd082jBc_k9slA40Ec4vMI_xnffFFpM5vE1oGq-bF8HXh3sKSR1WDao9CcNWo0Ffp4bLnbn4zPibJNCdriMBeWnPdjRY2XPLULYyf_vbliuX5vsZJvK4a6ZiOsiuf-gP3suFG3lS4zg8HxD3E8BIDUFIZKOTsMtIK1EiykyIhG_B4-eHdT3oYEC78RD46LB0L4AvnsyUcli9qMrQim1kexLhS-Eogjcl-HvcdIJG-iH-3SLyjGElrMd3Ces90lSLmIJ4wKbpd1zggzxRTfXuEse0O6YSsN48x7TfLN3RGFQ3t-_rPpaYlowJ7PVA6orUlkupXVxXCpbr6IBKLiwvsZK5M888nxaTVTsXp4FgVDyubjDUvN7S9qTQiOMsDTyoKPHITlY8isIq4rbQ19R9JD5Ye1EjrbTHY7GLO0ydQ5rXN1TQITIzogqIjpArGYvIezO1-kADtse7lctQiTqqxIAWt5AWtvJus1DPKWPMvDWMMgC1wSYHHYCLl3AkuPrX5SF2qIXhf1bGXlVPljFyB

So it looks like a bug in GraphViz 2.39.
Unfortunatly, we do not has access to GraphViz 2.39 so it will be difficult to progress here. The idea is to simplify this DOT file to the "shortest file that shows the issue", and to post a message on GraphViz website so that they can fix it.

Are you ok to help us to find out this "shortest file" ?
commented Apr 29, 2016 by anonymous
Oh, this issue is caused by GraphViz 2.39.
Ok I'll feedback to GraphViz team.

Thanks a lot!
commented Apr 29, 2016 by anonymous
I fixed this issue to install graphviz 2.38.0 from homebrew and set GRAPHVIZ_DOT.

Thank you.
...