Bidirectional association causes crash

Issue #473 resolved
Matthias Schoettle created an issue

Steps to reproduce:

  1. Create Aspect with class A and B
  2. Create bidirectional association between classes
  3. Change multiplicity on class A (myAs) to 1..*
  4. Make a selection (e.g., ArrayList) on class A (myAs)
  5. Change multiplicity on class B (myBs) to 1..*

Result:

Visually, the feature selection on myAs disappears. On the console, the following crash occurs:

Caused by: java.lang.NullPointerException
    at ca.mcgill.sel.core.weaver.util.COREWeaverUtil.getResolvedAspectsToString(COREWeaverUtil.java:140)
    at ca.mcgill.sel.core.weaver.util.COREWeaverUtil.createWovenAspectName(COREWeaverUtil.java:112)
    at ca.mcgill.sel.core.weaver.COREWeaver.weaveSelectedFeatures(COREWeaver.java:171)
    at ca.mcgill.sel.core.weaver.COREWeaver.weaveSelectedFeatures(COREWeaver.java:153)
    at ca.mcgill.sel.core.weaver.util.COREWeaverUtil.createWovenAspect(COREWeaverUtil.java:67)
    at ca.mcgill.sel.ram.controller.AssociationController.createFeatureSelection(AssociationController.java:132)

It looks like that when making the first selection, the Association concern is unloaded. Then, when making the second one, and reusing the user selection from the first selection to update the reuse, those selected features were unloaded and are proxies.

I think it would be best to not unload the association concern, since it is used continuously.

Comments (1)

  1. Log in to comment