1
我正在分析我的应用的崩溃报告。看起来我有CFArrayAppendValue问题。CFArrayAppendValue崩溃:EXC_BREAKPOINT(SIGTRAP)
Exception Type: EXC_BREAKPOINT (SIGTRAP)
Exception Codes: 0x0000000000000001, 0x000000000000defe
Crashed Thread: 0
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0 CoreFoundation 0x330f8268 __CFTypeCollectionRetain
1 CoreFoundation 0x330619ca _CFArrayReplaceValues
2 CoreFoundation 0x330618ba CFArrayAppendValue
我想了解用户如何导致这次崩溃,但它对我来说并不明显。使用的代码非常简单:
CFMutableArrayRef CFgroupMemberMutable = CFArrayCreateMutable (NULL,0,&kCFTypeArrayCallBacks);
for (id key in [dataManager getSpecificGroupMembers:groupID]){
ABRecordRef thisContact = ABAddressBookGetPersonWithRecordID (myAddressBook, [key intValue]);
CFArrayAppendValue (CFgroupMemberMutable,thisContact);
}
是因为我试图追加一个NULL值吗? (ABRecordRef不存在?)使用的回调方法是否错误?
感谢您的帮助, 约翰·约翰