AToMPM / atompm

A Tool for Multi-Paradigm Modeling
https://atompm.github.io/
GNU Lesser General Public License v3.0
23 stars 15 forks source link

AToMPM crashes when deleting an element which is no longer typed. #23

Open BentleyJOakes opened 6 years ago

BentleyJOakes commented 6 years ago

opened 10 months ago by claudio

Claudio

Consider the following scenario: I create a metamodel, and then I create some model, to try it out. Then I change the metamodel, removing some type X. When I go back to the created model, after reloading the toolbar, if I delete any element of type X, AToMPM crashes hard (I need to restart the server...).

Can AToMPM just tolerate the removal of an untyped element? This is probably due to a failed lookup.

Simon

Ah... language evolution :) Not an easy problem at all (refer to my master thesis for more information). I do understand it's frustrating, but you cannot expect this to be fixed easily. You're welcome to take a look though, there is indeed an infinite loop while trying to execute event handlers in mmmk.js at line 810.

The best solution would be to remove any elements that no longer have a type when loading the element. But again, it's probably not that easy.