StateEditor: breaks on cyclic dependency
What to do:
- Create a state A.
- Create a state B.
- Add A as substate of B.
- Add B as substate of A.
The gui hangs and the mem usage increases (probably an infinite loop).
What to do:
The gui hangs and the mem usage increases (probably an infinite loop).
yeah, this is not easily fixable since a state does not know where it is used.
maybe we can identify the recursion/loop and pass a list of visited states as history. if the current visited state is in the history, we have a cyclic dependency and can abort (+ give the user a message).
The problem is that you could only catch it in the view after it was already inserted into the model.
would it be possible to break the loop after the insertion? After this the editor could undo the operation and display a message. this would stop the editor from dying and the changes since the last save would not be lost. (maybe an autosave feature would be nice, too)
Status changed to closed by commit 924d9a9f
Mentioned in commit 924d9a9f