Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

namanhams

macrumors regular
Original poster
Jun 3, 2009
153
0
I have a heavy operation that needs access to the Address Book, so i put that operation into a thread. If the thread is still running, and then i push the Home button so that the app enters background, the app will crash. I look into the Crash log and it seems that when the app enters background, it can not access the Address Book anymore since it's a locked file system (i dont know why but it says so).
Here's the message from Crash log

Code:
AppName[5811] was suspended with locked system files: 
/private/var/mobile/Library/AddressBook/AddressBook.sqlitedb

My questions are :

- What's the correct way to do in this case ?

- If i put the operation in the main thread instead of a background thread, then when the app enters background, the operation still runs, and it doesn't crash at all. Why is there such situation ?
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.