in reply to Re^2: Infinite Loop Question
in thread Infinite Loop Question

What is the last message that's printed to LOG?

That might help in finding the call that's causing the script to exit.