【问题标题】:StackOverflowError when running JUnit tests in Intellij在 Intellij 中运行 JUnit 测试时出现 StackOverflowError
【发布时间】:2016-06-23 08:13:32
【问题描述】:

我在 neo4j-tutorial 的 Koans 上运行 JUnit 测试时遇到问题 我在 Windows 7 上使用以下版本的 Intellij:

IntelliJ IDEA 2016.1.3 Build #IC-145.1617,构建于 2016 年 6 月 3 日 JRE: 1.8.0_92-b14 amd64 JVM:Oracle Corporation 的 Java HotSpot(TM) 64 位服务器 VM

我已经用自述文件中的ant generate.eclipse.project 生成了eclipse 的东西。但是,当我尝试运行 Koan 时,我遇到了 StackOverflowErrror

这是堆栈跟踪的一部分:

Information:Using javac 1.7.0_80 to compile java sources
 ...
Information:java:   at com.sun.tools.javac.comp.AttrContext.dup(AttrContext.java:92)
Information:java:   at com.sun.tools.javac.comp.Attr.visitApply(Attr.java:1417)
Information:java:   at com.sun.tools.javac.tree.JCTree$JCMethodInvocation.accept(JCTree.java:1321)
Information:java:   at com.sun.tools.javac.comp.Attr.attribTree(Attr.java:431)
Information:java:   at com.sun.tools.javac.comp.Attr.attribTree(Attr.java:418)
Information:java:   at com.sun.tools.javac.comp.Attr.visitSelect(Attr.java:2247)
Information:java:   at com.sun.tools.javac.tree.JCTree$JCFieldAccess.accept(JCTree.java:1677)
Information:java:   at com.sun.tools.javac.comp.Attr.attribExpr(Attr.java:449)
Information:java:   at com.sun.tools.javac.comp.Attr.visitApply(Attr.java:1521)
Information:java: Errors occurred while compiling module 'neo4j-tutorial'
Information:2016/06/23 16:57 - Compilation completed with 1 error and 32 warnings in 1s 379ms
Error:java: java.lang.StackOverflowError

我已将此测试的 VM 选项设置如下:

-ea
-Xss1m

可能是什么问题?

【问题讨论】:

    标签: java intellij-idea junit


    【解决方案1】:

    将 -Xss4m 添加到构建过程 VM 选项应该会有所帮助

    Build, Execution, Deployment -> Compiler -> Goto Property "Shared Build Process VM Option" 并设置它-Xss4M

    【讨论】:

      猜你喜欢
      • 2015-06-01
      • 2018-12-01
      • 1970-01-01
      • 1970-01-01
      • 2014-08-04
      • 2015-08-07
      • 1970-01-01
      • 2015-09-26
      • 1970-01-01
      相关资源
      最近更新 更多