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

Bug 358869

Summary: NPE in RawParseUtils.author
Product: [Technology] EGit Reporter: Dani Megert <daniel_megert>
Component: UIAssignee: Kevin Sawicki <kevin>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: akos.tajti, markus.kell.r, matthias.sohn, remy.suen, robert.munteanu
Version: 1.1   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:

Description Dani Megert CLA 2011-09-26 07:12:40 EDT
1.1.0.201109151100-r.

Found several of these in my .log. Sorry not steps.


!ENTRY org.eclipse.ui 4 0 2011-09-26 12:47:34.974
!MESSAGE Unhandled event loop exception
!STACK 0
java.lang.NullPointerException
	at org.eclipse.jgit.util.RawParseUtils.author(RawParseUtils.java:560)
	at org.eclipse.jgit.revwalk.RevCommit.getAuthorIdent(RevCommit.java:338)
	at org.eclipse.egit.core.internal.storage.CommitFileRevision.<init>(CommitFileRevision.java:59)
	at org.eclipse.egit.core.internal.storage.GitFileRevision.inCommit(GitFileRevision.java:54)
	at org.eclipse.egit.ui.internal.CompareUtils.getFileRevision(CompareUtils.java:149)
	at org.eclipse.egit.ui.internal.CompareUtils.getFileRevisionTypedElement(CompareUtils.java:109)
	at org.eclipse.egit.ui.internal.history.CommitFileDiffViewer.showTwoWayFileDiff(CommitFileDiffViewer.java:378)
	at org.eclipse.egit.ui.internal.history.CommitFileDiffViewer$6.run(CommitFileDiffViewer.java:225)
	at org.eclipse.jface.action.Action.runWithEvent(Action.java:498)
	at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:584)
	at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:501)
	at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:411)
	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.Display.runDeferredEvents(Display.java:4165)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3754)
	at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2696)
	at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2660)
	at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2494)
	at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:674)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:667)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:123)
	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:344)
	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:624)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:579)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1431)
	at org.eclipse.equinox.launcher.Main.main(Main.java:1407)
Comment 1 Markus Keller CLA 2011-09-28 08:56:06 EDT
1.2.0.201109261000

I did this:
- enable Preferences > Team > Show the file author...
- Fetch from Upstream
- in the dialog, double-click the change to get a commit editor
- in the Files pane, double-click a deleted file
Comment 2 Kevin Sawicki CLA 2011-10-07 17:38:11 EDT
Do you happen to know the commit id and repository this occurred for?
Comment 3 Markus Keller CLA 2011-10-10 11:05:17 EDT
> - enable Preferences > Team > Show the file author...

This doesn't seem to matter, got the NPE today with that preference disabled.

This time, I got it for commit 41a0b6a0e7fdff11d3aeb623a16808263b38f6e3 in repository git://git.eclipse.org/gitroot/jdt/eclipse.jdt.core.git

I did a Pull, and then opened the commit editor from the Pull Result dialog. Then, I got the NPE when I tried to do "Compare with Version in Ancestor" on any of the two changed files.

In another workspace, where I already performed multiple pulls on the same repository, I didn't get the NPE. When I close the commit editor and then open it again via Open Git Commit..., then I cannot reproduce the NPE any more.

=> The important factor seems to be that the Commit editor is opened from the Pull or Fetch Result dialog.

See also bug 347774 in JGit.
Comment 4 Kevin Sawicki CLA 2011-10-14 11:42:17 EDT
Proposed fix pushed to: http://egit.eclipse.org/r/#change,4351
Comment 5 Matthias Sohn CLA 2011-10-14 15:20:20 EDT
merged as bb114819c2580544a47988bf5ae1f5415cce866b
Comment 6 Dani Megert CLA 2011-10-20 09:11:14 EDT
Verified in 1.2.0.201110190928.
Comment 7 Kevin Sawicki CLA 2011-11-14 15:53:27 EST
*** Bug 363746 has been marked as a duplicate of this bug. ***
Comment 8 Robin Rosenberg CLA 2013-04-19 04:39:45 EDT
*** Bug 347774 has been marked as a duplicate of this bug. ***