开发者

Bad Access while reading ABAddressBookCopyArrayOfAllPeople

开发者 https://www.devze.com 2022-12-22 09:49 出处:网络
HI all, When I tried to read the record of all peoples from the device as follows: NSArray* allPersons = (NSArray*)ABAddressBookCopyArrayOfAllPeople(addressBook);

HI all,

When I tried to read the record of all peoples from the device as follows:

NSArray* allPersons = (NSArray*)ABAddressBookCopyArrayOfAllPeople(addressBook);

I am getting a bad access. When I tried the same code in the simulator its working .

Stack trace as follows:

#0  0x322aafa8 in sqlite3_backup_init
#1  0x322cb248 in sqlite3_prepare16
#2  0x32287948 in sqlite3_step
#3  0x32e3289c in CPSqliteStatementSendResults
#4  0x32e34cf4 in CPRecordStoreProcessStatementWithPropertyIndices
#5  0x32e34d26 in CPRecordStoreProcessStatement
#6  0x32e36008 in CPRecordStoreProcessQuery
#7  0x32e36064 in CPRecordStoreCopyAllInstancesOfClassWhere
#8  0x32e3608a in CPRecordStoreCopyAllInstancesOfClass
#9  0x33e61f30 in ABCCopyArrayOfAllPeopleInStoreWithSortOrdering
#10 0x33e62020 in ABCCopyArrayOfAllPeople
#11 0x33e6c184 in ABAddressBookCopyArrayOfAllPeople
#12 0x00028308 in -[ContactStore start] at ContactStore.m:192
#13 0x000175e8 in -[StoreManager getState] at StoreManager.m:213
#14 0x00016f40 in -[StoreManager enumerate:] 开发者_JS百科at StoreManager.m:91
#15 0x0001fe7a in -[BackupTask handle] at BackupTask.m:249
#16 0x000238c4 in -[TaskExecuter handleTask:] at TaskExecutor.m:168
#17 0x00023ef2 in -[TaskExecuter run] at TaskExecutor.m:229
#18 0x33f7cacc in -[NSThread main]
#19 0x33f2ad14 in __NSThread__main__
#20 0x327587b8 in _pthread_body

Any help wil be greatly appreciated ...

Best Regards, Mohammed sadiq


did you resolved this issue? Maybe it is because of a addressbook which is not in correct format (f.ex: all labels (firstname-lastname) filled...)

BR,

Stefan

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号