Interpreter passes wrong position on 'return' event
---------------------------------------------------
Key: JRUBY-2723
URL: http://jira.codehaus.org/browse/JRUBY-2723
Project: JRuby
Issue Type: Bug
Components: Interpreter
Affects Versions: JRuby 1.1.2
Environment: Trunk rev. 7052.
Reporter: Martin Krauskopf
Priority: Critical
Try the example below. Notice that the return event in case of JRuby should
provide other.rb:2 instead of jira-tester. This bug causes [stack-trace
clearing problem|http://www.netbeans.org/issues/show_bug.cgi?id=138403] in
JRuby ruby-debug-base (due to used algorithm) and thus to all frontend (CLI,
NetBeans, Aptana). So marking critical. (Full paths problem is filed as
separate issue, JRUBY-2722)
$ cat jira-tester.rb
{code}
Kernel.set_trace_func(lambda do |event, file, line, id, binding, clazz|
printf "%8s | %#{$0.length}s:%-4d | %12s | %8s\n", event, file, line, id,
clazz
end)
require 'other.rb'
in_other
sleep 0.1
{code}
$ cat other.rb
{code}
def in_other
sleep 0.01
end
{code}
$ jruby --debug jira-tester.rb
{noformat}
line | jira-tester.rb:5 | | false
line | /home/emdot/ruby/tester/lib/stf/./other.rb:1 | |
false
line | jira-tester.rb:7 | | false
call | /home/emdot/ruby/tester/lib/stf/./other.rb:1 | in_other |
Object
line | /home/emdot/ruby/tester/lib/stf/./other.rb:2 | in_other |
Object
return | jira-tester.rb:1 | in_other | Object
line | jira-tester.rb:8 | | false
{noformat}
$ ruby jira-tester.rb | egrep -v 'c-.*'
{noformat}
line | jira-tester.rb:5 | | false
line | ./other.rb:1 | | false
line | jira-tester.rb:7 | | false
call | ./other.rb:1 | in_other | Object
line | ./other.rb:2 | in_other | Object
return | ./other.rb:2 | in_other | Object
line | jira-tester.rb:8 | | false
{noformat}
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email