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

NullPointerException loading `rouge` gem #1392

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

Comments

Projects
None yet
4 participants
@bhollis
Copy link

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

This comment has been minimized.

Copy link
Member

commented Jan 10, 2014

Reduced test case to:

ws = '.'

/#{ws}[\u0020]/
@bhollis

This comment has been minimized.

Copy link
Author

commented Jan 10, 2014

Thanks, @enebo!

@bartkamphorst

This comment has been minimized.

Copy link

commented Jan 11, 2014

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 added a commit to middleman/middleman-syntax that referenced this issue Jan 11, 2014

@futuretelematics

This comment has been minimized.

Copy link

commented Feb 1, 2014

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

This comment has been minimized.

Copy link
Member

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

This comment has been minimized.

Copy link
Member

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

This comment has been minimized.

Copy link

commented Feb 5, 2014

Perfect! Thanks @enebo.

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.