CDO ArrayIndexOutOfBoundsException on rollback due to contains optimization in DelegatingEcoreEList. [message #1234128] |
Tue, 21 January 2014 04:48  |
Eclipse User |
|
|
|
Hi all,
I get a ArrayIndexOutOfBoundsException on a CDO rollback during the computation of the knowElementRemovals in ObservableListContentProvider. This happens because on a removeAll a contains call happens to the DelegatingEcoreEList where (as an optimization) the inverse EReference gets used in the contains method. The call to that EObject is not valid anymore, because CDO has already rolled back that Object which yields to a ArrayIndexOutOfBoundsException.
Here the relevant parts of the stack trace:
!ENTRY org.eclipse.core.databinding.observable 4 2 2014-01-21 10:07:27.792
!MESSAGE Problems occurred when invoking code from plug-in: "org.eclipse.core.databinding.observable".
!STACK 0
java.lang.ArrayIndexOutOfBoundsException: 0
at org.eclipse.emf.internal.cdo.CDOObjectImpl$TransientStore.getValue(CDOObjectImpl.java:1376)
at org.eclipse.emf.internal.cdo.CDOObjectImpl$TransientStore.get(CDOObjectImpl.java:1424)
at org.eclipse.emf.internal.cdo.CDOObjectImpl.dynamicGet(CDOObjectImpl.java:595)
at org.eclipse.emf.ecore.impl.EStructuralFeatureImpl$InternalSettingDelegateSingleEObject.dynamicGet(EStructuralFeatureImpl.java:2574)
at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eGet(BasicEObjectImpl.java:1027)
at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eGet(BasicEObjectImpl.java:1011)
at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eGet(BasicEObjectImpl.java:1003)
at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eGet(BasicEObjectImpl.java:998)
at org.eclipse.emf.ecore.util.DelegatingEcoreEList.contains(DelegatingEcoreEList.java:477)
at java.util.Collections$UnmodifiableCollection.contains(Collections.java:1057)
at org.eclipse.core.internal.databinding.property.list.SimplePropertyObservableList.contains(SimplePropertyObservableList.java:131)
at org.eclipse.core.databinding.observable.list.ObservableList.contains(ObservableList.java:78)
at org.eclipse.core.databinding.observable.DecoratingObservableCollection.contains(DecoratingObservableCollection.java:53)
at java.util.AbstractSet.removeAll(AbstractSet.java:176)
at org.eclipse.jface.databinding.viewers.ObservableListContentProvider$Impl.handleListChange(ObservableListContentProvider.java:107)
at org.eclipse.core.databinding.observable.list.ListChangeEvent.dispatch(ListChangeEvent.java:61)
at org.eclipse.core.databinding.observable.ChangeManager.fireEvent(ChangeManager.java:119)
at org.eclipse.core.databinding.observable.list.DecoratingObservableList.fireListChange(DecoratingObservableList.java:59)
at org.eclipse.core.databinding.observable.list.DecoratingObservableList.handleListChange(DecoratingObservableList.java:97)
at org.eclipse.core.databinding.observable.list.DecoratingObservableList$1.handleListChange(DecoratingObservableList.java:71)
at org.eclipse.core.databinding.observable.list.ListChangeEvent.dispatch(ListChangeEvent.java:61)
at org.eclipse.core.databinding.observable.ChangeManager.fireEvent(ChangeManager.java:119)
at org.eclipse.core.databinding.observable.list.ObservableList.fireListChange(ObservableList.java:73)
at org.eclipse.core.internal.databinding.observable.masterdetail.DetailObservableList.access$1(DetailObservableList.java:1)
at org.eclipse.core.internal.databinding.observable.masterdetail.DetailObservableList$1.handleListChange(DetailObservableList.java:48)
at org.eclipse.core.databinding.observable.list.ListChangeEvent.dispatch(ListChangeEvent.java:61)
at org.eclipse.core.databinding.observable.ChangeManager.fireEvent(ChangeManager.java:119)
at org.eclipse.core.databinding.observable.ChangeSupport.fireEvent(ChangeSupport.java:39)
at org.eclipse.core.databinding.observable.list.AbstractObservableList.fireListChange(AbstractObservableList.java:117)
at org.eclipse.core.internal.databinding.property.list.SimplePropertyObservableList.notifyIfChanged(SimplePropertyObservableList.java:567)
at org.eclipse.core.internal.databinding.property.list.SimplePropertyObservableList.access$3(SimplePropertyObservableList.java:559)
at org.eclipse.core.internal.databinding.property.list.SimplePropertyObservableList$2.run(SimplePropertyObservableList.java:78)
at org.eclipse.core.databinding.observable.Realm$1.run(Realm.java:148)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.core.databinding.observable.Realm.safeRun(Realm.java:152)
at org.eclipse.core.databinding.observable.Realm.exec(Realm.java:170)
at org.eclipse.core.internal.databinding.property.list.SimplePropertyObservableList$1.handleEvent(SimplePropertyObservableList.java:74)
at org.eclipse.emf.databinding.internal.EMFPropertyListener$EMFListPropertyListener.notifyChanged(EMFPropertyListener.java:165)
at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:374)
at org.eclipse.emf.common.notify.impl.NotificationChainImpl.dispatch(NotificationChainImpl.java:98)
at org.eclipse.emf.common.notify.impl.NotificationChainImpl.dispatch(NotificationChainImpl.java:86)
at org.eclipse.emf.internal.cdo.transaction.CDOTransactionImpl.handleRollback(CDOTransactionImpl.java:1604)
at org.eclipse.emf.internal.cdo.transaction.CDOSingleTransactionStrategyImpl.rollback(CDOSingleTransactionStrategyImpl.java:115)
at org.eclipse.emf.internal.cdo.transaction.CDOTransactionImpl.rollback(CDOTransactionImpl.java:1230)
To me this seems to be a bug in the contains method of the DelegatingEcoreEList (I use ecore version 2.9.0.v20130528-0742).
Does anyone know how to fix this?
Greetings
Martin
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03222 seconds