Fix a crash that may occur when resolving a thread-safe reference#8722
Fix a crash that may occur when resolving a thread-safe reference#8722PoltoraIvana wants to merge 3 commits intorealm:masterfrom
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