Crash in ganttDiagram with style and progress > 100%

0 votes
asked Sep 15 in Bug by jeromejh

Hello,

The following diagram causes an exception in plantuml.1.2021.10.jar

@startgantt
printscale weekly
saturday are closed
sunday are closed
Project starts 2021-08-1

<style>
ganttDiagram {
    task {
        BackGroundColor #f34d67
        LineColor #f34d67
    }
}
</style>
[task1] ends 2021-09-14
[task1] lasts 20 days
[task1] is 153% completed
@endgantt

The color directives and the task progress > 100% are both necessary. Below is the stacktrace:

java.lang.IllegalArgumentException: Color parameter outside of expected range - Luminance
    at net.sourceforge.plantuml.ugraphic.color.HSLColor.toRGB(HSLColor.java:333)
    at net.sourceforge.plantuml.ugraphic.color.HSLColor.toRGB(HSLColor.java:299)
    at net.sourceforge.plantuml.ugraphic.color.HSLColor.<init>(HSLColor.java:87)
    at net.sourceforge.plantuml.ugraphic.color.HSLColor.<init>(HSLColor.java:74)
    at net.sourceforge.plantuml.ugraphic.color.HColorSimple.unlinear(HColorSimple.java:156)
    at net.sourceforge.plantuml.ugraphic.color.HColorUtils.unlinear(HColorUtils.java:163)
    at net.sourceforge.plantuml.project.draw.AbstractTaskDraw.getLineColor(AbstractTaskDraw.java:112)
    at net.sourceforge.plantuml.project.draw.TaskDrawRegular.applyColors(TaskDrawRegular.java:251)
    at net.sourceforge.plantuml.project.draw.TaskDrawRegular.drawU(TaskDrawRegular.java:184)
    at net.sourceforge.plantuml.project.GanttDiagram.drawTasksRect(GanttDiagram.java:374)
    at net.sourceforge.plantuml.project.GanttDiagram.access$400(GanttDiagram.java:114)
    at net.sourceforge.plantuml.project.GanttDiagram$1.drawU(GanttDiagram.java:263)
    at net.sourceforge.plantuml.ugraphic.ImageBuilder.getFinalDimension(ImageBuilder.java:332)
    at net.sourceforge.plantuml.ugraphic.ImageBuilder.writeImageInternal(ImageBuilder.java:264)
    at net.sourceforge.plantuml.ugraphic.ImageBuilder.write(ImageBuilder.java:251)
    at net.sourceforge.plantuml.project.GanttDiagram.exportDiagramNow(GanttDiagram.java:197)
    at net.sourceforge.plantuml.AbstractPSystem.exportDiagram(AbstractPSystem.java:157)
    at net.sourceforge.plantuml.PSystemUtils.exportDiagramsGantt2(PSystemUtils.java:272)
    at net.sourceforge.plantuml.PSystemUtils.exportDiagrams(PSystemUtils.java:92)
    at net.sourceforge.plantuml.SourceFileReaderAbstract.getGeneratedImages(SourceFileReaderAbstract.java:171)
    at net.sourceforge.plantuml.Run.manageFileInternal(Run.java:527)
    at net.sourceforge.plantuml.Run.processArgs(Run.java:410)
    at net.sourceforge.plantuml.Run.manageAllFiles(Run.java:377)
    at net.sourceforge.plantuml.Run.main(Run.java:205)
java.lang.IllegalArgumentException: Color parameter outside of expected range - Luminance
    at net.sourceforge.plantuml.ugraphic.color.HSLColor.toRGB(HSLColor.java:333)
    at net.sourceforge.plantuml.ugraphic.color.HSLColor.toRGB(HSLColor.java:299)
    at net.sourceforge.plantuml.ugraphic.color.HSLColor.<init>(HSLColor.java:87)
    at net.sourceforge.plantuml.ugraphic.color.HSLColor.<init>(HSLColor.java:74)
    at net.sourceforge.plantuml.ugraphic.color.HColorSimple.unlinear(HColorSimple.java:156)
    at net.sourceforge.plantuml.ugraphic.color.HColorUtils.unlinear(HColorUtils.java:163)
    at net.sourceforge.plantuml.project.draw.AbstractTaskDraw.getLineColor(AbstractTaskDraw.java:112)
    at net.sourceforge.plantuml.project.draw.TaskDrawRegular.applyColors(TaskDrawRegular.java:251)
    at net.sourceforge.plantuml.project.draw.TaskDrawRegular.drawU(TaskDrawRegular.java:184)
    at net.sourceforge.plantuml.project.GanttDiagram.drawTasksRect(GanttDiagram.java:374)
    at net.sourceforge.plantuml.project.GanttDiagram.access$400(GanttDiagram.java:114)
    at net.sourceforge.plantuml.project.GanttDiagram$1.drawU(GanttDiagram.java:263)
    at net.sourceforge.plantuml.ugraphic.ImageBuilder.writeImageInternal(ImageBuilder.java:284)
    at net.sourceforge.plantuml.ugraphic.ImageBuilder.write(ImageBuilder.java:251)
    at net.sourceforge.plantuml.project.GanttDiagram.exportDiagramNow(GanttDiagram.java:197)
    at net.sourceforge.plantuml.AbstractPSystem.exportDiagram(AbstractPSystem.java:157)
    at net.sourceforge.plantuml.PSystemUtils.exportDiagramsGantt2(PSystemUtils.java:272)
    at net.sourceforge.plantuml.PSystemUtils.exportDiagrams(PSystemUtils.java:92)
    at net.sourceforge.plantuml.SourceFileReaderAbstract.getGeneratedImages(SourceFileReaderAbstract.java:171)
    at net.sourceforge.plantuml.Run.manageFileInternal(Run.java:527)
    at net.sourceforge.plantuml.Run.processArgs(Run.java:410)
    at net.sourceforge.plantuml.Run.manageAllFiles(Run.java:377)
    at net.sourceforge.plantuml.Run.main(Run.java:205)

 Have not found how to attach the png. Anyway here are the command line and Java version:

java -jar ~/Downloads/plantuml.1.2021.10.jar plan.plantuml -o.

java --version
openjdk 11.0.11 2021-04-20
OpenJDK Runtime Environment (build 11.0.11+9-Ubuntu-0ubuntu2.20.04)
OpenJDK 64-Bit Server VM (build 11.0.11+9-Ubuntu-0ubuntu2.20.04, mixed mode, sharing)

Workaround is not to have progress > 100% :)

BR

Jeromejh

commented Sep 15 by The-Lu (31,620 points)

In fact 131% is the max... without error...wink
 

1 Answer

+1 vote
answered Sep 15 by plantuml (257,940 points)

Many thanks for the feedback.

This has been fixed in last beta http://beta.plantuml.net/plantuml.jar and on the online server.

commented Sep 17 by jeromejh (100 points)
Thanks a lot for plantUML :)
...