Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Sirius » ConcurrentModificationException when drop a container to another parent
ConcurrentModificationException when drop a container to another parent [message #1722633] Sun, 07 February 2016 14:07 Go to next message
Stephan Mielke is currently offline Stephan MielkeFriend
Messages: 2
Registered: February 2016
Junior Member
First of all sorry for my bad english. For a university project we need to create graphical editor for a subset of UML class diagrams. In our meta model we have packages that can be in other packages and so on:

https://i.imgur (dot) com/Vbwu6Mb.png

And all work fine...

But we need to support the movement of subpackages, classes and interfaces to other packages. The movement of classes and interfaces work fine.

https://i.imgur (dot) com/xCkpQ4S.png

The set operation is:

Feature Name: classes
Value Expiression:
aql:newSemanticContainer.oclAsType(C_Prototype::Package).classes->including(element)



But if I use this for packages I can only move packages with only subpackages without subpackages. If I move it with subpackages in subpackages I get this exception:
!ENTRY org.eclipse.gmf.runtime.diagram.ui 4 4 2016-02-07 14:15:58.259
!MESSAGE execute
!STACK 0
org.eclipse.core.commands.ExecutionException: While executing the operation, an exception occurred
	at org.eclipse.core.commands.operations.DefaultOperationHistory.execute(DefaultOperationHistory.java:524)
	at org.eclipse.sirius.diagram.ui.tools.internal.editor.DDiagramCommandStack.execute(DDiagramCommandStack.java:71)
	at org.eclipse.sirius.diagram.ui.tools.internal.editor.DDiagramCommandStack.execute(DDiagramCommandStack.java:52)
	at org.eclipse.gmf.runtime.diagram.ui.parts.DiagramCommandStack.execute(DiagramCommandStack.java:156)
	at org.eclipse.gef.tools.AbstractTool.executeCommand(AbstractTool.java:425)
	at org.eclipse.gef.tools.AbstractTool.executeCurrentCommand(AbstractTool.java:438)
	at org.eclipse.gmf.runtime.diagram.ui.tools.DragEditPartsTrackerEx.executeCurrentCommand(DragEditPartsTrackerEx.java:151)
	at org.eclipse.gef.tools.DragEditPartsTracker.performDrag(DragEditPartsTracker.java:496)
	at org.eclipse.gef.tools.DragEditPartsTracker.handleButtonUp(DragEditPartsTracker.java:351)
	at org.eclipse.sirius.diagram.ui.tools.internal.ui.SnapToAllDragEditPartsTracker.handleButtonUp(SnapToAllDragEditPartsTracker.java:101)
	at org.eclipse.gef.tools.AbstractTool.mouseUp(AbstractTool.java:1200)
	at org.eclipse.gef.tools.SelectionTool.mouseUp(SelectionTool.java:574)
	at org.eclipse.gef.EditDomain.mouseUp(EditDomain.java:301)
	at org.eclipse.gef.ui.parts.DomainEventDispatcher.dispatchMouseReleased(DomainEventDispatcher.java:380)
	at org.eclipse.draw2d.LightweightSystem$EventHandler.mouseUp(LightweightSystem.java:548)
	at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:220)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
	at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4230)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1491)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1514)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1499)
	at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1299)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4072)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3698)
	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:483)
	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)
Caused by: java.util.ConcurrentModificationException
	at org.eclipse.emf.common.util.AbstractEList$EIterator.checkModCount(AbstractEList.java:758)
	at org.eclipse.emf.common.util.AbstractEList$EIterator.doNext(AbstractEList.java:706)
	at org.eclipse.emf.common.util.AbstractEList$EIterator.next(AbstractEList.java:692)
	at org.eclipse.sirius.diagram.business.internal.helper.task.DnDTasksOperations.moveSubNodes(DnDTasksOperations.java:298)
	at org.eclipse.sirius.diagram.business.internal.helper.task.DropinForContainerTaskCommand.execute(DropinForContainerTaskCommand.java:103)
	at org.eclipse.sirius.business.api.helper.task.TaskExecutor.execute(TaskExecutor.java:64)
	at org.eclipse.sirius.tools.api.command.SiriusCommand.doExecute(SiriusCommand.java:80)
	at org.eclipse.emf.transaction.RecordingCommand.execute(RecordingCommand.java:135)
	at org.eclipse.emf.common.command.CompoundCommand.execute(CompoundCommand.java:261)
	at org.eclipse.sirius.diagram.ui.tools.api.command.GMFCommandWrapper.doExecuteWithResult(GMFCommandWrapper.java:102)
	at org.eclipse.gmf.runtime.emf.commands.core.command.AbstractTransactionalCommand.doExecute(AbstractTransactionalCommand.java:247)
	at org.eclipse.emf.workspace.AbstractEMFOperation.execute(AbstractEMFOperation.java:150)
	at org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy.execute(ICommandProxy.java:68)
	at org.eclipse.sirius.diagram.ui.graphical.edit.policies.SiriusContainerDropPolicy$1.execute(SiriusContainerDropPolicy.java:260)
	at org.eclipse.gmf.runtime.diagram.ui.commands.CommandProxy.doExecuteWithResult(CommandProxy.java:50)
	at org.eclipse.gmf.runtime.common.core.command.AbstractCommand.execute(AbstractCommand.java:134)
	at org.eclipse.sirius.diagram.ui.tools.internal.commands.WrappingCommandIgnoringAffectedFiles.execute(WrappingCommandIgnoringAffectedFiles.java:124)
	at org.eclipse.core.commands.operations.DefaultOperationHistory.execute(DefaultOperationHistory.java:516)
	... 45 more



