I have had similar things happen to me but since I use scripts most of the time I always assumed it was me doing something that caused the script to lose track of what it was doing. It can happen when I'm afk, it can happen while I watch a movie and it can happen when I just browse the net. I can't pin-point it down to some special event that cause it to hapen I'm afraid.
Ususally when this happens I try to abort (if it happened while running a script) using my ESC-button and the Stop Now button and see if I can just re-run the script. Mafia just queue up the new scripts after the one that have stopped running. Basicly, it do not properly abort when I try to stop it (and I dunno if there is a command to try to force a clear of the script queue). I have to close mafia completly and restart to make it work again.