I also added a UIBarButtonItem in Storyboard which performs refetch action.
Lastly, in viewWillAppear:
monitor.addObserver(self)
Now, every refetch fails with EXC_BAD_ACCESS:
I didn't try it on iOS10, but on iOS11 works ok.
Originally created by @zalogatomek on GitHub (Nov 8, 2017).
So, I've added simple sectioned monitor to `StackSetupDemoViewController` like this:
```swift
class StackSetupDemoViewController: UITableViewController, ListObserver {
let monitor = Static.facebookStack.monitorSectionedList(From<UserAccount>(), SectionBy("accountType"), OrderBy(.ascending("name")))
@IBAction func refetch() {
monitor.refetch(OrderBy(.ascending("name")))
}
typealias ListEntityType = UserAccount
func listMonitorDidChange(_ monitor: ListMonitor<UserAccount>) {
print("did change")
}
func listMonitorDidRefetch(_ monitor: ListMonitor<UserAccount>) {
print("did refetch")
}
```
I also added a `UIBarButtonItem` in Storyboard which performs `refetch` action.
Lastly, in `viewWillAppear`:
```swift
monitor.addObserver(self)
```
Now, every refetch fails with `EXC_BAD_ACCESS`:

I didn't try it on iOS10, but on iOS11 works ok.
adam
added the fixed label 2025-12-29 15:26:21 +01:00
@zalogatomek Does this still happen if you add a monitor.removeObserver(self) from the observer's deinit?
@JohnEstropia commented on GitHub (Nov 9, 2017):
@zalogatomek Does this still happen if you add a `monitor.removeObserver(self)` from the observer's `deinit`?
@JohnEstropia I'm on master, 4.2.2. I have also checked prototype/Swift_4_0 in some other project.
In my observation: this does not happen when using CoreStoreObject. In particular List Observer Demo uses CoreStoreObject with sectioned ListMonitor, but it works fine on iOS9.
But I can't (at least at the moment) check CoreStoreObject in mentioned project.
@zalogatomek commented on GitHub (Nov 9, 2017):
@JohnEstropia I'm on `master`, `4.2.2`. I have also checked `prototype/Swift_4_0` in some other project.
In my observation: this does not happen when using `CoreStoreObject`. In particular List Observer Demo uses `CoreStoreObject` with sectioned `ListMonitor`, but it works fine on iOS9.
But I can't (at least at the moment) check `CoreStoreObject` in mentioned project.
For reference, this issue also had been haunting the prototype/Swift_4_0 branch. The commit above was also merged there and I have confirmed that the Swift 4 branch is also fixed now.
@JohnEstropia commented on GitHub (Nov 9, 2017):
For reference, this issue also had been haunting the `prototype/Swift_4_0` branch. The commit above was also merged there and I have confirmed that the Swift 4 branch is also fixed now.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Originally created by @zalogatomek on GitHub (Nov 8, 2017).
So, I've added simple sectioned monitor to
StackSetupDemoViewControllerlike this:I also added a
UIBarButtonItemin Storyboard which performsrefetchaction.Lastly, in
viewWillAppear:Now, every refetch fails with
EXC_BAD_ACCESS:I didn't try it on iOS10, but on iOS11 works ok.
@JohnEstropia commented on GitHub (Nov 9, 2017):
@zalogatomek Does this still happen if you add a
monitor.removeObserver(self)from the observer'sdeinit?@zalogatomek commented on GitHub (Nov 9, 2017):
@JohnEstropia Yes, it does.
@JohnEstropia commented on GitHub (Nov 9, 2017):
@zalogatomek Thanks, I'll investigate. Can you tell which CoreStore branch or version you are using?
@zalogatomek commented on GitHub (Nov 9, 2017):
@JohnEstropia I'm on
master,4.2.2. I have also checkedprototype/Swift_4_0in some other project.In my observation: this does not happen when using
CoreStoreObject. In particular List Observer Demo usesCoreStoreObjectwith sectionedListMonitor, but it works fine on iOS9.But I can't (at least at the moment) check
CoreStoreObjectin mentioned project.@JohnEstropia commented on GitHub (Nov 9, 2017):
@zalogatomek Fixed this in the latest
4.2.3version (master). Let me know if it works for you@JohnEstropia commented on GitHub (Nov 9, 2017):
For reference, this issue also had been haunting the
prototype/Swift_4_0branch. The commit above was also merged there and I have confirmed that the Swift 4 branch is also fixed now.@zalogatomek commented on GitHub (Nov 10, 2017):
@JohnEstropia Works great, thanks