You have tried to remove a currently executing program or its parents or grandparents, from memory.
Resolution:
Once your program has terminated you need to recode your program to ensure that you do not try to cancel a program (or its
parents or grandparents) while it is still being executed.