Random method undefined error after change in r.8491
----------------------------------------------------
Key: JRUBY-3451
URL: http://jira.codehaus.org/browse/JRUBY-3451
Project: JRuby
Issue Type: Bug
Components: Interpreter
Affects Versions: JRuby 1.2
Reporter: Peter K Chan
Attachments: fix_random_method_undefined_error.patch
When testing my app against the latest unreleased snapshot of JRuby 1.2, I
noticed that I was getting random method undefined error for method that are
otherwise defined. For example,
{quote}
[02/25 20:22:41] WARN: Error processing accept_copy
==undefined method `uuid' for nil:NilClass(NoMethodError)==
/C:/work/bun/target/classes/service/tracker.rb:256:in `cpu_accept_copy'
/C:/work/bun/target/classes/db/synchronized.rb:26:in `call'
/C:/work/bun/target/classes/db/synchronized.rb:26:in `atomically'
...
{quote}
After a lot of testing, I finally track the offending change to the one-line
change in r. 8491. The comment of the revision states:
{quote}Remove a cloneBlock call that appears to be unnecessary now with our
pre-duping Binding. Again, we'll probably need to do a more thorough analysis
later, but for now this speed sup proc and define_method invocation by nearly
30%.{quote}
I am not certain of the implication of the change, but it seems that the
removal of the cloneBlock caused the issue. By adding it back in, the error
disappeared.
{quote}
Block newBlock = block.cloneBlock(); // cloneBlock() was added back in.
JumpTarget jumpTarget =
newBlock.getBinding().getFrame().getJumpTarget();
{quote}
The attached the patch does exactly that.
--
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