"on the same row" breaks when used on self

0 votes
asked Aug 24 in Bug by Fredrik Östman (120 points)

Using plantuml-nodot.1.2022.7.jar, this Gantt chart code:

[Nomination] happens 2022-03-31 and displays on same row as [Nomination]

causes an exception i Java:

Exception in thread "main" java.lang.StackOverflowError
        at java.util.HashMap.hash(HashMap.java:340)
        at java.util.LinkedHashMap.get(LinkedHashMap.java:440)
        at net.sourceforge.plantuml.project.GanttDiagram.getTaskDraw(GanttDiagram.java:805)
        at net.sourceforge.plantuml.project.draw.AbstractTaskDraw.getTrueRow(AbstractTaskDraw.java:146)
        at net.sourceforge.plantuml.project.draw.AbstractTaskDraw.getY(AbstractTaskDraw.java:154)
        at net.sourceforge.plantuml.project.draw.AbstractTaskDraw.getY(AbstractTaskDraw.java:154)
        at net.sourceforge.plantuml.project.draw.AbstractTaskDraw.getY(AbstractTaskDraw.java:154)
        at net.sourceforge.plantuml.project.draw.AbstractTaskDraw.getY(AbstractTaskDraw.java:154)
        at net.sourceforge.plantuml.project.draw.AbstractTaskDraw.getY(AbstractTaskDraw.java:154)
        at net.sourceforge.plantuml.project.draw.AbstractTaskDraw.getY(AbstractTaskDraw.java:154)
        at net.sourceforge.plantuml.project.draw.AbstractTaskDraw.getY(AbstractTaskDraw.java:154)

The last message repeats very often. I know the code looks useless, but (a) it makes generating the code easier and (b) faulty input must never cause an uncaught exception.

I have:

WIN64> java -version
openjdk version "1.8.0_332"
OpenJDK Runtime Environment (build 1.8.0_332-b09)
OpenJDK 64-Bit Server VM (build 25.332-b09, mixed mode)

Best regards,

Fredrik Östman

1 Answer

0 votes
answered Aug 26 by plantuml (279,680 points)

Thanks for the report.

This has been fixed in last snapshot and on the online server.

Tell us if you find other issues!

commented Aug 29 by Fredrik Östman
Thanks! Will do.
...