Leak in TranscoderUtil

0 votes
asked Jun 11, 2016 in bug by Meo (910 points)
public static void main(String[] args) throws IOException {
    Transcoder defaultTranscoder = TranscoderUtil.getDefaultTranscoder();
    String encoded = defaultTranscoder.encode(
            "Alice -> Bob: Authentication Request\n" +
            "Bob --> Alice: Authentication Response\n" +
            "@enduml");
}

 

When start tag is missing, it just eats all my free RAM (13GB).

It would probably never happen to IntelliJ plugin users, but perhaps it is related to 502 Bad Gateway which PlantUML Server returns for such input.

Version 8042

java.lang.Thread.State: RUNNABLE
 at java.util.zip.Deflater.init(Native Method)
 at java.util.zip.Deflater.<init>(Deflater.java:171)
 at net.sourceforge.plantuml.code.CompressionZlib.tryCompress(CompressionZlib.java:55)
 at net.sourceforge.plantuml.code.CompressionZlib.compress(CompressionZlib.java:47)
 at net.sourceforge.plantuml.code.TranscoderImpl.encode(TranscoderImpl.java:63)
 at net.sourceforge.plantuml.code.TranscoderSmart.encode(TranscoderSmart.java:52)

1 Answer

0 votes
answered Jun 11, 2016 by plantuml (134,570 points)
selected Jun 11, 2016 by Meo
 
Best answer
Hi,

Many thanks for the feedback : this is indeed a terrible bug!

We just fix it in last beta https://dl.dropboxusercontent.com/u/13064071/plantuml.jar

We have also upgraded the online server with this beta.

Do not hesitate to post again if you find other issue!

Thanks again
...