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 111832 - java.lang.NullPointerException
Summary: java.lang.NullPointerException
Status: VERIFIED FIXED
Alias: None
Product: versioncontrol
Classification: Unclassified
Component: Code (show other bugs)
Version: 6.x
Hardware: All All
: P1 blocker (vote)
Assignee: issues@versioncontrol
URL: http://statistics.netbeans.org/except...
Keywords:
: 112303 (view as bug list)
Depends on:
Blocks:
 
Reported: 2007-08-02 21:56 UTC by wobster
Modified: 2007-11-28 15:53 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 357


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description wobster 2007-08-02 21:56:36 UTC
This seems to be related to projects where external sources were attached.

DON'T DELETE THIS TEXT:

Build: NetBeans IDE Dev (Build 200708011200)
VM: Java HotSpot(TM) Client VM, 1.6.0_02-b05
OS: Windows XP, 5.1, x86
STACKTRACE: (first 10 lines)
java.lang.NullPointerException
        at org.netbeans.modules.versioning.spi.VCSContext.addSiblings(VCSContext.java:325)
        at org.netbeans.modules.versioning.spi.VCSContext.substract(VCSContext.java:314)
        at org.netbeans.modules.versioning.spi.VCSContext.computeFiles(VCSContext.java:146)
        at org.netbeans.modules.subversion.util.SvnUtils.getCurrentContext(SvnUtils.java:83)
        at org.netbeans.modules.subversion.util.SvnUtils.getCurrentContext(SvnUtils.java:99)
        at org.netbeans.modules.subversion.ui.actions.ContextAction.getContext(ContextAction.java:273)
        at org.netbeans.modules.subversion.ui.actions.ContextAction.enable(ContextAction.java:72)
        at org.openide.util.actions.NodeAction$DelegateAction.resultChanged(NodeAction.java:589)
        at org.openide.util.actions.NodeAction$DelegateAction.<init>(NodeAction.java:534)
        at org.openide.util.actions.NodeAction.createContextAwareInstance(NodeAction.java:329)
Comment 1 Maros Sandor 2007-08-03 09:01:39 UTC
I could not reproduce it so I attempted to fix it blindly. Please verify in following builds. It would also be good if
you could provide exact steps (setup) how to reproduce the problem so that I could verify that my fix is the right one.

/shared/data/ccvs/repository/versioncontrol/src/org/netbeans/modules/versioning/spi/VCSContext.java,v  <--  VCSContext.java
new revision: 1.17; previous revision: 1.16
Comment 2 wobster 2007-08-03 14:59:59 UTC
I just set up a standard Java project inside a directory that was subversioned, added jar files to the libraries, added
external source distributions from other directories, added a filter (**/.java) to eliminate a bunch of other files
(c++, xml, etc.) from showing up, right clicked on project node and got the NPE.
Comment 3 Maros Sandor 2007-08-08 13:32:05 UTC
*** Issue 112303 has been marked as a duplicate of this issue. ***
Comment 4 wobster 2007-08-09 17:23:45 UTC
I tried out the nightly build today and it still had the bug:

java.lang.NullPointerException
	at org.netbeans.modules.versioning.spi.VCSContext.addSiblings(VCSContext.java:326)
	at org.netbeans.modules.versioning.spi.VCSContext.substract(VCSContext.java:315)
	at org.netbeans.modules.versioning.spi.VCSContext.computeFiles(VCSContext.java:146)
	at org.netbeans.modules.subversion.util.SvnUtils.getCurrentContext(SvnUtils.java:83)
	at org.netbeans.modules.subversion.util.SvnUtils.getCurrentContext(SvnUtils.java:99)
	at org.netbeans.modules.subversion.ui.actions.ContextAction.getContext(ContextAction.java:273)
	at org.netbeans.modules.subversion.ui.actions.ContextAction.enable(ContextAction.java:72)
	at org.openide.util.actions.NodeAction$DelegateAction.resultChanged(NodeAction.java:589)
	at org.openide.util.actions.NodeAction$DelegateAction.<init>(NodeAction.java:534)
	at org.openide.util.actions.NodeAction.createContextAwareInstance(NodeAction.java:329)
	at org.netbeans.modules.versioning.util.SystemActionBridge.createAction(SystemActionBridge.java:40)
	at org.netbeans.modules.subversion.Annotator.getActions(Annotator.java:467)
	at org.netbeans.modules.subversion.FileStatusProvider.getActions(FileStatusProvider.java:60)
	at org.netbeans.modules.versioning.ProjectMenuItem.createVersioningSystemItems(ProjectMenuItem.java:125)
	at org.netbeans.modules.versioning.ProjectMenuItem.createVersioningSystemPopup(ProjectMenuItem.java:156)
	at org.netbeans.modules.versioning.ProjectMenuItem.createItems(ProjectMenuItem.java:65)
	at org.netbeans.modules.versioning.ProjectMenuItem.access$100(ProjectMenuItem.java:44)
	at org.netbeans.modules.versioning.ProjectMenuItem$DynamicDummyItem.getMenuPresenters(ProjectMenuItem.java:171)
	at org.netbeans.modules.openide.awt.DefaultAWTBridge.convertComponents(DefaultAWTBridge.java:83)
	at org.openide.util.Utilities.actionsToPopup(Utilities.java:2663)
	at org.openide.util.Utilities.actionsToPopup(Utilities.java:2732)
	at org.openide.explorer.view.TreeView.createPopup(TreeView.java:895)
	at org.openide.explorer.view.TreeView$PopupAdapter.showPopup(TreeView.java:1341)
	at org.openide.awt.MouseUtils$PopupMouseAdapter.maybePopup(MouseUtils.java:160)
	at org.openide.awt.MouseUtils$PopupMouseAdapter.mouseReleased(MouseUtils.java:155)
	at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:273)
	at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:272)
	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)
Comment 5 Maros Sandor 2007-08-13 09:41:49 UTC
I managed to reproduce it with 2 source roots, one versioned and the other unversioned. I also have to setup exclusion
filters as specified in the previous comment.

/shared/data/ccvs/repository/versioncontrol/src/org/netbeans/modules/versioning/spi/VCSContext.java,v  <--  VCSContext.java
new revision: 1.18; previous revision: 1.17
Comment 6 Peter Pis 2007-11-28 15:53:48 UTC
Can't reproduce. Verified.