groovy

Stacktrace/bytecode missing line numbers

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Won't Fix
  • Affects Version/s: 1.1-rc-1
  • Fix Version/s: 1.1-rc-2
  • Component/s: None
  • Labels:
    None
  • Number of attachments :
    0

Description

Using Grails RC2 head (18 Oct) and whatever groovy snapshot that is using, I'm seeing some code without line numbers. Partial trace showing this:

at AuthenticationControllerTests$_testLogin_closure22.doCall(AuthenticationControllerTests.groovy)
at org.codehaus.groovy.reflection.CachedMethod.invokeByReflection(CachedMethod.java:107)
at org.codehaus.groovy.runtime.metaclass.ReflectionMetaMethod.invoke(ReflectionMetaMethod.java:58)
at org.codehaus.groovy.runtime.MetaClassHelper.doMethodInvoke(MetaClassHelper.java:538)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:749)
at groovy.lang.ExpandoMetaClass.invokeMethod(ExpandoMetaClass.java:945)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:589)
at groovy.lang.Closure.call(Closure.java:290)
at groovy.lang.Closure.call(Closure.java:285)
at groovy.lang.ProxyMetaClass.use(ProxyMetaClass.java:76)
at org.codehaus.groovy.reflection.CachedMethod.invokeByReflection(CachedMethod.java:107)
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:127)
at org.codehaus.groovy.runtime.metaclass.StdMetaMethod.invoke(StdMetaMethod.java:18)
at org.codehaus.groovy.runtime.MetaClassHelper.doMethodInvoke(MetaClassHelper.java:538)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:749)
at groovy.lang.ExpandoMetaClass.invokeMethod(ExpandoMetaClass.java:945)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:589)
at org.codehaus.groovy.runtime.Invoker.invokePojoMethod(Invoker.java:87)
at org.codehaus.groovy.runtime.Invoker.invokeMethod(Invoker.java:75)
at org.codehaus.groovy.runtime.InvokerHelper.invokeMethod(InvokerHelper.java:74)
at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodN(ScriptBytecodeAdapter.java:158)
at groovy.mock.interceptor.MockFor.use(MockFor.groovy:39)

Activity

Hide
blackdrag blackdrag added a comment -

please provide a minimal example code I am unable to reproduce the problem. Another possibility is, that you looked at the wrong part of the stack. for example in

test.groovy
def c = {throw new RuntimeException("ffo")}
c()

you will get a trace like this

java.lang.RuntimeException: ffo
[...]
	at test$_run_closure1.doCall(test.groovy:1)
[...]
	at test$_run_closure1.doCall(test.groovy)
[...]
	at test.run(test.groovy:2)

the doCall without line number is a synthetic method to be able to call a closure without arguments. Synthetic method do not have a line information.

Show
blackdrag blackdrag added a comment - please provide a minimal example code I am unable to reproduce the problem. Another possibility is, that you looked at the wrong part of the stack. for example in
test.groovy
def c = {throw new RuntimeException("ffo")}
c()
you will get a trace like this
java.lang.RuntimeException: ffo
[...]
	at test$_run_closure1.doCall(test.groovy:1)
[...]
	at test$_run_closure1.doCall(test.groovy)
[...]
	at test.run(test.groovy:2)
the doCall without line number is a synthetic method to be able to call a closure without arguments. Synthetic method do not have a line information.

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: