Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 339528 - NPE attempting to reset after a merge commit in PlotCommit.getRefCount
Summary: NPE attempting to reset after a merge commit in PlotCommit.getRefCount
Status: CLOSED FIXED
Alias: None
Product: EGit
Classification: Technology
Component: UI (show other bugs)
Version: 0.12   Edit
Hardware: PC Linux-GTK
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-10 09:36 EST by James Blackburn CLA
Modified: 2013-09-27 14:02 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description James Blackburn CLA 2011-03-10 09:36:35 EST
Using current nightly:
  Eclipse EGit (Incubation)	0.12.0.201103040937	org.eclipse.egit.feature.group
  Eclipse JGit (Incubation)	0.12.0.201103040915	org.eclipse.jgit.feature.group

I got this NPE trying to reset, in the History view to a commit before a merge:

java.lang.NullPointerException
	at org.eclipse.jgit.revplot.PlotCommit.getRefCount(PlotCommit.java:156)
	at org.eclipse.egit.ui.internal.history.CommitGraphTable$4.mouseHover(CommitGraphTable.java:198)
	at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:201)



Immediately after this I got this exception from the Reset handler:

Failed to execute item org.eclipse.egit.ui.history.Reset
org.eclipse.core.commands.ExecutionException: Could not get the current input from the history view
	at org.eclipse.egit.ui.internal.history.command.AbstractHistoryCommanndHandler.getInput(AbstractHistoryCommanndHandler.java:62)
	at org.eclipse.egit.ui.internal.history.command.AbstractHistoryCommanndHandler.getRepository(AbstractHistoryCommanndHandler.java:76)
	at org.eclipse.egit.ui.internal.history.command.ResetHandler.execute(ResetHandler.java:28)
	at org.eclipse.ui.internal.handlers.HandlerProxy.execute(HandlerProxy.java:293)
	at org.eclipse.core.commands.Command.executeWithChecks(Command.java:476)
	at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:508)
	at org.eclipse.ui.internal.handlers.HandlerService.executeCommand(HandlerService.java:169)
	at org.eclipse.ui.internal.handlers.SlaveHandlerService.executeCommand(SlaveHandlerService.java:241)
Comment 1 James Blackburn CLA 2011-03-11 10:53:51 EST
I keep getting these.  Adding jgit core inbox as the NPE is actually in jgit. It's not clear to me whether the UI is at fault or jgit core.
Comment 2 Robin Stocker CLA 2013-09-27 14:02:58 EDT
This was fixed in JGit commit 9953e2a39e3604324103d7dc35615e3f721da36d.