Is one of your loops out of control? Add some printlns in the loops to see if any of them are not stopping.