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 126327 - null pointer when i try to run an rspec file
Summary: null pointer when i try to run an rspec file
Status: RESOLVED FIXED
Alias: None
Product: ruby
Classification: Unclassified
Component: Testing (show other bugs)
Version: 6.x
Hardware: All All
: P1 blocker (vote)
Assignee: Martin Krauskopf
URL:
Keywords:
: 126325 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-01-30 21:10 UTC by jamespb
Modified: 2008-02-06 14:07 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
messages.log (50.08 KB, text/plain)
2008-01-30 21:11 UTC, jamespb
Details

Note You need to log in before you can comment on or make changes to this bug.
Description jamespb 2008-01-30 21:10:43 UTC
I'm getting this when I hit ctrl-F6 in an rspec file:

java.lang.NullPointerException
	at org.netbeans.modules.ruby.rubyproject.RSpecSupport.getSpecBinary(RSpecSupport.java:115)
	at org.netbeans.modules.ruby.rubyproject.RSpecSupport.runRSpec(RSpecSupport.java:186)
	at org.netbeans.modules.ruby.rubyproject.RSpecSupport.runRSpec(RSpecSupport.java:159)
	at org.netbeans.modules.ruby.railsprojects.RailsActionProvider.invokeAction(RailsActionProvider.java:297)
	at org.netbeans.modules.project.ui.actions.FileCommandAction.actionPerformed(FileCommandAction.java:99)
	at org.netbeans.modules.project.ui.actions.LookupSensitiveAction.actionPerformed(LookupSensitiveAction.java:155)
	at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
	at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)
	at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
	at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
	at javax.swing.AbstractButton.doClick(AbstractButton.java:357)
	at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:1216)
	at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:1257)
	at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:272)
	at java.awt.Component.processMouseEvent(Component.java:6038)
	at javax.swing.JComponent.processMouseEvent(JComponent.java:3265)
	at java.awt.Component.processEvent(Component.java:5803)
	at java.awt.Container.processEvent(Container.java:2058)
	at java.awt.Component.dispatchEventImpl(Component.java:4410)
	at java.awt.Container.dispatchEventImpl(Container.java:2116)
	at java.awt.Component.dispatchEvent(Component.java:4240)
	at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4322)
	at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3986)
	at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3916)
	at java.awt.Container.dispatchEventImpl(Container.java:2102)
	at java.awt.Window.dispatchEventImpl(Window.java:2429)
	at java.awt.Component.dispatchEvent(Component.java:4240)
[catch] at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:173)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:121)


Product Version: NetBeans Ruby IDE 20080125120439
Java: 1.6.0_03; Java HotSpot(TM) Server VM 1.6.0_03-b05
System: Linux version 2.6.18-8.1.15.el5xen running on i386; UTF-8; en_US (nbrubyide)
Userdir: /home/james/.nbrubyide/dev
Comment 1 jamespb 2008-01-30 21:11:33 UTC
Created attachment 55794 [details]
messages.log
Comment 2 Torbjorn Norbye 2008-01-30 21:13:59 UTC
Martin, can you take a look - it looks related to the gem manager. The probably needs some kind of fallback mechanism
when there's no gem manager for the current project. (I'm not sure how that happened - or perhaps rspec is installed as
a rails plugin? If so the code may need to look for it not just using gems.)
Comment 3 jamespb 2008-01-30 21:16:18 UTC
I see it in this build also:

Product Version: NetBeans IDE Dev (Build 200801290002)
Java: 1.6.0_03; Java HotSpot(TM) Client VM 1.6.0_03-b05
System: Linux version 2.6.18-8.1.15.el5xen running on i386; UTF-8; en_US (nb)
Userdir: /home/james/.netbeans/dev
Comment 4 jamespb 2008-01-30 21:20:04 UTC
Tor, just saw your gem comment - I left out some important info.

rspec had been installed as a gem.  However, I updated the rspec_on_rails plugin to the latest version.  At that point,
rspec complained about a version mismatch between the plugin and the gem, and it suggested that rspec itself should be
installed as a plugin.  So, I installed rspec as a plugin and removed the gem.
Comment 5 jamespb 2008-01-30 21:28:39 UTC
I (re)installed the rspec gem plugin (via the command line) and still had the problem.  Removing the userdir and
restarting (with an rspec gem installed) is now working.

(Didn't occur to me to use the gem GUI in NetBeans - that might have avoided the issue)
Comment 6 Martin Krauskopf 2008-01-30 21:42:25 UTC
According to the code the NPE can't be thrown I would say :) Will prevent at least NPE.

> (Didn't occur to me to use the gem GUI in NetBeans - that might have avoided the issue)

That's RFE (probably not filed yet) to listen on external filesystem changes on Gem Repositories.
Comment 7 Martin Krauskopf 2008-01-30 21:50:51 UTC
NPE should be fixed. Let us know if there are still some problems like action does not work. I will put in more
diagnostic. (PS: note that continuous builds on Hudson do not work yet, so will be available in one of daily builds)
Comment 8 Martin Krauskopf 2008-02-06 14:07:02 UTC
*** Issue 126325 has been marked as a duplicate of this issue. ***