"material" stdlib is not working in the current version ("IOException stream closed")

0 votes
asked Jun 24 in Bug by kirchsth (7,760 points)

The original problem was found in the domainstory stdlib.

!include <material/$icon>

produces

java.io.IOException: Stream closed
	at java.base/java.io.BufferedInputStream.getInIfOpen(BufferedInputStream.java:169)
	at java.base/java.io.BufferedInputStream.read1(BufferedInputStream.java:345)
	at java.base/java.io.BufferedInputStream.implRead(BufferedInputStream.java:420)
	at java.base/java.io.BufferedInputStream.read(BufferedInputStream.java:399)

 
 Details see domainStory fails with openJDK on Ubuntu 24.04 · Issue #27 · johthor/DomainStory-PlantUML 

It looks like an error in the last version/integration of material stdlib itself because even the sample in stdlib is not working ( "!include <material/common>" is not working too)

@startuml
!include <material/common>
' To import the sprite file you DON'T need to place a prefix!
!include <material/folder_move>

MA_FOLDER_MOVE(Red, 1, dir, rectangle, "A label")
@enduml


Even the the materials folder in the stdlib folder s empty "https://github.com/plantuml/plantuml-stdlib/tree/master/stdlib/material"

BR Helmut

PS.: maybe we still need a "material" copy for older versions 

1 Answer

0 votes
answered Jun 24 by The-Lu (85,820 points)

Hello K.,

For old material stdlib, we must now use `material2.1.19`:

@startuml
!include <material2.1.19/common>
' To import the sprite file you DON'T need to place a prefix!
!include <material2.1.19/folder_move>

MA_FOLDER_MOVE(Red, 1, dir, rectangle, "A label")
@enduml

See:

See also breaking news (with breaking of backwards compatibility) with this PR here:

Regards,
Th.

commented Jun 24 by kirchsth (7,760 points)

This is not a good idea, because all existing diagrams which uses material are not working anymore. (and e.g. domain stories are only a starting point of not working diagrams)

For compatibility we should should store a copy of the a) old version or b) the newest versions of material in the version independent path. 

BR Helmut
 

commented Jun 24 by plantuml (297,300 points)

Thanks all for your help (especially The-Lu!)

This is fixed on the online server:

@startuml

!$Element_FontColor = "red"
!$Actor_IconColor = "green"

!include <DomainStory/domainStory>

Person(Alice)
@enduml

https://editor.plantuml.com/uml/SoWkIImgAStDuU9IL77DISrDpIk9TylFAt7EpyalKh1LK2fAJL42oZacb-GNnNicv-V1PTABKbFpb80QC_EISqfJKXLiNF9p4pFpWe4gA_LJ46mxBgw0rABY_3mDnvpCv5HDBeVKl1IGdG00

...