0

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 started getting the following error. Everything has slowed down and diagram images are no longer being generated, the GUI does not list the image 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)
A j
  • 1,069
  • 2
  • 16
  • 29
  • Cross posted at: http://forum.plantuml.net/8986/stackoverflow-error-when-using-platuml-gui – albert Feb 18 '19 at 09:22
  • 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? – albert Feb 18 '19 at 09:27

1 Answers1

0

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.

A j
  • 1,069
  • 2
  • 16
  • 29