NullPointerException loading `rouge` gem #1392

Closed
bhollis opened this Issue Jan 10, 2014 · 7 comments

Projects

None yet

4 participants

@bhollis
bhollis commented Jan 10, 2014

jruby 1.7.10 (1.9.3p392) 2014-01-09 c4ecd6b on Java HotSpot(TM) 64-Bit Server VM 1.7.0_17-b02 [darwin-x86_64]

$ gem install rouge
$ irb
jruby-1.7.10 :001 > require 'rouge'
LoadError: load error: rouge -- java.lang.NullPointerException: null
    from org/jruby/RubyKernel.java:1083:in `require'
    from /Users/f/.rvm/rubies/jruby-1.7.10/lib/ruby/shared/rubygems/core_ext/kernel_require.rb:135:in `require'
    from (irb):1:in `evaluate'
    from org/jruby/RubyKernel.java:1119:in `eval'
    from org/jruby/RubyKernel.java:1519:in `loop'
    from org/jruby/RubyKernel.java:1282:in `catch'
    from org/jruby/RubyKernel.java:1282:in `catch'
    from /Users/f/.rvm/rubies/jruby-1.7.10/bin/irb:13:in `(root)'

I'm afraid I don't know enough about this stack trace to debug this, but hopefully it's reproduceable.

@enebo
Member
enebo commented Jan 10, 2014

Reduced test case to:

ws = '.'

/#{ws}[\u0020]/
@bhollis
bhollis commented Jan 10, 2014

Thanks, @enebo!

@bartkamphorst

Seeing the same error on jruby 1.7.6 (1.9.3p392) 2013-10-22 6004147 on Java HotSpot(TM) 64-Bit Server VM 1.7.0_40-b43 [darwin-x86_64]:

jruby-1.7.6 :001 > require 'rouge'
LoadError: load error: rouge -- java.lang.NullPointerException: null
    from org/jruby/RubyKernel.java:1082:in `require'
    from /Users/bart/.rvm/rubies/jruby-1.7.6/lib/ruby/shared/rubygems/core_ext/kernel_require.rb:135:in `require'
    from (irb):1:in `evaluate'
    from org/jruby/RubyKernel.java:1121:in `eval'
    from org/jruby/RubyKernel.java:1517:in `loop'
    from org/jruby/RubyKernel.java:1282:in `catch'
    from org/jruby/RubyKernel.java:1282:in `catch'
    from /Users/bart/.rvm/rubies/jruby-1.7.6/bin/irb:13:in `(root)'
@bhollis bhollis added a commit to middleman/middleman-syntax that referenced this issue Jan 11, 2014
@bhollis bhollis Allow JRuby failures because of jruby/jruby#1392 9fdc61f
@futuretelematics

Same error trying to use sass / compass with jruby 1.7.10 in a weblogic app (jrockit 6)

LoadError: load error: sass/version -- java.lang.NullPointerException: null
      require at org/jruby/RubyKernel.java:1083
      require at classpath:/META-INF/jruby.home/lib/ruby/shared/rubygems/core_ext/kernel_require.rb:55
     (root) at classpath:/META-INF/jruby.home/lib/ruby/shared/sass.rb:9
      require at org/jruby/RubyKernel.java:1083
      (root) at classpath:/META-INF/jruby.home/lib/ruby/shared/rubygems/core_ext/kernel_require.rb:1
      require at classpath:/META-INF/jruby.home/lib/ruby/shared/rubygems/core_ext/kernel_require.rb:55
      require at org/jruby/RubyKernel.java:1083
     (root) at classpath:/META-INF/jruby.home/lib/ruby/shared/sass/plugin.rb:3
     (root) at classpath:/META-INF/jruby.home/lib/ruby/shared/rubygems/core_ext/kernel_require.rb:1
@enebo
Member
enebo commented Feb 1, 2014

@futuretelematics Unfortunately a LoadError (or a NullPointerException) occurring is pretty common and this may or may not be related. Could you open that as a separate issue with an exaplanation of what you need to do to see this happen? It would be best if you could distill it down to a simple reproducible test case but even a broader description can be helpful.

@enebo
Member
enebo commented Feb 5, 2014

Wow this was remarkably simple to fix. There is an out buf called 'to' which is allowed to be null. The \uxxxx path was unconditionally expecting it to be non-null.

@enebo enebo closed this Feb 5, 2014
@bartkamphorst

Perfect! Thanks @enebo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment