I've got some threads doing heavy work while my main thread handles the UI stuff. The threads callback to the main thread at times to update a progress bar.
All in all, it's not that stable. I've fixed problems relating to the logic, but one in particular persists. I've got some code that acts like a stop button, meaning that the thread won't try and renew itself the next time it comes around to check what's going on.
Sometimes, when I press the stop button, I receive this error:
-[NSRunLoop isEnabled]: unrecognized selector sent to instance...
It seems to happen if I hit the stop button towards the end of the thread's work phase. During this time, it doesn't do much except:
- Release some OpenGL memory
- Call a final method on the main thread
- Drain its autorelease pool
- And return
But frankly, the error message is too cryptic for me to even know where to begin. Can anyone shed some light on NSRunLoop, what this 'isEnabled' method might be, or a general stab at what might be going wrong?