Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 366391

Summary: NPE in the Git Repos view when a repo has been removed outside Eclipse
Product: [Technology] EGit Reporter: Tomasz Zarna <tomasz.zarna>
Component: UIAssignee: Kevin Sawicki <kevin>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: matthias.sohn
Version: 1.2   
Target Milestone: 1.3-M1   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Tomasz Zarna CLA 2011-12-12 07:50:32 EST
I20111209-1447

What steps will reproduce the problem?
1. I have been reviewing Git repos in the view
2. When I found one which was a test repo I removed it outside Eclipse
3. The repo disappeared from the view, good, but I noticed the NPE in the Error Log, bad.


-- Error Details --
Date: Mon Dec 12 13:47:05 CET 2011
Message: Unhandled event loop exception
Severity: Error
Product: Eclipse SDK 3.8.0.v201112091447 (org.eclipse.sdk.ide)
Plugin: org.eclipse.ui
Exception Stack Trace:
java.lang.NullPointerException
	at org.eclipse.jgit.lib.ObjectId.isId(ObjectId.java:90)
	at org.eclipse.egit.ui.internal.fetch.SimpleConfigureFetchDialog.getConfiguredRemote(SimpleConfigureFetchDialog.java:153)
	at org.eclipse.egit.ui.internal.repository.tree.command.FetchConfiguredRemoteCommand.getRemoteConfig(FetchConfiguredRemoteCommand.java:95)
	at org.eclipse.egit.ui.internal.repository.tree.command.FetchConfiguredRemoteCommand.setEnabled(FetchConfiguredRemoteCommand.java:69)
	at org.eclipse.ui.internal.handlers.HandlerProxy.setEnabled(HandlerProxy.java:232)
	at org.eclipse.core.commands.Command.setEnabled(Command.java:857)
	at org.eclipse.ui.menus.CommandContributionItem.isEnabled(CommandContributionItem.java:977)
	at org.eclipse.ui.menus.CommandContributionItem.updateMenuItem(CommandContributionItem.java:594)
	at org.eclipse.ui.menus.CommandContributionItem.update(CommandContributionItem.java:580)
	at org.eclipse.ui.menus.CommandContributionItem.fill(CommandContributionItem.java:490)
	at org.eclipse.jface.action.MenuManager.doItemFill(MenuManager.java:741)
	at org.eclipse.jface.action.MenuManager.update(MenuManager.java:822)
	at org.eclipse.jface.action.MenuManager.handleAboutToShow(MenuManager.java:474)
	at org.eclipse.jface.action.MenuManager.access$1(MenuManager.java:469)
	at org.eclipse.jface.action.MenuManager$2.menuShown(MenuManager.java:495)
	at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:247)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1077)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1058)
	at org.eclipse.swt.widgets.Control.WM_INITMENUPOPUP(Control.java:4881)
	at org.eclipse.swt.widgets.Control.windowProc(Control.java:4557)
	at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:341)
	at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1627)
	at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2052)
	at org.eclipse.swt.widgets.Display.windowProc(Display.java:4972)
	at org.eclipse.swt.internal.win32.OS.TrackPopupMenu(Native Method)
	at org.eclipse.swt.widgets.Menu._setVisible(Menu.java:256)
	at org.eclipse.swt.widgets.Display.runPopups(Display.java:4206)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3748)
	at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2701)
	at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2665)
	at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2499)
	at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:679)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:668)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:124)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:352)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:48)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
	at java.lang.reflect.Method.invoke(Method.java:600)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:624)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:579)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1433)
	at org.eclipse.equinox.launcher.Main.main(Main.java:1409)
Comment 1 Kevin Sawicki CLA 2012-01-05 19:35:21 EST
Proposed fix pushed to: http://egit.eclipse.org/r/#change,4928
Comment 2 Matthias Sohn CLA 2012-01-06 20:10:04 EST
merged as b424e11e08542812f2f4b29bab717abb9ffbac82