If you stack seems uncontrollable and unstoppable, just hit CTRL+. (Ctrl + full stop) on you keyboard, and it will stop! This is very useful for infinite loops.
Moreover there is the Stop message button on Livecode:
If you're stuck in a modal stack which is firing up the whole time because of a loop , i.e. answer loop then hit CTRL+C on your keyboard repeatedly and the dialogs should stop. On the last dialog there will be no buttons so just exit it with Alt+F4 or Delete system 32.