The very same piece of code works properly if I step into each call from beginning to end, but behaves completely differently if I just run the program with no breakpoints. This different behavior ultimately leads to an exit(1) which is used to notify a logical error from which it is not possible to recover.
I believe my program should be working, but due to threading issues which happen at a different speed while running and stepping, the program crashes when running. I'm using Xcode 4.5.2 and I'm writing an OpenGL Game with Automatic Reference Counting. The problem arises in pretty standard C code which I wrote, with no explicit threading calls, just plain procedural C pointer arithmetic.
Why does this happen?