Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Compare » NPE when comparing with HEAD (EGit)
NPE when comparing with HEAD (EGit) [message #1771930] Fri, 01 September 2017 09:05 Go to next message
Romain Bioteau is currently offline Romain BioteauFriend
Messages: 64
Registered: August 2009
Location: Grenoble
Member
Hi,

I'm exploring the capabilities of EMF Compare and the EGit support and I'm stuck on the following issue:

I have a model file committed in my repository
I make some changes in that file
Then I try to use `Compare with > HEAD Revision`
It opens the compare editor properly but everytime I try to double click on a model node I get the following NPE:

!ENTRY org.eclipse.ui 4 0 2017-09-01 10:53:58.551
!MESSAGE Unhandled event loop exception
!STACK 0
java.lang.NullPointerException
	at org.eclipse.emf.compare.rcp.ui.internal.util.MergeViewerUtil.getResourceViaMatch(MergeViewerUtil.java:221)
	at org.eclipse.emf.compare.rcp.ui.internal.util.MergeViewerUtil.getResource(MergeViewerUtil.java:196)
	at org.eclipse.emf.compare.ide.ui.internal.contentmergeviewer.tree.provider.TreeMergeViewerItemContentProvider.createBasicContainer(TreeMergeViewerItemContentProvider.java:1000)
	at org.eclipse.emf.compare.ide.ui.internal.contentmergeviewer.tree.provider.TreeMergeViewerItemContentProvider.getParent(TreeMergeViewerItemContentProvider.java:95)
	at org.eclipse.emf.compare.ide.ui.internal.contentmergeviewer.tree.provider.DelegatingTreeMergeViewerItemContentProvider.getParent(DelegatingTreeMergeViewerItemContentProvider.java:110)
	at org.eclipse.jface.viewers.AbstractTreeViewer.getParentElement(AbstractTreeViewer.java:1690)
	at org.eclipse.jface.viewers.TreeViewer.getParentElement(TreeViewer.java:557)
	at org.eclipse.jface.viewers.AbstractTreeViewer.internalExpand(AbstractTreeViewer.java:1619)
	at org.eclipse.jface.viewers.AbstractTreeViewer.setExpandedState(AbstractTreeViewer.java:2456)
	at org.eclipse.emf.compare.rcp.ui.internal.mergeviewer.impl.TreeMergeViewer.setExpandedState(TreeMergeViewer.java:101)
	at org.eclipse.emf.compare.ide.ui.internal.contentmergeviewer.tree.TreeContentMergeViewer$ExpandCollapseListener.handleEvent(TreeContentMergeViewer.java:519)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:86)
	at org.eclipse.swt.widgets.Display.sendEvent(Display.java:5252)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1348)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1374)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1357)
	at org.eclipse.swt.widgets.Tree.gtk_test_expand_row(Tree.java:2396)
	at org.eclipse.swt.widgets.Widget.windowProc(Widget.java:2007)
	at org.eclipse.swt.widgets.Display.windowProc(Display.java:5518)
	at org.eclipse.swt.internal.gtk.OS._gtk_tree_view_expand_row(Native Method)
	at org.eclipse.swt.internal.gtk.OS.gtk_tree_view_expand_row(OS.java:13188)
	at org.eclipse.swt.widgets.Tree.showItem(Tree.java:3925)
	at org.eclipse.swt.widgets.Tree.setSelection(Tree.java:3740)
	at org.eclipse.jface.viewers.TreeViewer.setSelection(TreeViewer.java:308)
	at org.eclipse.jface.viewers.AbstractTreeViewer.setSelectionToWidget(AbstractTreeViewer.java:2504)
	at org.eclipse.jface.viewers.StructuredViewer.setSelectionToWidget(StructuredViewer.java:1759)
	at org.eclipse.jface.viewers.AbstractTreeViewer.setSelectionToWidget(AbstractTreeViewer.java:2959)
	at org.eclipse.jface.viewers.StructuredViewer.setSelection(StructuredViewer.java:1715)
	at org.eclipse.jface.viewers.TreeViewer.setSelection(TreeViewer.java:1075)
	at org.eclipse.emf.compare.rcp.ui.internal.mergeviewer.impl.AbstractStructuredMergeViewer.setSelection(AbstractStructuredMergeViewer.java:111)
	at org.eclipse.emf.compare.ide.ui.internal.contentmergeviewer.EMFCompareContentMergeViewer.updateContent(EMFCompareContentMergeViewer.java:286)
	at org.eclipse.compare.contentmergeviewer.ContentMergeViewer.internalRefresh(ContentMergeViewer.java:802)
	at org.eclipse.compare.contentmergeviewer.ContentMergeViewer.inputChanged(ContentMergeViewer.java:710)
	at org.eclipse.jface.viewers.ContentViewer.setInput(ContentViewer.java:286)
	at org.eclipse.compare.CompareViewerSwitchingPane.setInput(CompareViewerSwitchingPane.java:270)
	at org.eclipse.compare.internal.CompareContentViewerSwitchingPane.setInput(CompareContentViewerSwitchingPane.java:192)
	at org.eclipse.compare.CompareEditorInput.internalSetContentPaneInput(CompareEditorInput.java:855)
	at org.eclipse.compare.CompareEditorInput.access$7(CompareEditorInput.java:853)
	at org.eclipse.compare.CompareEditorInput$10.run(CompareEditorInput.java:793)
	at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
	at org.eclipse.compare.CompareEditorInput.feed1(CompareEditorInput.java:779)
	at org.eclipse.compare.CompareEditorInput.access$2(CompareEditorInput.java:778)
	at org.eclipse.compare.CompareEditorInput$4.open(CompareEditorInput.java:660)
	at org.eclipse.compare.CompareViewerPane.open(CompareViewerPane.java:314)
	at org.eclipse.jface.viewers.StructuredViewer$2.run(StructuredViewer.java:851)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
	at org.eclipse.ui.internal.JFaceUtil.lambda$0(JFaceUtil.java:44)
	at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:173)
	at org.eclipse.jface.viewers.StructuredViewer.fireOpen(StructuredViewer.java:848)
	at org.eclipse.emf.compare.ide.ui.internal.structuremergeviewer.AbstractStructuredViewerWrapper.access$6(AbstractStructuredViewerWrapper.java:1)
	at org.eclipse.emf.compare.ide.ui.internal.structuremergeviewer.AbstractStructuredViewerWrapper$5.open(AbstractStructuredViewerWrapper.java:144)
	at org.eclipse.jface.viewers.StructuredViewer$2.run(StructuredViewer.java:851)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
	at org.eclipse.ui.internal.JFaceUtil.lambda$0(JFaceUtil.java:44)
	at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:173)
	at org.eclipse.jface.viewers.StructuredViewer.fireOpen(StructuredViewer.java:848)
	at org.eclipse.emf.compare.ide.ui.internal.structuremergeviewer.WrappableTreeViewer.fireOpen(WrappableTreeViewer.java:868)
	at org.eclipse.jface.viewers.StructuredViewer.handleOpen(StructuredViewer.java:1163)
	at org.eclipse.emf.compare.ide.ui.internal.structuremergeviewer.WrappableTreeViewer.handleOpen(WrappableTreeViewer.java:908)
	at org.eclipse.jface.util.OpenStrategy.fireOpenEvent(OpenStrategy.java:273)
	at org.eclipse.jface.util.OpenStrategy.access$2(OpenStrategy.java:268)
	at org.eclipse.jface.util.OpenStrategy$1.handleEvent(OpenStrategy.java:308)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:86)
	at org.eclipse.swt.widgets.Display.sendEvent(Display.java:5252)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1348)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4522)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:4107)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1155)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1044)
	at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:153)
	at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:680)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:594)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148)
	at org.bonitasoft.studio.application.BonitaStudioApplication.createAndRunWorkbench(BonitaStudioApplication.java:93)
	at org.bonitasoft.studio.application.BonitaStudioApplication.start(BonitaStudioApplication.java:88)
	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:653)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1499)
	at org.eclipse.equinox.launcher.Main.main(Main.java:1472)


