Break on EXC_BAD_ACCESS in Xcode?

后端 未结 10 2165
北恋
北恋 2020-11-27 03:14

I\'m new to iPhone development and Xcode in general and have no idea how to begin troubleshooting an EXC_BAD_ACCESS signal. How can I get Xcode to break at the

10条回答
  •  夕颜
    夕颜 (楼主)
    2020-11-27 03:25

    Xcode/gdb always breaks on EXC_BAD_ACCESS, you just need to work your way up the call stack to find the code that triggered it.

    Note that these kinds of errors often occur with autoreleased objects, meaning that the ultimate cause of the problem won't be in the call stack that triggered EXC_BAD_ACCESS. That's when NSZombieEnabled and NSAutoreleaseFreedObjectCheckEnabled become helpful.

提交回复
热议问题