Confused
Confused

Reputation: 3926

iOS5 core data fetch freezes the app

Starting from iOS5, my app started to freeze when using fetchedResultsController. I have attached the debugger result after quitting the simulator.

enter image description here

Any help will be appreciated.

Thanks

Upvotes: 0

Views: 705

Answers (1)

paulbailey
paulbailey

Reputation: 5346

You say in the comments that you're using performSelectorInBackground: to update tableviews. This isn't right, all code affecting the UI should be executed on the main thread.

In addition (and I think this is what's causing the problem) you mustn't reuse a MOC across threads. Each thread must have its own MOC, which can then use the same NSPersistentStoreCoordinator.

You should read Apple's guide on this topic.

Upvotes: 4

Related Questions