-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Fix a crash that may occur when resolving a thread-safe reference #8722
base: master
Are you sure you want to change the base?
Conversation
In some cases, resolveThreadSafeReference: can return nil. Usually it happens in highly-concurrent contexts. This can lead to a crash
Who will review and merge this now that Realm is dead? |
I thought there are some maintainers that are left? |
@tgoyne hi - can we get some community members authorized to merge PRs? Thank you |
Reporting an error here is incorrect. The TSR resolving to nil means that the object was deleted in between |
I believe you can mitigate this crash by putting all writes on the same global actor, per realm file |
that's an option, yes, but for us, we still have realm observations on queue, so we would need to migrate to take advantage of actors. |
Yes, I migrated all my Realm usage to actors to resolve crashing instability issues. I recommend it. |
In some cases, as per documentation, resolveThreadSafeReference can return nil. It usually happens in highly-concurrent contexts. Checking for nil fixes this crash