Bug 410486 - NPE in PatchSetContentRemoteFactory
Summary: NPE in PatchSetContentRemoteFactory
Status: RESOLVED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Mylyn (show other bugs)
Version: 2.0   Edit
Hardware: PC Windows 7
: P2 normal (vote)
Target Milestone: 2.0   Edit
Assignee: Miles Parker CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-06-11 10:31 EDT by Tomasz Zarna CLA
Modified: 2013-06-11 17:28 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tomasz Zarna CLA 2013-06-11 10:31:30 EDT
On master, no steps, found it in Error Log:

!ENTRY org.eclipse.ui 4 0 2013-06-11 16:27:32.792
!MESSAGE Unhandled event loop exception
!STACK 0
org.eclipse.swt.SWTException: Failed to execute runnable (java.lang.NullPointerException)
	at org.eclipse.swt.SWT.error(SWT.java:4282)
	at org.eclipse.swt.SWT.error(SWT.java:4197)
	at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:138)
	at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4140)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3757)
	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:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:601)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:622)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1410)
	at org.eclipse.equinox.launcher.Main.main(Main.java:1386)
Caused by: java.lang.NullPointerException
	at org.eclipse.mylyn.internal.gerrit.core.remote.PatchSetContentRemoteFactory.addComments(PatchSetContentRemoteFactory.java:79)
	at org.eclipse.mylyn.internal.gerrit.core.remote.PatchSetContentRemoteFactory.updateModel(PatchSetContentRemoteFactory.java:194)
	at org.eclipse.mylyn.internal.gerrit.core.remote.PatchSetContentRemoteFactory.updateModel(PatchSetContentRemoteFactory.java:1)
	at org.eclipse.mylyn.reviews.core.spi.remote.emf.RemoteEmfConsumer.applyModel(RemoteEmfConsumer.java:234)
	at org.eclipse.mylyn.reviews.core.spi.remote.JobRemoteService$2$1.run(JobRemoteService.java:77)
	at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
	at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:135)
	... 23 more
Comment 1 Steffen Pingel CLA 2013-06-11 10:50:42 EDT
Thanks. I'll tentatively put this on for 2.0 to investigate whether we should consider a fix.
Comment 2 Miles Parker CLA 2013-06-11 13:44:48 EDT
It looks like we're missing a file version or something else unexpected in the background, but it's hard to tell because we don't know what task the report is for. It might be worth thinking about trapping for these exceptions and reporting what task they occurred on.
Comment 3 Miles Parker CLA 2013-06-11 14:40:37 EDT
This might actually be related to bug 409308. Tomek, any chance you were doing a compare operation when this occurred?
Comment 4 Miles Parker CLA 2013-06-11 14:53:40 EDT
https://git.eclipse.org/r/#/c/13754/ Fixes the parallel issue on the apply side that is causing the exception here.

So this fix will prevent the actual exception from happening, though it's possible that there is some other issue that simply checking for a null review might be cover up.

But I don't want to close it until we have some sense that the cause was similar (e.g. related to a compare operation).
Comment 5 Sam Davis CLA 2013-06-11 16:30:48 EDT
When running on master and opening https://git.eclipse.org/r/#/c/13720/ and clicking compare with base, I consistently get an error:

An internal error occurred during: "Retrieving Compare Patch Set 1 with Base".

java.lang.NullPointerException
	at org.eclipse.mylyn.internal.gerrit.core.remote.PatchSetContentRemoteFactory.pull(PatchSetContentRemoteFactory.java:70)
	at org.eclipse.mylyn.internal.gerrit.core.remote.PatchSetContentCompareRemoteFactory.pull(PatchSetContentCompareRemoteFactory.java:38)
	at org.eclipse.mylyn.internal.gerrit.core.remote.PatchSetContentCompareRemoteFactory.pull(PatchSetContentCompareRemoteFactory.java:1)
	at org.eclipse.mylyn.reviews.core.spi.remote.emf.RemoteEmfConsumer.pull(RemoteEmfConsumer.java:164)
	at org.eclipse.mylyn.reviews.core.spi.remote.JobRemoteService$1.run(JobRemoteService.java:60)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
Comment 6 Miles Parker CLA 2013-06-11 16:52:25 EDT
This should be fixed in https://git.eclipse.org/r/#/c/13754/. Please verify.
Comment 7 Miles Parker CLA 2013-06-11 17:28:17 EDT
Merged for RC4.