Community
Participate
Working Groups
Cloned from: 314186: Mismatch between CDO_RESOURCE__RESOURCE_SET and RESOURCE__RESOURCE_SET https://bugs.eclipse.org/bugs/show_bug.cgi?id=314186 I am working on a complex GMF editor for my employer. The editor has been stable for some months now. We have recently begun integrating CDO and have encountered this issue when closing our transactions. From my limited perspective it seems that when the CDO transaction is closed it ends up triggering some resource set changes. Among these changes is an operation that sets the feature "Resource.RESOURCE__RESOURCE_SET" to value "null". That feature id normally has a value of 0. When CDO translates the notification in "BasicEObjectImpl.eDerivedStructuralFeatureID(EStructuralFeature)" it resolves the feature id to "EresourcePackage.CDO_RESOURCE__RESOURCE_SET", which apparently has a value of 3 (there is some math involved in computing it). This causes a notification filter to treat the value as a boolean, which causes an exception that seems to disrupt the closing of the transaction. From what I can see this prevents the transaction from successfully closing, which in turn prevents us from opening any more views in that ResourceSet. !ENTRY org.eclipse.emf.transaction 4 45 2010-05-24 17:31:33.116 !MESSAGE Uncaught exception during post-commit listener notifications !STACK 0 java.lang.IllegalStateException at org.eclipse.emf.common.notify.impl.NotificationImpl.getOldBooleanValue(NotificationImpl.java:883) at org.eclipse.gmf.runtime.emf.core.resources.GMFResourceModificationManager$1.matches(GMFResourceModificationManager.java:130) at org.eclipse.emf.transaction.NotificationFilter$13.matches(NotificationFilter.java:291) at org.eclipse.emf.transaction.impl.FilterManager.selectUnbatched(FilterManager.java:144) at org.eclipse.emf.transaction.impl.TransactionalEditingDomainImpl$2.run(TransactionalEditingDomainImpl.java:822) at org.eclipse.emf.transaction.impl.TransactionalEditingDomainImpl.runExclusive(TransactionalEditingDomainImpl.java:328) at org.eclipse.emf.transaction.impl.TransactionalEditingDomainImpl.broadcastUnbatched(TransactionalEditingDomainImpl.java:818) at org.eclipse.gmf.runtime.diagram.core.DiagramEditingDomainFactory$DiagramEditingDomain.broadcastUnbatched(DiagramEditingDomainFactory.java:159) at org.eclipse.emf.transaction.impl.TransactionChangeRecorder.appendNotification(TransactionChangeRecorder.java:319) at org.eclipse.emf.transaction.impl.TransactionChangeRecorder.processResourceNotification(TransactionChangeRecorder.java:272) at org.eclipse.emf.transaction.impl.TransactionChangeRecorder.notifyChanged(TransactionChangeRecorder.java:238) at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:380) at org.eclipse.emf.ecore.impl.EStructuralFeatureImpl$InternalSettingDelegateSingleData.dynamicSet(EStructuralFeatureImpl.java:2029) at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eDynamicSet(BasicEObjectImpl.java:1137) at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eSet(BasicEObjectImpl.java:1111) at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eSet(BasicEObjectImpl.java:1081) at org.eclipse.emf.cdo.eresource.impl.CDOResourceImpl.setResourceSet(CDOResourceImpl.java:212) at org.eclipse.emf.cdo.eresource.impl.CDOResourceImpl.basicSetResourceSet(CDOResourceImpl.java:843) at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl$ResourcesEList.inverseRemove(ResourceSetImpl.java:595) at org.eclipse.emf.common.notify.impl.NotifyingListImpl.removeAll(NotifyingListImpl.java:951) at org.eclipse.emf.internal.cdo.view.CDOViewSetImpl.remove(CDOViewSetImpl.java:171) at org.eclipse.emf.internal.cdo.session.CDOSessionImpl.viewDetached(CDOSessionImpl.java:429) at org.eclipse.emf.internal.cdo.view.CDOViewImpl.doDeactivate(CDOViewImpl.java:1814) at org.eclipse.emf.internal.cdo.transaction.CDOTransactionImpl.doDeactivate(CDOTransactionImpl.java:1792) at org.eclipse.net4j.util.lifecycle.Lifecycle.deactivate(Lifecycle.java:125) at org.eclipse.net4j.util.lifecycle.LifecycleUtil.deactivate(LifecycleUtil.java:183) at org.eclipse.net4j.util.lifecycle.LifecycleUtil.deactivate(LifecycleUtil.java:173) at org.eclipse.net4j.util.lifecycle.LifecycleUtil.deactivate(LifecycleUtil.java:199) at org.eclipse.emf.internal.cdo.view.CDOViewImpl.close(CDOViewImpl.java:1697)
Created attachment 179058 [details] Patch v2 Since this patch does not break any API or leads to other version problems I suggest to apply it to the maintenance branch.
Committed to HEAD
I think you meant 'Committed to R3_0_maintenance' ;)
You got me ;-)
Moving all open problem reports to 4.0
Undoing accidental version change.
Closing.