This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 140869 - NullPointerException: The value for key [rubyplatform.Ruby_0.gem_version] must not be null
Summary: NullPointerException: The value for key [rubyplatform.Ruby_0.gem_version] mus...
Status: RESOLVED FIXED
Alias: None
Product: ruby
Classification: Unclassified
Component: Platform (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: Martin Krauskopf
URL: http://statistics.netbeans.org/except...
Keywords:
: 142875 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-07-19 08:49 UTC by paulymac
Modified: 2008-08-08 15:46 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 78804


Attachments
stacktrace (1.89 KB, text/plain)
2008-07-19 08:49 UTC, paulymac
Details
stacktrace (1.89 KB, text/plain)
2008-08-07 12:22 UTC, paulymac
Details

Note You need to log in before you can comment on or make changes to this bug.
Description paulymac 2008-07-19 08:49:27 UTC
Build: NetBeans IDE Dev (Build 200807040101)
VM: Java HotSpot(TM) 64-Bit Server VM, 10.0-b22, Java(TM) SE Runtime Environment, 1.6.0_06-b02
OS: Windows Vista, 6.0, amd64

User Comments: 
Had just opened ide and went straight to Tools->Ruby Platforms, then clicked Add Platform
Comment 1 paulymac 2008-07-19 08:49:33 UTC
Created attachment 65021 [details]
stacktrace
Comment 2 Martin Krauskopf 2008-07-21 20:37:32 UTC
Could you try what result do you get when you run:

  ruby -e "require 'rbconfig'; puts RbConfig::CONFIG['rubylibdir']"

with the interpreter which caused this?

And do you see any warnings in the IDE log? Thanks.
Comment 3 Martin Krauskopf 2008-08-05 07:53:54 UTC
*** Issue 142875 has been marked as a duplicate of this issue. ***
Comment 4 Martin Krauskopf 2008-08-06 06:14:40 UTC
Is this 100% reproducible? If yes, could you attach the IDE log after it happens:

  http://wiki.netbeans.org/FaqRubyNBLogging

Ideally with latest dev build:

  http://wiki.netbeans.org/RubyInstallation#section-RubyInstallation-HowDoIGetTheContinuousBuilds
Comment 5 paulymac 2008-08-07 12:22:25 UTC
Build: NetBeans IDE Dev (Build 20080803193413)
VM: Java HotSpot(TM) Client VM, 1.5.0_13-b05, Java(TM) 2 Runtime Environment, Standard Edition, 1.5.0_13-b05
OS: Windows Vista, 6.0, x86

User Comments: 


Stacktrace: 
java.lang.NullPointerException: The value for key [rubyplatform.Ruby_1.gem_version] must not be null
        at org.netbeans.modules.ruby.spi.project.support.rake.EditableProperties.put(EditableProperties.java:240)
        at org.netbeans.modules.ruby.spi.project.support.rake.EditableProperties.setProperty(EditableProperties.java:272)
        at org.netbeans.api.ruby.platform.RubyPlatformManager.putPlatformProperties(RubyPlatformManager.java:467)
        at org.netbeans.api.ruby.platform.RubyPlatformManager.access$000(RubyPlatformManager.java:83)
        at org.netbeans.api.ruby.platform.RubyPlatformManager$2.run(RubyPlatformManager.java:371)
        at org.netbeans.api.ruby.platform.RubyPlatformManager$2.run(RubyPlatformManager.java:366)
Comment 6 paulymac 2008-08-07 12:22:37 UTC
Created attachment 66789 [details]
stacktrace
Comment 7 Martin Krauskopf 2008-08-07 13:11:13 UTC
Thanks for the logs, it narrowed the culprit. What the following output (or
fail) for you:

  ruby.exe -e 'require "rubygems"; puts Gem::RubyGemsVersion'
  ruby.exe -e 'require "rubygems"; puts Gem::RubyGemsPackageVersion'

where ruby.exe is the interpreter which cannot be added.

Comment 8 Martin Krauskopf 2008-08-08 05:34:13 UTC
> Ran both and get same.
>
> Looks like a bad ruby build, I'm getting a messagebox ... This
> application failed to start because zlib.dll was not found. Re-install
> etc...
>
> I'll look for another 64bit build or try to do one myself and see what
> happens.

I've tweaked little bit a platform_info.rb script. So it should fail if
'rubygems' are required loaded successfully but something some other
load in Gem API then fails.

Changeset: #b9c5cc98b439
Comment 9 Quality Engineering 2008-08-08 15:46:15 UTC
Integrated into 'main-golden', available in build *200808081401* on http://bits.netbeans.org/dev/nightly/
Changeset: http://hg.netbeans.org/main/rev/b9c5cc98b439
User: Martin Krauskopf <mkrauskopf@netbeans.org>
Log: Narrowing catch blog only for require statement (tweak wrt. #140869)