Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding an object to a Set, deleting the parent object, and then deleting the previously mentioned object causes crash #5387

Closed
jsflax opened this issue Apr 10, 2022 · 0 comments · Fixed by #5398
Assignees

Comments

@jsflax
Copy link
Contributor

jsflax commented Apr 10, 2022

Crashes with KeyNotFound(util::format("No object with key '%1' in '%2'", k.value, get_owning_table()->get_name())).

Simple repro case (from Swift SDK but I'm sure can be replicated in core):

let realm = try Realm()
let collectionObject = SwiftCollectionSyncObject()
let personObject = SwiftPerson()
try realm.write {
    realm.add(collectionObject)
    realm.add(personObject)
}
try realm.write {
    collectionObject.objectSet.insert(personObject)
}
try realm.write {
    realm.delete(collectionObject)
}
try realm.write {
    realm.delete(personObject)
}

Screenshot 2022-04-10 at 11 46 31

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants