StackOverflowError in property resolution

Gradle Version: 2.14.1
Operating System: Windows and Linux
Is this a regression? Dunno

java.lang.StackOverflowError at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93) at groovy.lang.MetaClassImpl.invokeMissingMethod(MetaClassImpl.java:936) at groovy.lang.MetaClassImpl.invokePropertyOrMissing(MetaClassImpl.java:1259) at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1212) at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1019) at org.codehaus.groovy.runtime.InvokerHelper.invokePogoMethod(InvokerHelper.java:917) at org.codehaus.groovy.runtime.InvokerHelper.invokeMethod(InvokerHelper.java:900) at org.codehaus.groovy.runtime.MethodClosure.doCall(MethodClosure.java:65) at sun.reflect.GeneratedMethodAccessor320.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93) at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325) at org.gradle.internal.metaobject.BeanDynamicObject$MetaClassAdapter.invokeMethod(BeanDynamicObject.java:374) at org.gradle.internal.metaobject.BeanDynamicObject.invokeMethod(BeanDynamicObject.java:169) at org.gradle.internal.metaobject.MixInClosurePropertiesAsMethodsDynamicObject.invokeMethod(MixInClosurePropertiesAsMethodsDynamicObject.java:43) at org.gradle.internal.metaobject.AbstractDynamicObject.invokeMethod(AbstractDynamicObject.java:163) at org.gradle.groovy.scripts.BasicScript.methodMissing(BasicScript.java:79) at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93)
etc.

Could you please provide a reproducible example project on GitHub? It’s hard to tell from the stacktrace what is causing this.

I know it’s hard to tell. The missing property/method isn’t even listed :frowning:
Unfortunately, i can’t share my project…

I’m not asking you to share the real project, but a reduced example that shows the problem. Without that, I don’t see a way to diagnose this bug.

If you can output the missing property, then maybe I can find the issue myself. I’m sure I’m doing something wrong on my end, but it’s not easy to find without more info.

If I were able to reduce the problem, then I could most likely fix it as well…

Adding output on every method missing call would be incredibly expensive. This is called a lot by Groovy.

You could attach a debugger using -Dorg.gradle.debug=true to see where the problem is.

How about only when there is a StackOverflowError?

Please use a debugger or alternatively build Gradle from source (it’s very easy) with the added logging you want.