Bug 472400 - NullPointerException in Pull Request Editor when opening commit from the list
Summary: NullPointerException in Pull Request Editor when opening commit from the list
Status: NEW
Alias: None
Product: EGit
Classification: Technology
Component: GitHub (show other bugs)
Version: 4.7   Edit
Hardware: PC Linux
: P3 major (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: helpwanted
Depends on:
Blocks:
 
Reported: 2015-07-10 14:21 EDT by Denis Golovin CLA
Modified: 2017-11-23 08:26 EST (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Denis Golovin CLA 2015-07-10 14:21:54 EDT
I have Mars for Java Developers Package with manually installed 

Eclipse GitHub integration with task focused interface	4.0.0.201506090130-r	org.eclipse.mylyn.github.feature.feature.group	Eclipse EGit

from http://download.eclipse.org/releases/mars

This scenario leads to exception below:
1. Clone https://github.com/jbosstools/jbosstools-freemarker using egit
2. Import all projects from cloned repo
3. Add GitHub pull request task repository for cloned repo
4. Create query for opened PRs
5. Open any PR
6. Double Click on any commit in PR editor

java.lang.NullPointerException
	at org.eclipse.mylyn.internal.github.ui.pr.CommitAttributePart.openCommits(CommitAttributePart.java:177)
	at org.eclipse.mylyn.internal.github.ui.pr.CommitAttributePart.access$1(CommitAttributePart.java:162)
	at org.eclipse.mylyn.internal.github.ui.pr.CommitAttributePart$1.open(CommitAttributePart.java:139)
	at org.eclipse.jface.viewers.StructuredViewer$2.run(StructuredViewer.java:854)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
	at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:50)
	at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:173)
	at org.eclipse.jface.viewers.StructuredViewer.fireOpen(StructuredViewer.java:851)
	at org.eclipse.jface.viewers.StructuredViewer.handleOpen(StructuredViewer.java:1168)
	at org.eclipse.jface.viewers.StructuredViewer$6.handleOpen(StructuredViewer.java:1275)
	at org.eclipse.jface.util.OpenStrategy.fireOpenEvent(OpenStrategy.java:278)
	at org.eclipse.jface.util.OpenStrategy.access$2(OpenStrategy.java:272)
	at org.eclipse.jface.util.OpenStrategy$1.handleEvent(OpenStrategy.java:313)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
	at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4481)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1327)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3819)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3430)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$4.run(PartRenderingEngine.java:1127)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:337)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1018)
	at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:156)
	at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:654)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:337)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:598)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:139)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:380)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:235)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:497)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:669)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:608)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1515)
	at org.eclipse.equinox.launcher.Main.main(Main.java:1488)
Comment 1 Marco Descher CLA 2017-05-29 15:42:15 EDT
Still the case with Neon.3 - not able to open commits fetched via pull request tasks from github

java.lang.NullPointerException
	at org.eclipse.mylyn.internal.github.ui.pr.CommitAttributePart.openCommits(CommitAttributePart.java:177)
	at org.eclipse.mylyn.internal.github.ui.pr.CommitAttributePart.access$1(CommitAttributePart.java:162)
	at org.eclipse.mylyn.internal.github.ui.pr.CommitAttributePart$1.open(CommitAttributePart.java:139)
	at org.eclipse.jface.viewers.StructuredViewer$2.run(StructuredViewer.java:855)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
	at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:50)
	at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:173)
	at org.eclipse.jface.viewers.StructuredViewer.fireOpen(StructuredViewer.java:852)
	at org.eclipse.jface.viewers.StructuredViewer.handleOpen(StructuredViewer.java:1169)
	at org.eclipse.jface.util.OpenStrategy.fireOpenEvent(OpenStrategy.java:278)
	at org.eclipse.jface.util.OpenStrategy.access$2(OpenStrategy.java:272)
	at org.eclipse.jface.util.OpenStrategy$1.handleEvent(OpenStrategy.java:313)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
	at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4256)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1501)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1524)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1509)
	at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1313)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4080)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3706)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$4.run(PartRenderingEngine.java:1121)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1022)
	at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:150)
	at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:693)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:610)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:138)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:673)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:610)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1519)
Comment 3 Marco Descher CLA 2017-09-12 05:27:33 EDT
Just tried to use it again on Oxygen. Effectively blocks me from using EGit to handle GitHub Pull requests!

https://dev.eclipse.org/recommenders/community/aeri/v2/#!/submissions/UnzItL55jSO1ssDYN0A9fVfoyUfMJUmEWoktlkevAzNHBMttJfdwcxIXobVExcd0
Comment 4 Bhupinder Singh CLA 2017-11-23 08:24:00 EST
Git fetch needs to be invoking Open Pull Request query in task view. I was facing similar issue in eclipse oxygen. After manually doing git fetch in "git perspective", i was able to see Open Pull Request files in eclipse task editor.
Comment 5 Bhupinder Singh CLA 2017-11-23 08:26:34 EST
Typo correction for above comment

"Git fetch need to be invoked before invoking Open Pull Request query in task view"