Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NPE from org.jruby.java.proxies.ArrayJavaProxy.to_a #1889

Closed
slawo-ch opened this Issue Aug 6, 2014 · 3 comments

Comments

Projects
None yet
4 participants
@slawo-ch
Copy link

slawo-ch commented Aug 6, 2014

Hey guys,
just upgraded jruby to 1.7.13 and my less compiler, which uses therubyrhino for its js execution started acting up.

More to the point org.jruby.java.proxies.ArrayJavaProxy.to_a seems to throw an NPE, although looking at the source, I do not see at a glance what the issue could be.

I posted the issue at therubyrhino project as well: cowboyd/therubyrhino#31

2014-08-06 12:30:00 +0200: Rack app error: java.lang.NullPointerException
org.jruby.java.proxies.ArrayJavaProxy.to_a(org/jruby/java/proxies/ArrayJavaProxy.java:145)
RUBY.method_missing(/Users/slawo/.rvm/gems/jruby-1.7.13/gems/therubyrhino-2.0.3/lib/rhino/rhino_ext.rb:115)
org.mozilla.javascript.optimizer.OptRuntime.callName(org/mozilla/javascript/optimizer/OptRuntime.java:63)
org.mozilla.javascript.gen._Users_slawo__rvm_gems_jruby_1_7_13_gems_less_2_5_0_lib_less_js_lib_less_parser_js_2._c_anonymous_31(/Users/slawo/.rvm/gems/jruby-1.7.13/gems/less-2.5.0/lib/less/js/lib/less/parser.js:669)

The error does not happen with jruby 1.7.11/12. It happens reliably with 1.7.13.
Is there any change in semantics/arguments?

I am running on Oracle Java on Mac OSX:

java version "1.7.0_55"
Java(TM) SE Runtime Environment (build 1.7.0_55-b13)
Java HotSpot(TM) 64-Bit Server VM (build 24.55-b03, mixed mode)

@atambo

This comment has been minimized.

Copy link
Member

atambo commented Aug 7, 2014

This commit looks relevant: b96b221

Any ideas @tduehr?

@tduehr

This comment has been minimized.

Copy link
Contributor

tduehr commented Aug 7, 2014

@atambo Correct, I think there was a PR to fix that. Let me see if I can dig it up.

@tduehr

This comment has been minimized.

Copy link
Contributor

tduehr commented Aug 7, 2014

Yup, #1818 fixed it. Should be in next release. Using map might be a valid workaround for now.

@atambo atambo closed this Aug 7, 2014

@atambo atambo added this to the JRuby 1.7.14 milestone Aug 7, 2014

@enebo enebo modified the milestones: JRuby 1.7.14, JRuby 1.7.15 Aug 27, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.