The Update() method in the ProcessScheduler needs to be rewritten. The processes that are active need to be checked Separately from the processes that are already terminated.
Currently everything is being processed in one big switch statement. If any process attaches a child and deletes itself, the iterator updates to incorrect value resulting in a Crash.
The process was being deleted right in the middle of the loop iteration thereby changing list size but it wasn't updating the iterator accordingly, hence causing crash.
The Update() method in the ProcessScheduler needs to be rewritten. The processes that are active need to be checked Separately from the processes that are already terminated.
Currently everything is being processed in one big switch statement. If any process attaches a child and deletes itself, the iterator updates to incorrect value resulting in a Crash.