我得到了EXC_BAD_ACCESS,但是XCode并未将我指向代码行。而是将我指向.m文件中的函数标头,即:

-    (void)imagePickerController:(UIImagePickerController *)picker
   didFinishPickingMediaWithInfo:(NSDictionary *)info {

为什么在所有地方?它是否设法弄清楚它应该将对象发送给该类的对象,但是该对象已被释放?

堆栈跟踪的顶部是:
#0  0x02c2a09b in objc_msgSend ()
#1  0x0032face in -[FDTakeController imagePickerController:didFinishPickingMediaWithInfo:] (self=0x1449cbd0, _cmd=0x1cc2439, picker=0x13d6b670, info=0x13de6710) at /Users/csaftoiu/iPhone Dev/Proj/libs/FDTake/FDTakeController.m:239
#2  0x018f3e3e in -[UIImagePickerController _imagePickerDidCompleteWithInfo:] ()
#3  0x14940d11 in PLNotifyImagePickerOfImageAvailability ()

最佳答案

不一定是错误在于方法名称,而在于该方法。您是否在imagePickerController中调用任何方法?如果是这样,通常是由于该项目已不存在而已被设置为nil;

关于ios - 指向函数头的EXC_BAD_ACCESS,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/19458998/

10-12 05:20