Are you overloading the 'stack' by adding new functions which never exit?
while -> add function which never exits