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

JavaLang::NullPointerException in RubySymbol.javaStringHashCode() #3086

Closed
e2 opened this issue Jun 27, 2015 · 5 comments
Closed

JavaLang::NullPointerException in RubySymbol.javaStringHashCode() #3086

e2 opened this issue Jun 27, 2015 · 5 comments

Comments

@e2
Copy link

e2 commented Jun 27, 2015

Happened on Travis here: https://travis-ci.org/guard/guard/jobs/68593045#L270

JRuby version: jruby 9.0.0.0-SNAPSHOT (2.2.2) 2015-06-27 e3ffe94 Java HotSpot(TM) 64-Bit Server VM 24.76-b04 on 1.7.0_76-b13 +jit [linux-amd64]

I couldn't find a duplicate issue. Meanwhile, I'll try and reproduce this locally.

Backtrace (extracted from above link):

     # org.jruby.RubySymbol.javaStringHashCode(RubySymbol.java:959)
     # org.jruby.RubySymbol.access$100(RubySymbol.java:76)
     # org.jruby.RubySymbol$SymbolTable.getSymbol(RubySymbol.java:690)
     # org.jruby.Ruby.newSymbol(Ruby.java:3508)
     # org.jruby.runtime.ArgumentType.toArrayForm(ArgumentType.java:53)
     # org.jruby.runtime.ArgumentDescriptor.toArrayForm(ArgumentDescriptor.java:40)
     # org.jruby.runtime.Helpers.argumentDescriptorsToParameters(Helpers.java:2513)
     # org.jruby.runtime.Helpers.methodToParameters(Helpers.java:2533)
     # org.jruby.RubyMethod.parameters(RubyMethod.java:294)
kares added a commit to kares/jruby that referenced this issue Jun 29, 2015
... likely need to be warmed as these pass fine (without previous fix)
@kares kares added this to the JRuby 9.0.0.0.rc2 milestone Jun 29, 2015
@kares kares closed this as completed in dbd85dd Jun 29, 2015
@e2
Copy link
Author

e2 commented Jul 5, 2015

Looks like it's still broken as of today:

Failure: https://travis-ci.org/guard/guard/jobs/69653719

Version: jruby 9.0.0.0-SNAPSHOT (2.2.2) 2015-07-04 dfdfb54 Java HotSpot(TM) 64-Bit Server VM 24.76-b04 on 1.7.0_76-b13 +jit [linux-amd64]

(@dfdfb54 - is HEAD at the moment)

Link to commit/source where it's crashing:

return str.hashCode();

@kares
Copy link
Member

kares commented Jul 6, 2015

well, I only guessed what the guard spec is doing underneath so its possible I missed, thanks for verifying

@kares kares reopened this Jul 6, 2015
@e2
Copy link
Author

e2 commented Jul 6, 2015

No prob. Let me know if I can shed some more light on this.

@headius
Copy link
Member

headius commented Jul 7, 2015

Investigating.

@headius
Copy link
Member

headius commented Jul 7, 2015

I've fixed where I think the problem was, added a regression spec, and bulletproofed the code leading to this NPE. It should be fine now, but let us know ASAP if it is not.

@headius headius closed this as completed Jul 7, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants