If I understand you correctly, then your program is actually in an infinite loop, and will just use up resources until it can't support itself and it crashes. I would either redesign the structure of your program, or make some provision to allow the program to break out of this cycle at a certain point. I recommend the first. If you need some help, post your code.