Tero Tilus created JRUBY-6493:
---------------------------------
Summary: Calling dynamically defined method throws
Java::JavaLang::NullPointerException or returns nil without executing method
body
Key: JRUBY-6493
URL: https://jira.codehaus.org/browse/JRUBY-6493
Project: JRuby
Issue Type: Bug
Components: Interpreter, Ruby 1.8.7
Affects Versions: JRuby 1.6.6, JRuby 1.5.6, JRuby 1.6.7
Environment: $ java -version
java version "1.6.0_23"
OpenJDK Runtime Environment (IcedTea6 1.11pre) (6b23~pre11-0ubuntu1.11.10.1)
OpenJDK 64-Bit Server VM (build 20.0-b11, mixed mode)
Reporter: Tero Tilus
Priority: Minor
Calling a dynamically generated method (defined using `define_method(:method) {
..body.. }` ) having `require 'ruby-debug'; debugger` inside it throws
Java::JavaLang::NullPointerException:
from org.jruby.ast.RescueNode.handleJavaException(RescueNode.java:206)
from
org.jruby.ast.RescueNode.interpretWithJavaExceptions(RescueNode.java:141)
from org.jruby.ast.RescueNode.interpret(RescueNode.java:110)
from org.jruby.ast.DAsgnNode.interpret(DAsgnNode.java:110)
from org.jruby.ast.NewlineNode.interpret(NewlineNode.java:104)
from org.jruby.ast.BlockNode.interpret(BlockNode.java:71)
...
Without `require 'ruby-debug'; debugger` in method body the call just returns
nil without executing the method body. The following pastie tries to clarify
the setup (sadly without reproducing the issue)
http://pastie.org/private/ivtgoimsy9px8qftklm0w
The following pasties are Rails 2.3.9 console sessions manifesting the problem
with different JRubies
http://pastie.org/private/gwx0g9tz6yzytmqs2s2jnq
http://pastie.org/private/ycc8hmwjiyicfhsppslhw
http://pastie.org/private/h2kr22mujqts2qilknhiig
Console is launched
$ jruby --server -J-Xms512m -J-Xmx512m -J-Xmn128m -J-Djruby.thread.pooling=true
console.rb development
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://jira.codehaus.org/secure/ContactAdministrators!default.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