javaBin / ems-ios

iOS-app som viser programmet til JavaZone - erstattes fra 2017 med https://github.com/javaBin/appZone
4 stars 0 forks source link

Crash with internal consistency if you delete sessions #104

Open chrissearle opened 10 years ago

chrissearle commented 10 years ago

If you head to the settings / conference list - then choose the active conference then the delete all button (this was added mostly for me but also to give me something to ask users to click if data got corrupt) then when you return to the conference list it has correctly cleared the data - but when you then OK back to the session list - it throws an internal consistency error on the fetched results list.

chrissearle commented 10 years ago

This is the cache on the NSFetchedResultsController on the Settings view.

Right now I'm going to set cacheName nil but as a workaround - not necessarily a fix. Running out of time here.

chrissearle commented 10 years ago

I'm not sure that this screen needs a cache - it's not often used.

chrissearle commented 10 years ago

Going to remove from milestone for now - this is low pri since it runs fine without the cache and is low usage.

ronnienessa commented 10 years ago

I´m not sure if this is related, but found this:

Important: If you are using a cache, you must call deleteCacheWithName: before changing any of the fetch request, its predicate, or its sort descriptors. You must not reuse the same fetched results controller for multiple queries unless you set the cacheName to nil.

chrissearle commented 10 years ago

Yes - that makes sense in fact.

We can either reinstate the cache and add that call - or just not have a cache (the main view doesn't have a cache because user interaction changes the predicate fairly often).

I'm not sure that this view is used enough that it's worth adding the cache back with the extra complexity of handling cache deletion under all correct circumstances. Nor is the list that long.