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 while loading compiled .class - method def with rescue statement #3701

Closed
kares opened this issue Feb 26, 2016 · 1 comment
Closed

NPE while loading compiled .class - method def with rescue statement #3701

kares opened this issue Feb 26, 2016 · 1 comment

Comments

@kares
Copy link
Member

kares commented Feb 26, 2016

another LoadError: sample.class is not compiled Ruby; use java_import to load normal classes

  • sample.rb*
class Sample
  def _call
    # no-op
  #rescue LoadError => e
  #  e || 1 # doesn't matter
  rescue => e
    #e || 2 # doesn't matter
  end
end

jruby -e "require 'jruby'; JRuby.runtime.debug = true; require './sample.class'"

Caused by: java.lang.NullPointerException
    at org.jruby.ir.persistence.IRReaderStream.decodeInstr(IRReaderStream.java:188)
    at org.jruby.ir.persistence.IRReaderStream.decodeInstructionsAt(IRReaderStream.java:173)
    at org.jruby.ir.persistence.IRReader.load(IRReader.java:54)
    at org.jruby.ir.runtime.IRRuntimeHelpers.decodeScopeFromBytes(IRRuntimeHelpers.java:1448)
@kares kares added the ir label Feb 26, 2016
@kares kares added this to the JRuby 9.1.0.0 milestone Feb 26, 2016
@kares kares changed the title NPE while loading compiled .class - with multi-rescue statement NPE while loading compiled .class - method def with rescue statement Feb 26, 2016
@kares
Copy link
Member Author

kares commented Feb 26, 2016

obviously working when compiled under 9.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant