1
我得到一個EXC_BAD_ACCESS
,但XCode沒有指向我一行代碼。相反,它是指向我一個函數頭在.m
文件,即:指向功能標題的EXC_BAD_ACCESS
- (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()
嗯似乎我被一個代表調用,然後釋放給我委託的對象,所以當它返回執行清理代碼時,它不再存在。現在它是有道理的 - 錯誤在於這種方法,因爲它的'self'不再存在,並且它正在向'self'發送消息。 – Claudiu