Simulation hangs

In reply to senthil_m:

if you are calling any task which is completing in zero time( no delay in task)in the forever loop it will be hang.
try to add delay like #1 in the task.