Composete state diagram causes UnsupportedOperationException with smetana

0 votes
asked Mar 19 in Bug by saka (180 points)

@startuml
!pragma layout smetana

[*] -> State1
state A {
    State1 -> State2 : auto
    State1 <- State2
}
@enduml

This example causes following error.

java.lang.UnsupportedOperationException: ckfinb4h4twp1ry02y9peyhz
        at smetana.core.Macro.UNSUPPORTED(Macro.java:136)
        at gen.lib.dotgen.cluster__c.interclexp(cluster__c.java:366)
        at gen.lib.dotgen.cluster__c.expand_cluster(cluster__c.java:484)
        at gen.lib.dotgen.mincross__c.mincross_clust(mincross__c.java:314)
        at gen.lib.dotgen.mincross__c.dot_mincross(mincross__c.java:185)
        at gen.lib.dotgen.dotinit__c.dotLayout(dotinit__c.java:370)
        at gen.lib.dotgen.dotinit__c.doDot(dotinit__c.java:492)
        at gen.lib.dotgen.dotinit__c.dot_layout(dotinit__c.java:547)
        at gen.lib.dotgen.dotinit__c$2.exe(dotinit__c.java:539)
        at gen.lib.gvc.gvlayout__c.gvLayoutJobs(gvlayout__c.java:153)
        at net.sourceforge.plantuml.sdot.CucaDiagramFileMakerSmetana.createFileLocked(CucaDiagramFileMakerSmetana.java:437)
        at net.sourceforge.plantuml.sdot.CucaDiagramFileMakerSmetana.createFile(CucaDiagramFileMakerSmetana.java:391)
        at net.sourceforge.plantuml.cucadiagram.CucaDiagram.exportDiagramInternal(CucaDiagram.java:611)
        at net.sourceforge.plantuml.UmlDiagram.exportDiagramNow(UmlDiagram.java:130)
        at net.sourceforge.plantuml.AbstractPSystem.exportDiagram(AbstractPSystem.java:174)
        at net.sourceforge.plantuml.PSystemUtils.exportDiagramsDefault(PSystemUtils.java:205)
        at net.sourceforge.plantuml.PSystemUtils.exportDiagrams(PSystemUtils.java:89)
        at net.sourceforge.plantuml.SourceFileReaderAbstract.getGeneratedImages(SourceFileReaderAbstract.java:174)
        at net.sourceforge.plantuml.DirWatcher2$1.call(DirWatcher2.java:90)
        at net.sourceforge.plantuml.DirWatcher2$1.call(DirWatcher2.java:86)
        at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130)
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630)
        at java.base/java.lang.Thread.run(Thread.java:832)

commented Mar 19 by The-Lu (45,860 points)

Hello S.,

FYI, State diagram is not fully implemented on Smetana.

Here is your example without label: And the `A` is not at the correct place!:

@startuml
!pragma layout smetana
[*] -> State1
state A {
    State1 -> State2
    State1 <- State2 
}
@enduml

See also pseudo-similar issue here:

Awaiting full State diagram management on Smetana. wink Thanks to PlantUML team...

Regards,
Th.

commented Mar 19 by saka (180 points)

This issue is not relate to label. It seems to relate to bidirectional, Sub-state to sub-state connection.

This example is may be better.

@startuml
!pragma layout smetana
state A {
  X : aaa
}
state B {
  Z : ccc
}
X -> Z
X <- Z
@enduml

I hope this report helps improvement for smetana.

1 Answer

0 votes
answered Mar 19 by plantuml (276,340 points)

Thanks for the report. It definitively help!

Last snapshot fixes the crash.

However, the drawing is not perfect yet.

Tell us if you find other issues!

...