Community
Participate
Working Groups
Build Identifier: M20110909-1335 Error Log: An internal error occurred during: "Updating Compare Editor". Stacktrace: java.lang.NullPointerException at org.eclipse.team.internal.ui.synchronize.LocalResourceTypedElement.fetchAuthor(LocalResourceTypedElement.java:383) at org.eclipse.team.internal.ui.mapping.ResourceDiffCompareInput.updateAuthorInfo(ResourceDiffCompareInput.java:357) at org.eclipse.team.internal.ui.mapping.ResourceCompareInputChangeNotifier.fetchAuthors(ResourceCompareInputChangeNotifier.java:327) at org.eclipse.team.internal.ui.mapping.ResourceCompareInputChangeNotifier$3.run(ResourceCompareInputChangeNotifier.java:321) at org.eclipse.team.internal.core.BackgroundEventHandler$RunnableEvent.run(BackgroundEventHandler.java:176) at org.eclipse.team.internal.ui.mapping.CompareInputChangeNotifier$InputChangeEventHandler.executeRunnableNow(CompareInputChangeNotifier.java:146) at org.eclipse.team.internal.ui.mapping.CompareInputChangeNotifier$InputChangeEventHandler.doDispatchEvents(CompareInputChangeNotifier.java:101) at org.eclipse.team.internal.core.BackgroundEventHandler.dispatchEvents(BackgroundEventHandler.java:394) at org.eclipse.team.internal.core.BackgroundEventHandler.processEvents(BackgroundEventHandler.java:374) at org.eclipse.team.internal.core.BackgroundEventHandler$1.run(BackgroundEventHandler.java:203) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54) Session data: eclipse.buildId=M20110909-1335 java.version=1.6.0_26 java.vendor=Apple Inc. BootLoader constants: OS=macosx, ARCH=x86_64, WS=cocoa, NL=de_DE Reproducible: Always Steps to Reproduce: 1. Make changes to a java file in workspace 2. Project > Synchronize workspace (opening Sync perspective) 3. Douzble click to open compare editor on an edited java file
This also happens consistently when doing a 'Compare With->Local History' if 'Team->Show file author' preference is enabled. A simple workaround is to disable that preference. As for the cause of the problem, the offending code in LocalResourceTypedElement reads: IFileRevision revision= fileHistoryProvider.getWorkspaceFileRevision(getResource()); if (revision == null) return; // NOTE: Must not check for revision#isPropertyMissing() as this will always return true for the workspace file revision revision= revision.withAllProperties(monitor); author= revision.getAuthor(); With EGit installed, I originally get an instance of WorkspaceFileRevision from the history provider. Looking at the cause of the problem, there seem to be two issues coming together: 1. I don't know anything about the team API interna and Javadoc isn't clear here, but looking at other implementations of IFileRevision, the EGit implementations probably shouldn't just return null in withAllProperties(...) 2. the above code should probably guard against revision.withAllProperties(monitor) == null by using the original value: IFileRevision fullRevision = revision.withAllProperties(monitor); if (fullRevision != null) revision = fullRevision; Searching for other occurrences of IFileRevision.withAllProperties(), this probably suffers from the same problem: org.eclipse.team.internal.ui.history.FileRevisionTypedElement.fetchAuthor(IProgressMonitor)
Bug #358392 looks like it could be related. Anyway, I'm still seeing this error in EGit 2.0.0.201206090913 (with Indigo SR 2, build 20120216-1857).
Fix pushed to review: https://git.eclipse.org/r/8405
merged as fbc5596c971b1194d67b5a18fd18c2dac50b89cf