iOS performSelectorOnMainThread problem
I have problem with perf开发者_StackOverflowormSelectorOnMainThread, It receives "EXC_BAD_ACCESS".
Any ideas of what it might be?
Thanks
EXC_BAD_ACCESS is when you access memory that you shouldn't be.
You haven't provided any code, but most likely you are passing a garbage pointer or using an object that has been deallocated.
Try running your program with the environment variable NSZombieEnabled set to YES. That way you will be told if you are invoking methods on a deallocated instance.
Another tip is to run your program in Instruments using the Zombie document template.
So to summarize:
- Set a breakpoint and check that your pointers are what you think they should be.
- Use NSZombieEnabled and Instruments to pinpoint your bad memory access.
- Provide some code here to help troubleshoot the problem.
精彩评论