Why do I get java.lang.ArrayIndexOutOfBoundsException: Index 9 out of bounds for length 5 when using Smetana

0 votes
asked Dec 11, 2024 in Bug by Johannes Thorn

Hello,

I'm the author of DomainStory-PlantUML. I tried to convert my testing diagrams using Smetana getting the following error when converting https://github.com/johthor/DomainStory-PlantUML/blob/automated-snapshot-tests/test/puml/notes/elements-topToBottom.puml and https://github.com/johthor/DomainStory-PlantUML/blob/automated-snapshot-tests/test/puml/notes/elements-leftToRight.puml

java.lang.ArrayIndexOutOfBoundsException: Index 9 out of bounds for length 5
        at gen.lib.dotgen.mincross__c.left2right(mincross__c.java:367)
        at gen.lib.dotgen.mincross__c.transpose_step(mincross__c.java:520)
        at gen.lib.dotgen.mincross__c.transpose(mincross__c.java:569)
        at gen.lib.dotgen.mincross__c.build_ranks(mincross__c.java:1357)
        at gen.lib.dotgen.mincross__c.mincross_(mincross__c.java:599)
        at gen.lib.dotgen.mincross__c.dot_mincross(mincross__c.java:174)
        at gen.lib.dotgen.dotinit__c.dotLayout(dotinit__c.java:366)
        at gen.lib.dotgen.dotinit__c.doDot(dotinit__c.java:488)
        at gen.lib.dotgen.dotinit__c.dot_layout(dotinit__c.java:543)
        at gen.lib.dotgen.dotinit__c$2.exe(dotinit__c.java:535)
        at gen.lib.gvc.gvlayout__c.gvLayoutJobs(gvlayout__c.java:152)
        at net.sourceforge.plantuml.sdot.CucaDiagramFileMakerSmetana.getTextBlock(CucaDiagramFileMakerSmetana.java:475)
        at net.sourceforge.plantuml.sdot.CucaDiagramFileMakerSmetana.createFileLocked(CucaDiagramFileMakerSmetana.java:446)
        at net.sourceforge.plantuml.sdot.CucaDiagramFileMakerSmetana.createFile(CucaDiagramFileMakerSmetana.java:420)
        at net.atmp.CucaDiagram.exportDiagramInternal(CucaDiagram.java:455)
        at net.sourceforge.plantuml.UmlDiagram.exportDiagramNow(UmlDiagram.java:138)
        at net.sourceforge.plantuml.AbstractPSystem.exportDiagram(AbstractPSystem.java:207)
        at net.sourceforge.plantuml.PSystemUtils.exportDiagramsDefault(PSystemUtils.java:207)
        at net.sourceforge.plantuml.PSystemUtils.exportDiagrams(PSystemUtils.java:96)
        at net.sourceforge.plantuml.SourceFileReaderAbstract.getGeneratedImages(SourceFileReaderAbstract.java:190)
        at net.sourceforge.plantuml.Run.manageFileInternal(Run.java:510)
        at net.sourceforge.plantuml.Run.processArgs(Run.java:404)
        at net.sourceforge.plantuml.Run.manageAllFiles(Run.java:371)
        at net.sourceforge.plantuml.Run.main(Run.java:206)

When I'm not using Smetana both diagrams render as expected.

What can I do to make both diagrams render finde when using Smetana?

The output of plantuml -version
 

PlantUML version 1.2024.7 (Sat Sep 07 13:18:17 CEST 2024)
(GPL source distribution)
Java Runtime: OpenJDK Runtime Environment
JVM: OpenJDK 64-Bit Server VM
Default Encoding: UTF-8
Language: de
Country: DE
 
PLANTUML_LIMIT_SIZE: 4096

Dot version: dot - graphviz version 12.1.2 (20240928.0832)
Installation seems OK. File generation OK

commented Dec 13, 2024 by The-Lu (76,660 points)

Hello J.,

I just open this issue, with a minimal not working example:

But FYI, there are a lot know issue with Smetana (port, ...)

Regards,
Th.

1 Answer

0 votes
answered Jan 8 by The-Lu (76,660 points)

Hi J.,

[This is an Issue Review]  

This is now fixed on:

Regards.,
Th.

...