BasicEList Error as far back as 4fbd751 (HEAD~12)

Issue #233 resolved
Calem Bendell created an issue

Iteratively going back to make a stable branch, I reached origin master HEAD~12 and still encountered this error when trying to reuse the minueto.core at origin minueto HEAD

I have been unable to rebuild the minueto.core to avoid this error, though I have just rebuilt it from scratch seemingly without error.

java.lang.ArrayStoreException: grl.impl.IntentionalElementRefImpl
    at org.eclipse.emf.common.util.BasicEList.assign(BasicEList.java:118)
    at org.eclipse.emf.ecore.util.EcoreEList.resolve(EcoreEList.java:166)
    at org.eclipse.emf.ecore.util.EObjectWithInverseResolvingEList.resolve(EObjectWithInverseResolvingEList.java:93)
    at org.eclipse.emf.common.util.BasicEList.get(BasicEList.java:348)
    at org.eclipse.emf.common.util.AbstractEList$EIterator.doNext(AbstractEList.java:705)
    at org.eclipse.emf.common.util.AbstractEList$EIterator.next(AbstractEList.java:692)
    at java.util.AbstractCollection.containsAll(Unknown Source)
    at ca.mcgill.sel.core.weaver.COREWeaver.resolveConflicts(COREWeaver.java:113)
    at ca.mcgill.sel.core.weaver.COREWeaver.weaveSelectedFeatures(COREWeaver.java:67)
    at ca.mcgill.sel.core.ui.handler.impl.DisplayConcernSelectSceneHandler.reuse(DisplayConcernSelectSceneHandler.java:67)
    at ca.mcgill.sel.core.ui.scenes.DisplayConcernSelectScene.actionPerformed(DisplayConcernSelectScene.java:292)
    at ca.mcgill.ram.ui.components.RamButton$ButtonHandler.processTapEvent(RamButton.java:50)
    at ca.mcgill.ram.ui.handler.BaseHandler.processGestureEvent(BaseHandler.java:78)
    at ca.mcgill.ram.ui.components.RamButton.processGestureEvent(RamButton.java:193)

Comments (9)

  1. Matthias Schoettle

    Can you first make sure that your core repository is up-to-date?

    You should be able to temporarily fix it by removing the <indicatorGroup .../> tags from the .jucm file.

    We sometimes encounter this problem, but are unsure why it happens. I suspect it is because of different Java versions that the EMF code of the two projects is generated for.

  2. Calem Bendell reporter

    After removing indicator groups, I receive the following error:

    java.lang.ArrayStoreException: fm.impl.OptionalFMLinkImpl
        at org.eclipse.emf.common.util.BasicEList.assign(BasicEList.java:118)
        at org.eclipse.emf.ecore.util.EcoreEList.resolve(EcoreEList.java:166)
        at org.eclipse.emf.ecore.util.EObjectWithInverseResolvingEList.resolve(EObjectWithInverseResolvingEList.java:93)
        at org.eclipse.emf.common.util.BasicEList.get(BasicEList.java:348)
        at org.eclipse.emf.common.util.AbstractEList$EIterator.doNext(AbstractEList.java:705)
        at org.eclipse.emf.common.util.AbstractEList$EIterator.next(AbstractEList.java:692)
        at ca.mcgill.sel.core.weaver.COREWeaver.resolveConflicts(COREWeaver.java:127)
        at ca.mcgill.sel.core.weaver.COREWeaver.weaveSelectedFeatures(COREWeaver.java:67)
    
  3. Matthias Schoettle

    Ah. I finally understand what this exception means. I think the problem is caused by #217, which unfortunately means that your models are a bit messed up. This means that removing the indicator groups is not necessary, fortunately.

    So basically, the feature links to an aspect (via realizedBy), but the aspect does not link back to that same feature (via the opposite realizes). Sometimes the id exists, but it is a different type (in this case an IntentionalElementRefImpl or OptionalFMLinkImpl, which is not the expected type COREFeature).

    In my case I used 769f326 of the minueto branch and when reusing minueto I selected CommonEventQueue and FullScreenApplication. I had to fix the ids in Events and Window and then it worked.

  4. Calem Bendell reporter

    I am having continuing problems after redoing all of the models from scratch and resetting all branches to head. Should this still be an issue or will I need to fix all of the models?

    Am I perhaps doing something wrong when making the models to create this issue?

  5. Matthias Schoettle

    Issue #217 is partially fixed, so now you can do the following:

    1. Open all the .ram models in a text editor and remove the <realizes.../> tags (first children of <ram:Aspect.../>).
    2. In the concern, remove all associations on the features and associate them again.
    3. Save the concern.

    This will now also save all aspects and you should not have any problems anymore.

  6. Log in to comment