New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stack size too large when tests started from IntelliJ 2017.2 #788

YouriAckx opened this Issue Nov 15, 2017 · 2 comments


None yet
3 participants

YouriAckx commented Nov 15, 2017

Issue description

The units tests in our Grails 3.2.6 project with Spock have stopped working when launched from IntelliJ 2017.2.5 (right-click on the test folder, Run as unit tests). Exception with Stack size too large message appears, tests won't start.

Exception in thread "main" java.lang.VerifyError: (class: our/projects/SomeNiceSpec, method: $spock_feature_1_3 signature: ()V) Stack size too large
	at java.lang.Class.getDeclaredMethods0(Native Method)
	at java.lang.Class.privateGetDeclaredMethods(
	at java.lang.Class.privateGetMethodRecursive(
	at java.lang.Class.getMethod0(
	at java.lang.Class.getMethod(
	at com.intellij.junit4.JUnit46ClassesRequestBuilder.collectWrappedRunners(
	at com.intellij.junit4.JUnit46ClassesRequestBuilder.getClassesRequest(
	at com.intellij.junit4.JUnit4TestRunnerUtil.buildRequest(
	at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(
	at com.intellij.rt.execution.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(
	at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(
	at com.intellij.rt.execution.junit.JUnitStarter.main(

Process finished with exit code 1
Empty test suite.

How to reproduce

  • It was working fine until a benign change that has nothing to do with the failing our/projects/SomeNiceSpec was merged to the codebase.
  • The test involved is fairly simple, and uses the same boring testing pattern found widely in the rest of the app.
  • The tests still work fine when launched by Gradle (:server:cleanTest :server:test with --tests *) but fail when launched from the IJ (appear under JUnit in the Run/Debug Configuration dialog box).
  • I cannot reproduce the code here as it's my customer property, and anyways it would not allow you to reproduce the issue unless it'd make a large project available.
  • I do not have a simple reproducible sequence - sorry, again, it stopped working when unrelated code was added.

No influence:

  • IJ specific version; I've tested with 2017.2.6 and 2017.2.5
  • JDK specific version; I've tested with 8u121 and 8u152-zulu


We noticed that by removing the first and: declaration in the following test, it worked again:

void "save train (...)"() {

    and: // remove this line and it works again
    def info = new ConfigCompanySpendingPlanInfoListItem(
            text: 'train parking fr',
            moreInfoUrl: '',
            termsAndConditionsUrl: ''

    mockLoggedInUser(service, dataset.uniqueEmployee)

    when: "you save the info"


I realize this is not much to work on but at least Google may lead you here and this workaround may apply to you.

Additional Environment information

IntelliJ IDEA 2017.2.5
Build #IU-172.4343.14, built on September 26, 2017
JRE: 1.8.0_152-release-915-b12 x86_64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Mac OS X 10.12.6

IJ launch command (super long classpath truncated):

/Users/youri/.sdkman/candidates/java/8u152-zulu/bin/java -ea -Didea.test.cyclic.buffer.size=66560000 "-javaagent:/Applications/IntelliJ" -Dfile.encoding=UTF-8 -classpath "/Applications/IntelliJ" com.intellij.rt.execution.junit.JUnitStarter -ideVersion5 @w@/private/var/folders/xw/bnk1k9jn3knfbdzmqpqz_xcm0000gn/T/idea_working_dirs_junit.tmp @/private/var/folders/xw/bnk1k9jn3knfbdzmqpqz_xcm0000gn/T/idea_junit.tmp -socket53439

See Also



This comment has been minimized.

Show comment
Hide comment

leonard84 Nov 29, 2017


As already said in #58 it seems to be an Intellij issue, could you please file a bug at


leonard84 commented Nov 29, 2017

As already said in #58 it seems to be an Intellij issue, could you please file a bug at


This comment has been minimized.

Show comment
Hide comment

@leonard84 leonard84 added the duplicate label Sep 9, 2018

@leonard84 leonard84 closed this Sep 9, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment