Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 336610 - EGit no longer works after feature update on MAC
Summary: EGit no longer works after feature update on MAC
Status: RESOLVED FIXED
Alias: None
Product: EGit
Classification: Technology
Component: Core (show other bugs)
Version: 0.11   Edit
Hardware: PC Mac OS X - Carbon (unsup.)
: P3 blocker (vote)
Target Milestone: 0.11   Edit
Assignee: Chris Aniszczyk CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-02-08 07:59 EST by Jens Baumgart CLA
Modified: 2011-02-09 12:28 EST (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jens Baumgart CLA 2011-02-08 07:59:23 EST
I updated my EGit feature on MAC. Afterwards EGit does not work:

ava.lang.NullPointerException
	at java.io.File.<init>(File.java:222)
	at org.eclipse.jgit.util.FS_POSIX.gitPrefix(FS_POSIX.java:66)
	at org.eclipse.jgit.util.SystemReader$1.openSystemConfig(SystemReader.java:77)
	at org.eclipse.jgit.storage.file.FileRepository.<init>(FileRepository.java:157)
	at org.eclipse.jgit.storage.file.FileRepository.<init>(FileRepository.java:128)
	at org.eclipse.egit.core.RepositoryCache.lookupRepository(RepositoryCache.java:52)
	at org.eclipse.egit.core.project.GitProjectData.map(GitProjectData.java:457)
	at org.eclipse.egit.core.project.GitProjectData.remapAll(GitProjectData.java:420)
	at org.eclipse.egit.core.project.GitProjectData.load(GitProjectData.java:413)
	at org.eclipse.egit.core.project.GitProjectData.get(GitProjectData.java:168)
	at org.eclipse.egit.core.GitProvider.getData(GitProvider.java:78)
	at org.eclipse.egit.core.project.RepositoryMapping.getMapping(RepositoryMapping.java:223)
	at org.eclipse.egit.ui.Activator$ResourceRefreshJob.triggerRefresh(Activator.java:370)
	at org.eclipse.egit.ui.Activator$2.windowActivated(Activator.java:235)
	at org.eclipse.ui.internal.Workbench$12.run(Workbench.java:823)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
	at org.eclipse.ui.internal.Workbench.fireWindowActivated(Workbench.java:821)
	at org.eclipse.ui.internal.WorkbenchWindow$28.shellActivated(WorkbenchWindow.java:3083)
	at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:82)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
	at org.eclipse.swt.widgets.Display.sendEvent(Display.java:3543)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1250)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1273)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1254)
	at org.eclipse.swt.widgets.Shell.windowDidBecomeKey(Shell.java:1725)
	at org.eclipse.swt.widgets.Display.windowProc(Display.java:4699)
	at org.eclipse.swt.internal.cocoa.OS.objc_msgSendSuper(Native Method)
	at org.eclipse.swt.widgets.Widget.callSuper(Widget.java:195)
	at org.eclipse.swt.widgets.Widget.becomeKeyWindow(Widget.java:299)
	at org.eclipse.swt.widgets.Shell.becomeKeyWindow(Shell.java:473)
	at org.eclipse.swt.widgets.Display.windowProc(Display.java:4549)
	at org.eclipse.swt.internal.cocoa.OS.objc_msgSend(Native Method)
	at org.eclipse.swt.internal.cocoa.NSWindow.close(NSWindow.java:54)
	at org.eclipse.swt.widgets.Shell.destroyWidget(Shell.java:635)
	at org.eclipse.swt.widgets.Widget.release(Widget.java:1118)
	at org.eclipse.swt.widgets.Control.release(Control.java:2458)
	at org.eclipse.swt.widgets.Widget.dispose(Widget.java:544)
	at org.eclipse.jface.window.Window.close(Window.java:335)
	at org.eclipse.jface.dialogs.Dialog.close(Dialog.java:979)
	at org.eclipse.jface.dialogs.TrayDialog.close(TrayDialog.java:179)
	at org.eclipse.jface.dialogs.Dialog.okPressed(Dialog.java:940)
	at org.eclipse.jface.dialogs.Dialog.buttonPressed(Dialog.java:472)
	at org.eclipse.ui.statushandlers.WorkbenchStatusDialogManager$InternalDialog.buttonPressed(WorkbenchStatusDialogManager.java:482)
	at org.eclipse.jface.dialogs.Dialog$2.widgetSelected(Dialog.java:624)
	at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:228)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
	at org.eclipse.swt.widgets.Display.sendEvent(Display.java:3543)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1250)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1273)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1258)
	at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1079)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3441)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3100)
	at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2405)
	at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2369)
	at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2221)
	at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:500)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:493)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:113)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:194)
	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:368)
	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:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:559)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:514)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1311)
Comment 1 Chris Aniszczyk CLA 2011-02-08 08:22:44 EST
If this is true, this should block the 0.11 release.
Comment 2 Chris Aniszczyk CLA 2011-02-08 08:23:49 EST
The code in question...

if (isMacOS()) {
			// On MacOSX, PATH is shorter when Eclipse is launched from the
			// Finder than from a terminal. Therefore try to launch bash as a
			// login shell and search using that.
			//
			String w = readPipe(userHome(), //
					new String[] { "bash", "--login", "-c", "which git" }, //
					Charset.defaultCharset().name());
			return new File(w).getParentFile().getParentFile();
		}
Comment 3 Jens Baumgart CLA 2011-02-08 09:58:52 EST
The installation of git command line seems to be corrupted on my MAC. git is not found, "which git" does not find git.
Nevertheless the code should be more rebust to avoid failing with NPE.
Comment 4 Jens Baumgart CLA 2011-02-09 05:17:19 EST
Fix proposed: http://egit.eclipse.org/r/2461
Comment 5 Jens Baumgart CLA 2011-02-09 09:21:52 EST
Fix proposed: http://egit.eclipse.org/r/2469
Comment 6 Chris Aniszczyk CLA 2011-02-09 12:28:37 EST
Fixed in stable-0.11

Can we push something to master too?