It looks like it fails to compute the ancestor resource.

Note that I do not have this issue when comparing 2 local files or 2 commits from my history. Comparing a previous revision with the working tree also fails with the same stack.

Anyone has an hint ? Should I fill a bug ?

Thanks


R&D Engineer at BonitaSoft
Re: NPE when comparing with HEAD (EGit) [message #1772150 is a reply to message #1771930] Wed, 06 September 2017 07:35 Go to previous messageGo to next message
Laurent Goubet is currently offline Laurent GoubetFriend
Messages: 1857
Registered: July 2009
Senior Member
Hi Romain,

Yes, please fill a bug with this stack trace since there seems to be something wrong going on. Could you tell me what kind of models you were comparing? Ecore? UML?

Laurent Goubet
Obeo
Re: NPE when comparing with HEAD (EGit) [message #1772154 is a reply to message #1772150] Wed, 06 September 2017 07:49 Go to previous messageGo to next message
Laurent Goubet is currently offline Laurent GoubetFriend
Messages: 1857
Registered: July 2009
Senior Member
Nevermind. This was bug 518756 and it has been fixed on master. This fix will be available for consumption in Oxygen.1 that will be out in 3 weeks, or you can update your version of EMF Compare to the 3.3.2RC1 that includes this fix.

Laurent Goubet
Obeo
Re: NPE when comparing with HEAD (EGit) [message #1772169 is a reply to message #1772154] Wed, 06 September 2017 09:33 Go to previous message
Romain Bioteau is currently offline Romain BioteauFriend
Messages: 64
Registered: August 2009
Location: Grenoble
Member
Thanks a lot Laurent.
That's a great news.


R&D Engineer at BonitaSoft
Previous Topic:How handle only merge the right difference into left?
Next Topic:Closing EMF compare dialog after conflict resolution gets stuck
Goto Forum:
  


Current Time: Thu Jul 19 07:49:32 GMT 2018

Powered by FUDForum. Page generated in 0.01944 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top