CoreStore: iOS 10: Sectioned ListMonitor crashing with EXC_BAD_ACCESS
Since upgrading to CoreStore v2.1.0 and Xcode 8 I’m getting a repeatable crash whenever I try to display a view that is backed by a sectioned ListMonitor on the iOS 10 simulator (it’s fine on iOS 9):
If I change the monitor to a non-sectioned list it’s fine.
I’ve tried enabling Zombie Objects but nothing helpful is logged.
Also, why is CoreStore warning me that I’m overwriting a Where clause? Isn’t that the point of refetch() anyway?
I’m at a bit of a loss at how to fix this one, any help would be much appreciated.
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Comments: 44 (21 by maintainers)
Commits related to this issue
- workaround #100 (NSFetchRequest.affectedStores ARC bug) — committed to JohnEstropia/CoreStore by JohnEstropia 8 years ago
- Revert workaround for iOS 10 NSFetchedResultsController (#100) — committed to JohnEstropia/CoreStore by JohnEstropia 5 years ago
Yep, that fixes it. 👍
Oh boy 😅 @a13xb Thanks for testing this out! I’ll try to get a fix up in the next update
My hunch was correct, but I hit a roadblock. First, using @jamesbebbington’s test project, go to CoreStoreFetchRequest.swift and comment out the override for
affectedStoresThis fixed the crash for me. Here’s the problem: doing this breaks CoreStore’s unit tests and demo app. The difference I can think of is that the test project imports CoreStore as a Cocoapod, and CoreStore’s test cases and demo app imports it as a framework. There must be a Cocoapod compiler setting somewhere that somehow fixes the bug that
override var affectedStoreswas trying to fix.I’ll continue investigating this tomorrow, but if you find other hints please do share. In the meantime, you can try commenting out the code above.
I might have a hunch on why this is happening. Let me test for a while
Ok, I think I can reproduce the issue: In
CountriesTableViewControllerchange the monitorSectionedList part to:Crashes every time.