Have you set some breakpoints, stepped through your loop, and found the exact part where your app crashes?