Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 317298 - [EMF Compare] NPE when merging two objects with containment references
Summary: [EMF Compare] NPE when merging two objects with containment references
Status: CLOSED WORKSFORME
Alias: None
Product: EMFCompare
Classification: Modeling
Component: Core (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 critical (vote)
Target Milestone: ---   Edit
Assignee: EMF Compare CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-06-18 09:59 EDT by Ali AKAR CLA
Modified: 2011-07-20 11:34 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 Ali AKAR CLA 2010-06-18 09:59:05 EDT
Build Identifier: emf-compare-SDK-1.1.0RC3 [EMF Compare]

When trying to merge automatically the below described file a NPE is thrown

File A
  System A
    Process A
      Thread A
         Stack A
         Context A

File B
  System A
    Process A
      Thread A
         Stack A
Merging automatically File A with File B or sytem A in file A with system A in file B is OK

But when trying to merge processes of threads a NPE is thrown and below the stack trace of the exception.
------
java.lang.NullPointerException
	at org.eclipse.emf.compare.util.EFactory.eStructuralFeature(EFactory.java:259)
	at org.eclipse.emf.compare.util.EFactory.eAdd(EFactory.java:59)
	at org.eclipse.emf.compare.diff.internal.merge.impl.MoveModelElementMerger.undoInTarget(MoveModelElementMerger.java:72)
	at org.eclipse.emf.compare.diff.merge.service.MergeService.doMerge(MergeService.java:166)
	at org.eclipse.emf.compare.diff.merge.service.MergeService.merge(MergeService.java:130)
	at org.eclipse.emf.compare.diff.internal.merge.impl.DiffGroupMerger.undoInTarget(DiffGroupMerger.java:48)
	at org.eclipse.emf.compare.diff.merge.service.MergeService.doMerge(MergeService.java:166)
	at org.eclipse.emf.compare.diff.merge.service.MergeService.merge(MergeService.java:130)
	at org.eclipse.emf.compare.diff.internal.merge.impl.DiffGroupMerger.undoInTarget(DiffGroupMerger.java:48)
	at org.eclipse.emf.compare.diff.merge.service.MergeService.doMerge(MergeService.java:166)
	at org.eclipse.emf.compare.diff.merge.service.MergeService.merge(MergeService.java:130)
	at org.eclipse.emf.compare.diff.internal.merge.impl.DiffGroupMerger.undoInTarget(DiffGroupMerger.java:48)
	at org.eclipse.emf.compare.diff.merge.service.MergeService.doMerge(MergeService.java:166)
	at org.eclipse.emf.compare.diff.merge.service.MergeService.merge(MergeService.java:130)
	at org.artop.ecl.emf.compare.ui.actions.BasicAutoMergeAction.doRun(BasicAutoMergeAction.java:309)
	at org.artop.ecl.emf.compare.ui.actions.BasicAutoMergeAction$1.run(BasicAutoMergeAction.java:255)
	at org.artop.ecl.emf.util.WorkspaceTransactionUtil$1.doExecute(WorkspaceTransactionUtil.java:175)
	at org.eclipse.emf.workspace.AbstractEMFOperation.execute(AbstractEMFOperation.java:150)
	at org.eclipse.core.commands.operations.DefaultOperationHistory.execute(DefaultOperationHistory.java:511)
	at org.artop.ecl.emf.util.WorkspaceTransactionUtil.executeInWriteTransaction(WorkspaceTransactionUtil.java:187)
	at org.artop.ecl.emf.util.WorkspaceTransactionUtil.executeInWriteTransaction(WorkspaceTransactionUtil.java:140)
	at org.artop.ecl.emf.compare.ui.actions.BasicAutoMergeAction.executeInIndividualTransaction(BasicAutoMergeAction.java:253)
	at org.artop.ecl.emf.compare.ui.actions.BasicAutoMergeAction.mergeModelElements(BasicAutoMergeAction.java:231)
	at org.artop.ecl.emf.compare.ui.actions.BasicAutoMergeAction.run(BasicAutoMergeAction.java:157)
	at org.eclipse.ui.actions.BaseSelectionListenerAction.runWithEvent(BaseSelectionListenerAction.java:168)
	at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:584)
	at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:501)
	at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:411)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1003)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3910)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3503)
	at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2405)
	at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2369)
	at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2221)
	at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:500)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:493)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:113)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:194)
	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:368)
	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:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:559)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:514)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1311)
	at org.eclipse.equinox.launcher.Main.main(Main.java:1287)



Reproducible: Always
Comment 1 Laurent Goubet CLA 2011-06-15 04:22:09 EDT
I couldn't reproduce this with the current code base. Do you still have the models that caused this or a way to reproduce?
Comment 2 Laurent Goubet CLA 2011-07-20 11:34:13 EDT
Closing as I could not reproduce this issue