Stackoverflow error when using platuml gui

0 votes
asked Feb 15, 2019 in Question / help by Ajay

I have been using Plantuml gui using the following command.

java -jar plantuml.jar -gui

It worked fine for a while but then suddenly i stated getting the following error. Everything has slowed down and the GUI does not list the files in the folder i have selected. Any help will be much appreciated.

Exception in thread "AWT-EventQueue-0" java.lang.StackOverflowError
        at java.io.InputStream.<init>(Unknown Source)
        at java.io.FileInputStream.<init>(Unknown Source)
        at net.sourceforge.plantuml.AFileRegular.open(AFileRegular.java:57)
        at net.sourceforge.plantuml.preproc.FileWithSuffix.getReader(FileWithSuffix.java:65)
        at net.sourceforge.plantuml.preproc.StartDiagramExtractReader.getReadLine(StartDiagramExtractReader.java:106)
        at net.sourceforge.plantuml.preproc.StartDiagramExtractReader.containsStartDiagram(StartDiagramExtractReader.java:136
)
        at net.sourceforge.plantuml.preproc2.PreprocessorInclude3.getReaderInclude(PreprocessorInclude3.java:326)
        at net.sourceforge.plantuml.preproc2.PreprocessorInclude3.manageFileInclude(PreprocessorInclude3.java:262)
        at net.sourceforge.plantuml.preproc2.PreprocessorInclude3.access$500(PreprocessorInclude3.java:75)
        at net.sourceforge.plantuml.preproc2.PreprocessorInclude3$Inner.readLineInternal(PreprocessorInclude3.java:149)
        at net.sourceforge.plantuml.preproc2.ReadLineInsertable.readLine(ReadLineInsertable.java:65)
        at net.sourceforge.plantuml.preproc2.Preprocessor2.readLine(Preprocessor2.java:87)
commented Feb 18, 2019 by albert (3,520 points)
Which versions of plantuml / java are you running (java -Djava.awt.headless=true -jar plantuml.jar). Which OS are you using? Did you recently update the plantuml / the Java version you used? Does it happen with a special diagram or at the beginning?

1 Answer

0 votes
answered Feb 18, 2019 by anonymous

I have found the problem. The StackOverflowError should have given me an hint, but I missed it. Usually it is related to a recursive loop. I am using the file include feature and had a circular file reference. So plantuml was going (or rather I was sending it) into an infinite loop and therefore it was running out of stack space.

...