weave all: ConcurrentModificationException

Issue #2 resolved
Matthias Schoettle created an issue

When a "weave all" is performed, a ConcurrentModificationException is thrown in the Preprocessor. It seems that this does not happen all the time, so it might not be easily reproducible. For example, when weaving StockExchange at the point of "Weaving ParallelExecution into StockExchange" the following stack trace is given:

java.util.ConcurrentModificationException
    at java.util.HashMap$HashIterator.nextEntry(HashMap.java:793)
    at java.util.HashMap$KeyIterator.next(HashMap.java:828)
    at ca.mcgill.sel.ram.weaver.structuralview.PreProcessor.createSkeletonClasses(PreProcessor.java:405)
    at ca.mcgill.sel.ram.weaver.structuralview.StructuralViewWeaver.weave(StructuralViewWeaver.java:91)
    at ca.mcgill.sel.ram.weaver.RAMWeaver.weaveSingle(RAMWeaver.java:201)
    at ca.mcgill.sel.ram.weaver.RAMWeaver.weaveAllTopDown(RAMWeaver.java:112)
    at ca.mcgill.sel.ram.ui.runner.WeaverRunner.run(WeaverRunner.java:86)

Comments (4)

  1. Matthias Schoettle reporter

    It also happens in weaveAllButtomUp as the instantiations are removed once woven. If it is not removed, it happens in updateInstantiationDeclaratives:

    at ca.mcgill.sel.ram.weaver.structuralview.PostProcessor.updateInstantiationDeclaratives(PostProcessor.java:77)
        at ca.mcgill.sel.ram.weaver.structuralview.StructuralViewWeaver.weave(StructuralViewWeaver.java:99)
        at ca.mcgill.sel.ram.weaver.RAMWeaver.weaveSingle(RAMWeaver.java:194)
        at ca.mcgill.sel.ram.weaver.RAMWeaver.weaveAllBottomUp(RAMWeaver.java:170)
    
  2. Wisam Al Abed

    Just pushed a new branch with the fix for this issue looks like i dont get this issue anymore.

  3. Log in to comment