https://i.imgur (dot) com/X1WmqXD.png

https://i.imgur (dot) com/Uopkrck.png

We use Sirius 3.1.1.201510291439 and we don't have an idea to fix this issue or what we do wrong.


p.s. Is it a bug or a feature that the first click in a yellow expression textfield in the properties window after focusing another model element copy the content from the textfield above in it and overwrite all -.- it is a bit annoying.

Thanks for your help
Re: ConcurrentModificationException when drop a container to another parent [message #1722805 is a reply to message #1722633] Tue, 09 February 2016 09:44 Go to previous messageGo to next message
Esteban Dugueperoux is currently offline Esteban DugueperouxFriend
Messages: 472
Registered: July 2009
Senior Member
Hi Stephan,

See answers below.

Le 08/02/2016 15:34, Stephan Mielke a écrit :
> First of all sorry for my bad english. For a university project we need
> to create graphical editor for a subset of UML class diagrams. In our
> meta model we have packages that can be in other packages and so on:
>
> https://i.imgur (dot) com/Vbwu6Mb.png
>
> And all work fine...
>
> But we need to support the movement of subpackages, classes and
> interfaces to other packages. The movement of classes and interfaces
> work fine.
>
> https://i.imgur (dot) com/xCkpQ4S.png
>
> The set operation is:
>
> Feature Name: classes Value Expiression:
> aql:newSemanticContainer.oclAsType(C_Prototype::Package).classes->including(element)
>
>

Note that using a Set operation for a multi-valued reference like your
"classes" reference will do a add to the classes reference then you can
write a simpler expression :

aql:element

>
> But if I use this for packages I can only move packages with only
> subpackages without subpackages. If I move it with subpackages in
> subpackages I get this exception:
> !ENTRY org.eclipse.gmf.runtime.diagram.ui 4 4 2016-02-07 14:15:58.259
> !MESSAGE execute
> !STACK 0
> org.eclipse.core.commands.ExecutionException: While executing the
> operation, an exception occurred
> at
> org.eclipse.core.commands.operations.DefaultOperationHistory.execute(DefaultOperationHistory.java:524)
>
> at
> org.eclipse.sirius.diagram.ui.tools.internal.editor.DDiagramCommandStack.execute(DDiagramCommandStack.java:71)
>
> at
> org.eclipse.sirius.diagram.ui.tools.internal.editor.DDiagramCommandStack.execute(DDiagramCommandStack.java:52)
>
> at
> org.eclipse.gmf.runtime.diagram.ui.parts.DiagramCommandStack.execute(DiagramCommandStack.java:156)
>
> at
> org.eclipse.gef.tools.AbstractTool.executeCommand(AbstractTool.java:425)
> at
> org.eclipse.gef.tools.AbstractTool.executeCurrentCommand(AbstractTool.java:438)
>
> at
> org.eclipse.gmf.runtime.diagram.ui.tools.DragEditPartsTrackerEx.executeCurrentCommand(DragEditPartsTrackerEx.java:151)
>
> at
> org.eclipse.gef.tools.DragEditPartsTracker.performDrag(DragEditPartsTracker.java:496)
>
> at
> org.eclipse.gef.tools.DragEditPartsTracker.handleButtonUp(DragEditPartsTracker.java:351)
>
> at
> org.eclipse.sirius.diagram.ui.tools.internal.ui.SnapToAllDragEditPartsTracker.handleButtonUp(SnapToAllDragEditPartsTracker.java:101)
>
> at org.eclipse.gef.tools.AbstractTool.mouseUp(AbstractTool.java:1200)
> at org.eclipse.gef.tools.SelectionTool.mouseUp(SelectionTool.java:574)
> at org.eclipse.gef.EditDomain.mouseUp(EditDomain.java:301)
> at
> org.eclipse.gef.ui.parts.DomainEventDispatcher.dispatchMouseReleased(DomainEventDispatcher.java:380)
>
> at
> org.eclipse.draw2d.LightweightSystem$EventHandler.mouseUp(LightweightSystem.java:548)
>
> at
> org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:220)
> at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
> at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4230)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1491)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1514)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1499)
> at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1299)
> at
> org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4072)
> at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3698)
> 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:483)
> 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)
> Caused by: java.util.ConcurrentModificationException
> at
> org.eclipse.emf.common.util.AbstractEList$EIterator.checkModCount(AbstractEList.java:758)
>
> at
> org.eclipse.emf.common.util.AbstractEList$EIterator.doNext(AbstractEList.java:706)
>
> at
> org.eclipse.emf.common.util.AbstractEList$EIterator.next(AbstractEList.java:692)
>
> at
> org.eclipse.sirius.diagram.business.internal.helper.task.DnDTasksOperations.moveSubNodes(DnDTasksOperations.java:298)
>
> at
> org.eclipse.sirius.diagram.business.internal.helper.task.DropinForContainerTaskCommand.execute(DropinForContainerTaskCommand.java:103)
>
> at
> org.eclipse.sirius.business.api.helper.task.TaskExecutor.execute(TaskExecutor.java:64)
>
> at
> org.eclipse.sirius.tools.api.command.SiriusCommand.doExecute(SiriusCommand.java:80)
>
> at
> org.eclipse.emf.transaction.RecordingCommand.execute(RecordingCommand.java:135)
>
> at
> org.eclipse.emf.common.command.CompoundCommand.execute(CompoundCommand.java:261)
>
> at
> org.eclipse.sirius.diagram.ui.tools.api.command.GMFCommandWrapper.doExecuteWithResult(GMFCommandWrapper.java:102)
>
> at
> org.eclipse.gmf.runtime.emf.commands.core.command.AbstractTransactionalCommand.doExecute(AbstractTransactionalCommand.java:247)
>
> at
> org.eclipse.emf.workspace.AbstractEMFOperation.execute(AbstractEMFOperation.java:150)
>
> at
> org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy.execute(ICommandProxy.java:68)
>
> at
> org.eclipse.sirius.diagram.ui.graphical.edit.policies.SiriusContainerDropPolicy$1.execute(SiriusContainerDropPolicy.java:260)
>
> at
> org.eclipse.gmf.runtime.diagram.ui.commands.CommandProxy.doExecuteWithResult(CommandProxy.java:50)
>
> at
> org.eclipse.gmf.runtime.common.core.command.AbstractCommand.execute(AbstractCommand.java:134)
>
> at
> org.eclipse.sirius.diagram.ui.tools.internal.commands.WrappingCommandIgnoringAffectedFiles.execute(WrappingCommandIgnoringAffectedFiles.java:124)
>
> at
> org.eclipse.core.commands.operations.DefaultOperationHistory.execute(DefaultOperationHistory.java:516)
>
> ... 45 more
>

