开发者

iOS performSelectorOnMainThread problem

开发者 https://www.devze.com 2023-03-27 21:41 出处:网络
I have problem with perf开发者_StackOverflowormSelectorOnMainThread, It receives \"EXC_BAD_ACCESS\".

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:

  1. Set a breakpoint and check that your pointers are what you think they should be.
  2. Use NSZombieEnabled and Instruments to pinpoint your bad memory access.
  3. Provide some code here to help troubleshoot the problem.
0

精彩评论

暂无评论...
验证码 换一张
取 消