Issue Details (XML | Word | Printable)

Key: GROOVY-2227
Type: Bug Bug
Status: Closed Closed
Resolution: Won't Fix
Priority: Major Major
Assignee: Jochen Theodorou
Reporter: Marc Palmer
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
groovy

Stacktrace/bytecode missing line numbers

Created: 19/Oct/07 12:04 PM   Updated: 29/Oct/07 06:34 AM
Component/s: None
Affects Version/s: 1.1-rc-1
Fix Version/s: 1.1-rc-2

Time Tracking:
Not Specified


 Description  « Hide
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)



 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Jochen Theodorou added a comment - 29/Oct/07 06:34 AM
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.