KVO crash when removing observer

private var observation: NSKeyValueObservation?

init() {
       observation = observe(
            \.thumbnailsController.assets,
            options: [.new],
            changeHandler: { [weak self] _, change in
              /// code goes here
              }
        })
}

deinit {
        if let observation = observation {
            removeObserver(observation, forKeyPath: "thumbnailsController.assets")
        }
    }
Cannot remove an observer <_NSKeyValueObservation 0x280565e40> for the key path "thumbnailsController.assets" from  because it is not registered as an observer.
(null)

Removing observer crash in iOS 13 but not on iOS 12. Should I file a bug?

We're seeing the same thing. Have you filed a report?

Seening this too - I guess it's an iOS 13 thing. I will file an bug report.

KVO crash when removing observer
 
 
Q