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 108310 - NPE when the Ruby interpreter path is too short
Summary: NPE when the Ruby interpreter path is too short
Status: CLOSED FIXED
Alias: None
Product: ruby
Classification: Unclassified
Component: Code (show other bugs)
Version: 6.x
Hardware: All All
: P2 blocker (vote)
Assignee: Torbjorn Norbye
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-06-27 17:01 UTC by Martin Krauskopf
Modified: 2007-07-03 14:42 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Krauskopf 2007-06-27 17:01:28 UTC
Try to add "/" as an interpreter.

RubyInstallation.getRubyHome() is not ready for it. Probably some sanity check whether interpreter is valid should be
done directly in the panel.

No directly related = getRubyHomeUrl() does not handle (getRubyHome() == null) case => another possible NPE.
Comment 1 Torbjorn Norbye 2007-06-27 17:41:33 UTC
Is this really a P2? A one-character path to a Ruby interpreter seems unlikely for real-world scenarios. Agree to fix it, but I don't think it's P2.
Comment 2 Martin Krauskopf 2007-06-27 17:48:53 UTC
The reason is that once it is done it is really hard to get rid of it (impossible? - would be P1 ;) ). Since it is
thrown every time you invoke the Options.
Comment 3 Torbjorn Norbye 2007-06-28 16:08:01 UTC
I see; this happens because as of recently the options are calling setRuby for every keystroke in the options dialog (to synchronize the fast debugger 
option?), so "/" is entered as Ruby while you're editing. 

Fixed:

IDE:-------------------------------------------------
IDE: [6/28/07 8:05 AM] Committing started
Checking in RubyInstallation.java;
/cvs/scripting/ruby/platform/src/org/netbeans/api/ruby/platform/RubyInstallation.java,v  <--  RubyInstallation.java
new revision: 1.31; previous revision: 1.30
done
IDE: [6/28/07 8:05 AM] Committing finished
Comment 4 Martin Krauskopf 2007-06-28 16:48:19 UTC
> to synchronize the fast debugger option?

Yup, exactly. From RubyDebuggerPanel:

// FIXME: we need to save interpreter until there is a
// possibility to have either more RubyInstallation instances or
// to operate on arbitrary Gem repository

I need to work with the right gem repository, when interpreter is changed.

v/c
Comment 5 Jiri Kovalsky 2007-07-03 13:59:35 UTC
Reassigning this issue to newly created 'ruby' component.
Comment 6 Jiri Kovalsky 2007-07-03 14:42:54 UTC
Changing target milestone of all resolved Ruby issues from TBD to 6.0 Beta 1 build.