StackOverflowError in property resolution

cannot-reproduce

(Rémon Sinnema) #1

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.


(Stefan Oehme) #2

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


(Rémon Sinnema) #3

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


(Stefan Oehme) #4

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.


(Rémon Sinnema) #5

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.


(Rémon Sinnema) #6

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


(Stefan Oehme) #7

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.


(Rémon Sinnema) #8

How about only when there is a StackOverflowError?


(Stefan Oehme) #9

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