java.lang.IllegalArgumentException on diagrams with empty `StereotypeFontSize 0` element
See original GitHub issueApologies for the broad bug report, but I’m having an odd issue with just the IntelliJ plugin that I can’t reproduce even by calling java -jar ~/Library/Application\ Support/JetBrains/IntelliJIdea2020.2/plugins/plantuml4idea/lib/plantuml.1.2020.9.jar -t png ...
Here’s the stacktrace from the intellij log:
2020-08-24 15:39:14,248 [1096247] INFO - STDERR - java.lang.IllegalArgumentException
2020-08-24 15:39:14,248 [1096247] INFO - STDERR - at net.sourceforge.plantuml.Dimension2DDouble.<init>(Dimension2DDouble.java:49)
2020-08-24 15:39:14,248 [1096247] INFO - STDERR - at net.sourceforge.plantuml.FileFormat.getJavaDimension(FileFormat.java:128)
2020-08-24 15:39:14,248 [1096247] INFO - STDERR - at net.sourceforge.plantuml.FileFormat.access$000(FileFormat.java:61)
2020-08-24 15:39:14,248 [1096247] INFO - STDERR - at net.sourceforge.plantuml.FileFormat$1.calculateDimension(FileFormat.java:118)
2020-08-24 15:39:14,248 [1096247] INFO - STDERR - at net.sourceforge.plantuml.creole.atom.AtomText.calculateDimension(AtomText.java:192)
2020-08-24 15:39:14,248 [1096247] INFO - STDERR - at net.sourceforge.plantuml.creole.Sea.add(Sea.java:57)
2020-08-24 15:39:14,248 [1096247] INFO - STDERR - at net.sourceforge.plantuml.creole.SheetBlock1.initMap(SheetBlock1.java:116)
2020-08-24 15:39:14,248 [1096247] INFO - STDERR - at net.sourceforge.plantuml.creole.SheetBlock1.calculateDimension(SheetBlock1.java:158)
2020-08-24 15:39:14,248 [1096247] INFO - STDERR - at net.sourceforge.plantuml.creole.SheetBlock2.calculateDimension(SheetBlock2.java:90)
2020-08-24 15:39:14,248 [1096247] INFO - STDERR - at net.sourceforge.plantuml.graphic.USymbolRect$1.calculateDimension(USymbolRect.java:94)
2020-08-24 15:39:14,248 [1096247] INFO - STDERR - at net.sourceforge.plantuml.svek.image.EntityImageDescription.calculateDimension(EntityImageDescription.java:212)
2020-08-24 15:39:14,248 [1096247] INFO - STDERR - at net.sourceforge.plantuml.svek.Node.<init>(Node.java:98)
2020-08-24 15:39:14,248 [1096247] INFO - STDERR - at net.sourceforge.plantuml.svek.Bibliotekon.createNode(Bibliotekon.java:63)
2020-08-24 15:39:14,248 [1096247] INFO - STDERR - at net.sourceforge.plantuml.svek.GeneralImageBuilder.printEntity(GeneralImageBuilder.java:517)
2020-08-24 15:39:14,248 [1096247] INFO - STDERR - at net.sourceforge.plantuml.svek.GeneralImageBuilder.printGroups(GeneralImageBuilder.java:576)
2020-08-24 15:39:14,248 [1096247] INFO - STDERR - at net.sourceforge.plantuml.svek.GeneralImageBuilder.buildImage(GeneralImageBuilder.java:374)
2020-08-24 15:39:14,248 [1096247] INFO - STDERR - at net.sourceforge.plantuml.svek.CucaDiagramFileMakerSvek.createFileInternal(CucaDiagramFileMakerSvek.java:112)
2020-08-24 15:39:14,248 [1096247] INFO - STDERR - at net.sourceforge.plantuml.svek.CucaDiagramFileMakerSvek.createFile(CucaDiagramFileMakerSvek.java:77)
2020-08-24 15:39:14,248 [1096247] INFO - STDERR - at net.sourceforge.plantuml.cucadiagram.CucaDiagram.exportDiagramInternal(CucaDiagram.java:651)
2020-08-24 15:39:14,248 [1096247] INFO - STDERR - at net.sourceforge.plantuml.UmlDiagram.exportDiagramNow(UmlDiagram.java:201)
2020-08-24 15:39:14,248 [1096247] INFO - STDERR - at net.sourceforge.plantuml.AbstractPSystem.exportDiagram(AbstractPSystem.java:135)
2020-08-24 15:39:14,248 [1096247] INFO - STDERR - at net.sourceforge.plantuml.SourceStringReader.outputImage(SourceStringReader.java:158)
2020-08-24 15:39:14,248 [1096247] INFO - STDERR - at org.plantuml.idea.rendering.PlantUmlNormalRenderer.generateImageItem(PlantUmlNormalRenderer.java:219)
2020-08-24 15:39:14,248 [1096247] INFO - STDERR - at org.plantuml.idea.rendering.PlantUmlNormalRenderer.incrementalRendering(PlantUmlNormalRenderer.java:163)
2020-08-24 15:39:14,248 [1096247] INFO - STDERR - at org.plantuml.idea.rendering.PlantUmlNormalRenderer.doRender(PlantUmlNormalRenderer.java:135)
2020-08-24 15:39:14,248 [1096247] INFO - STDERR - at org.plantuml.idea.rendering.PlantUmlRendererUtil.render(PlantUmlRendererUtil.java:74)
2020-08-24 15:39:14,248 [1096247] INFO - STDERR - at org.plantuml.idea.rendering.RenderCommand.run(RenderCommand.java:71)
2020-08-24 15:39:14,248 [1096247] INFO - STDERR - at org.plantuml.idea.rendering.LazyApplicationPoolExecutor$1.run(LazyApplicationPoolExecutor.java:122)
2020-08-24 15:39:14,248 [1096247] INFO - STDERR - at com.intellij.util.RunnableCallable.call(RunnableCallable.java:20)
2020-08-24 15:39:14,248 [1096247] INFO - STDERR - at com.intellij.util.RunnableCallable.call(RunnableCallable.java:11)
2020-08-24 15:39:14,248 [1096247] INFO - STDERR - at com.intellij.openapi.application.impl.ApplicationImpl$1.call(ApplicationImpl.java:268)
2020-08-24 15:39:14,248 [1096247] INFO - STDERR - at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
2020-08-24 15:39:14,248 [1096247] INFO - STDERR - at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
2020-08-24 15:39:14,248 [1096247] INFO - STDERR - at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
2020-08-24 15:39:14,248 [1096247] INFO - STDERR - at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:668)
2020-08-24 15:39:14,248 [1096247] INFO - STDERR - at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:665)
2020-08-24 15:39:14,248 [1096247] INFO - STDERR - at java.base/java.security.AccessController.doPrivileged(Native Method)
2020-08-24 15:39:14,248 [1096247] INFO - STDERR - at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1.run(Executors.java:665)
2020-08-24 15:39:14,248 [1096247] INFO - STDERR - at java.base/java.lang.Thread.run(Thread.java:834)
And the diagram
@startuml
!pragma revision 1
!pragma teoz true
skinparam maxMessageSize 120
skinparam pathHoverColor red
skinparam svgLinkTarget _parent
skinparam ArrowThickness 2
scale 0.9
!define includes ./includes
!include includes/C4.puml
!include includes/C4_Container.puml
node pingdom
Boundary(ess, "ESS") {
}
@enduml
C4 is from https://github.com/RicardoNiepel/C4-PlantUML (58b5da5).
If I fill in the Boundary
, the diagram works fine. It also works fine via the CLI.
Here’s the generated error as well. Looks like it might have something to do dimension calculation.
Issue Analytics
- State:
- Created 3 years ago
- Comments:13
Top Results From Across the Web
java.lang.IllegalArgumentException: Pattern cannot be null or ...
apth") is probably returning null or empty string. login.url.apth seems to be a typo. Make sure that environment variable is correctly set. – ......
Read more >handle must not be 0 when iterating through Array
On rare occasions I can see a stack trace like this: java.lang.IllegalArgumentException: handle must not be 0 at com.couchbase.lite.internal.
Read more >Solving java.lang.IllegalArgumentException
java.lang.IllegalArgumentException is thrown in order to indicate that a method has been passed an illegal or inappropriate argument.
Read more >java.lang.IllegalArgumentException: PCollection wi...
java.lang.IllegalArgumentException: PCollection with more than one element accessed as a singleton view. Consider using Combine.globally().
Read more >RE: Exceptionjava.lang.IllegalArgumentException: image/png ...
Exceptionjava.lang.IllegalArgumentException: image/png is an unsupported co ... Hi All, I have a requirement to show a Jfree chart in spring portlet with sample ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Seems fixed on the C4 end.
At this stage I’m thinking wait for the next jetbrains release. If it persists maybe open an plantuml issue to see if they can make it more resilient to a possible NaN when computing text width.