enter image description here

What do I do about this? I get no useful info predictably. A search for UnsafeMutablePointer yields

 func scrollViewWillEndDragging(_ scrollView: UIScrollView, withVelocity velocity: CGPoint, targetContentOffset: UnsafeMutablePointer<CGPoint>) {

delegate messages and

private static func bound(_ property: RLMProperty, _ obj: RLMObjectBase) -> UnsafeMutablePointer<LinkingObjects<Element>> {
    return ptr(property, obj).assumingMemoryBound(to: LinkingObjects<Element>.self)
}

in realm. That's it.

Do I hit some Swift runtime shitware paths? Any advice on how to deal with this would be appreciated as I have spent over a day on this manhunt.

UPD manually unrolling ForEach "fixes" the issue

// let baz = Array(zip(data.indices, data))
//            ForEach(baz, id: \.1.id) { index, foo in
            let index = 0
            if let foo = data.first {

reproduces in both Xcode 13.2.1 and 13.3.1

2

There are 2 answers

0
Anton Tropashko On

AFDataResponse was fed with Realm class instead of the Codable struct modelling that incoming instance deserialized from the networking layer and that somehow resulted in this symptom. Gotta love the transparency and resilience of the swift runtime inherited from c++ (that was sarcasm in case you failed to notice)

0
Tom GODDARD On

In my case, I am using Core Data, and in the definition of the PersistenceController, I was initializing the container with the old name. Once I replaced the name with the new name of the Core Data model file, the error went away:

container = NSPersistentContainer(name: "DataTest")

Changed to this:

container = NSPersistentContainer(name: "Core")