Quote Originally Posted by tsp View Post
Your code seems to be endless loop, your call sequence goes something like:

Maybe because of this you reach some system resource limit (heap/stack) in this recursive function call sequence and that causes your code to crash at the point you mentioned.

I have 8GB RAM in Ubuntu and I reach ~9500 (runcount) after crash, at that point my function call "tree" is 66609 function deep!
It is intended to be ENDLESS. However it is not and I want to find out why.