About this stacktrace, even with an incorrect expression, this should
not occurs then if you have a minimal reproducation case, you can raise
a bugzilla with the scenario and data to reproduce.

>
> https://i.imgur (dot) com/X1WmqXD.png
>
> https://i.imgur (dot) com/Uopkrck.png
>
> We use Sirius 3.1.1.201510291439 and we don't have an idea to fix this
> issue or what we do wrong.
>
> p.s. Is it a bug or a feature that the first click in a yellow
> expression textfield in the properties window after focusing another
> model element copy the content from the textfield above in it and
> overwrite all -.- it is a bit annoying.

I have seen already this bug but only on Mac, have you had this bug on Mac?

>
> Thanks for your help

Best Regards.


--
Esteban Dugueperoux - Obeo

Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
Re: ConcurrentModificationException when drop a container to another parent [message #1722810 is a reply to message #1722805] Tue, 09 February 2016 10:08 Go to previous messageGo to next message
Esteban Dugueperoux is currently offline Esteban DugueperouxFriend
Messages: 472
Registered: July 2009
Senior Member
Le 09/02/2016 10:44, Esteban Dugueperoux a écrit :
> Hi Stephan,
>
> See answers below.
>
> Le 08/02/2016 15:34, Stephan Mielke a écrit :
>> First of all sorry for my bad english. For a university project we need
>> to create graphical editor for a subset of UML class diagrams. In our
>> meta model we have packages that can be in other packages and so on:
>>
>> https://i.imgur (dot) com/Vbwu6Mb.png
>>
>> And all work fine...
>>
>> But we need to support the movement of subpackages, classes and
>> interfaces to other packages. The movement of classes and interfaces
>> work fine.
>>
>> https://i.imgur (dot) com/xCkpQ4S.png
>>
>> The set operation is:
>>
>> Feature Name: classes Value Expiression:
>> aql:newSemanticContainer.oclAsType(C_Prototype::Package).classes->including(element)
>>
>>
>>
>
> Note that using a Set operation for a multi-valued reference like your
> "classes" reference will do a add to the classes reference then you can
> write a simpler expression :
>
> aql:element
>
>>
>> But if I use this for packages I can only move packages with only
>> subpackages without subpackages. If I move it with subpackages in
>> subpackages I get this exception:
>> !ENTRY org.eclipse.gmf.runtime.diagram.ui 4 4 2016-02-07 14:15:58.259
>> !MESSAGE execute
>> !STACK 0
>> org.eclipse.core.commands.ExecutionException: While executing the
>> operation, an exception occurred
>> at
>> org.eclipse.core.commands.operations.DefaultOperationHistory.execute(DefaultOperationHistory.java:524)
>>
>>
>> at
>> org.eclipse.sirius.diagram.ui.tools.internal.editor.DDiagramCommandStack.execute(DDiagramCommandStack.java:71)
>>
>>
>> at
>> org.eclipse.sirius.diagram.ui.tools.internal.editor.DDiagramCommandStack.execute(DDiagramCommandStack.java:52)
>>
>>
>> at
>> org.eclipse.gmf.runtime.diagram.ui.parts.DiagramCommandStack.execute(DiagramCommandStack.java:156)
>>
>>
>> at
>> org.eclipse.gef.tools.AbstractTool.executeCommand(AbstractTool.java:425)
>> at
>> org.eclipse.gef.tools.AbstractTool.executeCurrentCommand(AbstractTool.java:438)
>>
>>
>> at
>> org.eclipse.gmf.runtime.diagram.ui.tools.DragEditPartsTrackerEx.executeCurrentCommand(DragEditPartsTrackerEx.java:151)
>>
>>
>> at
>> org.eclipse.gef.tools.DragEditPartsTracker.performDrag(DragEditPartsTracker.java:496)
>>
>>
>> at
>> org.eclipse.gef.tools.DragEditPartsTracker.handleButtonUp(DragEditPartsTracker.java:351)
>>
>>
>> at
>> org.eclipse.sirius.diagram.ui.tools.internal.ui.SnapToAllDragEditPartsTracker.handleButtonUp(SnapToAllDragEditPartsTracker.java:101)
>>
>>
>> at
>> org.eclipse.gef.tools.AbstractTool.mouseUp(AbstractTool.java:1200)
>> at
>> org.eclipse.gef.tools.SelectionTool.mouseUp(SelectionTool.java:574)
>> at org.eclipse.gef.EditDomain.mouseUp(EditDomain.java:301)
>> at
>> org.eclipse.gef.ui.parts.DomainEventDispatcher.dispatchMouseReleased(DomainEventDispatcher.java:380)
>>
>>
>> at
>> org.eclipse.draw2d.LightweightSystem$EventHandler.mouseUp(LightweightSystem.java:548)
>>
>>
>> at
>> org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:220)
>> at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
>> at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4230)
>> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1491)
>> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1514)
>> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1499)
>> at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1299)
>> at
>> org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4072)
>> at
>> org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3698)
>> 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:483)
>> 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)
>> Caused by: java.util.ConcurrentModificationException
>> at
>> org.eclipse.emf.common.util.AbstractEList$EIterator.checkModCount(AbstractEList.java:758)
>>
>>
>> at
>> org.eclipse.emf.common.util.AbstractEList$EIterator.doNext(AbstractEList.java:706)
>>
>>
>> at
>> org.eclipse.emf.common.util.AbstractEList$EIterator.next(AbstractEList.java:692)
>>
>>
>> at
>> org.eclipse.sirius.diagram.business.internal.helper.task.DnDTasksOperations.moveSubNodes(DnDTasksOperations.java:298)
>>
>>
>> at
>> org.eclipse.sirius.diagram.business.internal.helper.task.DropinForContainerTaskCommand.execute(DropinForContainerTaskCommand.java:103)
>>
>>
>> at
>> org.eclipse.sirius.business.api.helper.task.TaskExecutor.execute(TaskExecutor.java:64)
>>
>>
>> at
>> org.eclipse.sirius.tools.api.command.SiriusCommand.doExecute(SiriusCommand.java:80)
>>
>>
>> at
>> org.eclipse.emf.transaction.RecordingCommand.execute(RecordingCommand.java:135)
>>
>>
>> at
>> org.eclipse.emf.common.command.CompoundCommand.execute(CompoundCommand.java:261)
>>
>>
>> at
>> org.eclipse.sirius.diagram.ui.tools.api.command.GMFCommandWrapper.doExecuteWithResult(GMFCommandWrapper.java:102)
>>
>>
>> at
>> org.eclipse.gmf.runtime.emf.commands.core.command.AbstractTransactionalCommand.doExecute(AbstractTransactionalCommand.java:247)
>>
>>
>> at
>> org.eclipse.emf.workspace.AbstractEMFOperation.execute(AbstractEMFOperation.java:150)
>>
>>
>> at
>> org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy.execute(ICommandProxy.java:68)
>>
>>
>> at
>> org.eclipse.sirius.diagram.ui.graphical.edit.policies.SiriusContainerDropPolicy$1.execute(SiriusContainerDropPolicy.java:260)
>>
>>
>> at
>> org.eclipse.gmf.runtime.diagram.ui.commands.CommandProxy.doExecuteWithResult(CommandProxy.java:50)
>>
>>
>> at
>> org.eclipse.gmf.runtime.common.core.command.AbstractCommand.execute(AbstractCommand.java:134)
>>
>>
>> at
>> org.eclipse.sirius.diagram.ui.tools.internal.commands.WrappingCommandIgnoringAffectedFiles.execute(WrappingCommandIgnoringAffectedFiles.java:124)
>>
>>
>> at
>> org.eclipse.core.commands.operations.DefaultOperationHistory.execute(DefaultOperationHistory.java:516)
>>
>>
>> ... 45 more
>>
>
> About this stacktrace, even with an incorrect expression, this should
> not occurs then if you have a minimal reproducation case, you can raise
> a bugzilla with the scenario and data to reproduce.
>
>>
>> https://i.imgur (dot) com/X1WmqXD.png
>>
>> https://i.imgur (dot) com/Uopkrck.png
>>
>> We use Sirius 3.1.1.201510291439 and we don't have an idea to fix this
>> issue or what we do wrong.
>>
>> p.s. Is it a bug or a feature that the first click in a yellow
>> expression textfield in the properties window after focusing another
>> model element copy the content from the textfield above in it and
>> overwrite all -.- it is a bit annoying.
>
> I have seen already this bug but only on Mac, have you had this bug on Mac?

