Closed johndpope closed 7 years ago
It seems to be reproducible in my code base under obscure edge case in background thread. code below is woven across different classes. In any case - this is the fragility of nsarchiver / threading.
let kFixStatusButtonColorOnCloseButtonPress = NSNotification.Name("kFixStatusButtonColorOnCloseButtonPress")
// Class that is being torn down.
// ClassA.VC
override func viewWillDisappear(_ animated: Bool) {
super.viewWillDisappear(animated)
Notificator.fireNotification(named: kFixStatusButtonColorOnCloseButtonPress)
}
// ClassB.VC
func addObserverForStatusBarFixOnFilterClose(){
NotificationCenter.default.addObserver(self, selector: #selector(resyncStatusBarColor), name: kFixStatusButtonColorOnCloseButtonPress, object: nil)
}
override func resyncStatusBarColor(){
// Logger.verbose("resyncStatusBarColor") <- BOOM
}
this is unrelated to my bug.
I updated a PINCache sample gist here https://gist.github.com/johndpope/1dd3663a8712bb1901536a44bccd6a5a