Duplicated metadata in PNG?

+1 vote
asked Jan 21, 2021 in Bug by Alexander (120 points)
edited Jan 21, 2021 by Alexander

Environment: Windows 10, Java 1.8.0_241, PlantUML version 1.2020.22 (also reproduced it with V1.2021.0)

Initially met it in VS Code + PlanUML extension, also reproduced it in command line (java -jar plantuml.jar)

Steps to reproduce:

  1. Create sequence diagram
  2. Export diagram to PNG
  3. Use 'Extract PlantUML Diagram Source from Image' on file from step 2.

Expected result:
Diagram can be extracted and result matches initial diagram

Actual result:
Initial diagram can be extracted, but data is duplicated (extracted/displayed twice)

commented Mar 8, 2021 by chris (2,540 points)
edited Mar 9, 2021 by chris

I also see duplicate metadata in generated SVGs, here is my minimal example. The issue is caused by having a comment in the file, this UML when generated as a SVG includes duplicate metadata. If you remove the comment, the duplication goes away:

@startuml
'merge
a -> b
@enduml

I've verified this locally and on the online server (using "View page source" you can see the issue is the diagram is recorded once with comments, then once without)

@startuml
'merge
a -> b
@enduml

@startuml
a -> b
@enduml

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
Anti-spam verification:

[Antispam2 Feature: please please wait 1 or 2 minutes (this message will disappear) before pressing the button otherwise it will fail](--------)
To avoid this verification in future, please log in or register.
...