我一直使用下面的命令来使用Plantuml gui。
java -jar plantuml.jar -gui它在一段时间内工作得很好,但突然我开始收到以下错误。一切都变慢了,不再生成图表图像,GUI不会列出我选择的文件夹中的图像文件。任何帮助都将不胜感激。
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)发布于 2019-02-18 17:56:08
我找到了问题所在。StackOverflowError应该给我一个提示,但我错过了。通常它与递归循环相关。我正在使用文件包含功能,并且有一个循环文件引用。因此,plantuml正在进入一个无限循环(或者更确切地说,我正在发送它),因此它正在耗尽堆栈空间。
https://stackoverflow.com/questions/54736159
复制相似问题