UnsupportedOperationException in gantt

+1 vote
asked Nov 2, 2018 in Bug by AlexL (140 points)

C:\Users\xxx\Desktop>java -jar plantuml.1.2018.12.jar
Nov 02, 2018 12:34:30 AM java.util.prefs.WindowsPreferences <init>
WARNING: Could not open/create prefs root node Software\JavaSoft\Prefs at root 0x80000002. Windows RegCreateKeyEx(...) returned error code 5.
java.lang.UnsupportedOperationException
        at net.sourceforge.plantuml.project3.TaskSeparator.getEnd(TaskSeparator.java:59)
        at net.sourceforge.plantuml.project3.GanttDiagram.initMinMax(GanttDiagram.java:360)
        at net.sourceforge.plantuml.project3.GanttDiagram.access$000(GanttDiagram.java:76)
        at net.sourceforge.plantuml.project3.GanttDiagram$2.drawU(GanttDiagram.java:155)
        at net.sourceforge.plantuml.ugraphic.ImageBuilder.getFinalDimension(ImageBuilder.java:281)
        at net.sourceforge.plantuml.ugraphic.ImageBuilder.writeImageInternal(ImageBuilder.java:215)
        at net.sourceforge.plantuml.ugraphic.ImageBuilder.writeImageTOBEMOVED(ImageBuilder.java:178)
        at net.sourceforge.plantuml.project3.GanttDiagram.exportDiagramNow(GanttDiagram.java:135)
        at net.sourceforge.plantuml.AbstractPSystem.exportDiagram(AbstractPSystem.java:135)
        at net.sourceforge.plantuml.PSystemUtils.exportDiagramsGantt2(PSystemUtils.java:295)
        at net.sourceforge.plantuml.PSystemUtils.exportDiagrams(PSystemUtils.java:95)
        at net.sourceforge.plantuml.SourceFileReaderAbstract.getGeneratedImages(SourceFileReaderAbstract.java:153)
        at net.sourceforge.plantuml.DirWatcher2$1.call(DirWatcher2.java:94)
        at net.sourceforge.plantuml.DirWatcher2$1.call(DirWatcher2.java:90)
        at java.util.concurrent.FutureTask.run(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
        at java.lang.Thread.run(Unknown Source)

It was working 5 minutes ago, but without reason it stopped. Even simple stuff like this leads to the shown error message on command line. In the GUI my txt file is simply disappearing after less than a 1second.

@startgantt
Project starts the 5th of november 2018
@endgantt

commented Nov 2, 2018 by albert (2,500 points)
With version 1.2018.13beta4 it crashes for me as well, but only when I feed the model as indicated and the message is each time the same. When supplying the Calendar example from the documentation it works.
The error message I get is:
Exception in thread "main" java.util.NoSuchElementException
        at java.util.LinkedHashMap$LinkedHashIterator.nextEntry(Unknown Source)
        at java.util.LinkedHashMap$ValueIterator.next(Unknown Source)
        at net.sourceforge.plantuml.project3.GanttDiagram.initMinMax(GanttDiagram.java:360)
        at net.sourceforge.plantuml.project3.GanttDiagram.access$0(GanttDiagram.java:358)
        at net.sourceforge.plantuml.project3.GanttDiagram$2.drawU(GanttDiagram.java:155)
        at net.sourceforge.plantuml.ugraphic.ImageBuilder.getFinalDimension(ImageBuilder.java:281)
        at net.sourceforge.plantuml.ugraphic.ImageBuilder.writeImageInternal(ImageBuilder.java:215)
        at net.sourceforge.plantuml.ugraphic.ImageBuilder.writeImageTOBEMOVED(ImageBuilder.java:178)
        at net.sourceforge.plantuml.project3.GanttDiagram.exportDiagramNow(GanttDiagram.java:135)
        at net.sourceforge.plantuml.AbstractPSystem.exportDiagram(AbstractPSystem.java:135)
        at net.sourceforge.plantuml.PSystemUtils.exportDiagramsGantt2(PSystemUtils.java:295)
        at net.sourceforge.plantuml.PSystemUtils.exportDiagrams(PSystemUtils.java:95)
        at net.sourceforge.plantuml.SourceFileReaderAbstract.getGeneratedImages(SourceFileReaderAbstract.java:153)
        at net.sourceforge.plantuml.Run.manageFileInternal(Run.java:499)
        at net.sourceforge.plantuml.Run.processArgs(Run.java:398)
        at net.sourceforge.plantuml.Run.manageAllFiles(Run.java:367)
        at net.sourceforge.plantuml.Run.main(Run.java:189)

1 Answer

0 votes
answered Nov 4, 2018 by plantuml (198,780 points)
Thanks for the report.

This is fixed in last beta http://beta.plantuml.net/plantuml.jar
...