See Bug 383750 for this Mac specific bug.

>
>>
>> Thanks for your help
>
> Best Regards.
>
>



--
Esteban Dugueperoux - Obeo

Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
Re: ConcurrentModificationException when drop a container to another parent [message #1750481 is a reply to message #1722810] Wed, 21 December 2016 14:24 Go to previous message
Aurelien Didier is currently offline Aurelien DidierFriend
Messages: 13
Registered: April 2015
Junior Member
Hello Esteban and Stephan,

I had the exact same problem with my designer.
It seems that the ConcurrentModificationsException occurs because the list ownedDiagramElementsToDrop is modified during the iteration.

To solve this problem in Sirius DnDTasksOperations.moveSubNodes method, we can just copy the list and iterates on the copy, just like that:

Replace
final EList<DDiagramElement> ownedDiagramElementsToDrop = oldDiagramElementContainer.getOwnedDiagramElements();
By
ArrayList<DDiagramElement> ownedDiagramElementsToDrop = new ArrayList<DDiagramElement>(oldDiagramElementContainer.getOwnedDiagramElements());
for (DDiagramElement diagramElementToDrop : ownedDiagramElementsToDrop ) {
***
}

The problem was that the createDropinForContainerTask command was modifying the ownedDiagramElementsToDrop list, I don't know why this behavior appears only on certain case and works fine for others.
Maybe there are better corrections to do but mine is simple and works fine.
I will fill a bugzilla for this issue.

Regards,

Aurélien
Previous Topic:Restricting referred objects
Next Topic:Sorting leafs inside of Tree diagram
Goto Forum:
  


Current Time: Tue Apr 30 13:34:09 GMT 2024

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

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

Back to the top