Since iPadOS 15.7 was released we are receiving crash logs from customers running iOS 15.7.
The crash occurs after calling mergeChangesFromContextDidSave:
on a private queue NSManagedObjectContext
.
Code as below, the crash occurs on the mergeChanges
line.
We have not seen this crash on earlier iOS releases, which suggests that a (threading?) bug was introduced in Core Data in iOS / iPadOS 15.7.
Four crash logs are attached. Unfortunately symbolication failed using symbolicatecrash
+ Xcode 14.0.1 RC1, but I'm sure Apple's internal symbolication tool will succeed :-)
@objc func mainContextChanged(notification: Notification) {
guard let ctx = notification.object,
ctx as? NSManagedObjectContext != backgroundContext else {
return
}
let ctxt = backgroundContext
ctxt?.perform { [weak ctxt] in
ctxt?.mergeChanges(fromContextDidSave: notification)
}
}