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不存在?)使用的回調方法是否錯誤?
感謝您的幫助, 約翰·約翰