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

Fix index lookup #3954

Merged
merged 1 commit into from
Sep 30, 2020
Merged

Fix index lookup #3954

merged 1 commit into from
Sep 30, 2020

Conversation

jedelbo
Copy link
Contributor

@jedelbo jedelbo commented Sep 30, 2020

Constructing a ObjKey from a value read in the index went wrong.

FIxes realm/realm-dotnet#2025

Constructing a ObjKey from a value read in the index went wrong.
@jedelbo jedelbo merged commit a327790 into master Sep 30, 2020
@jedelbo jedelbo deleted the je/fix-index-lookup branch September 30, 2020 10:34
@jedelbo jedelbo restored the je/fix-index-lookup branch September 30, 2020 14:49
@hyouuu
Copy link

hyouuu commented Oct 1, 2020

I use RealmSwift on iOS, and when accessing a filtered Results count property e.g. searchResults.count it would crash sometimes with Crashlytics reporting "Key not found", so I think this should fix it - could you confirm and please let me know if it's not. Thanks!

@jedelbo
Copy link
Contributor Author

jedelbo commented Oct 1, 2020

@hyouuu It is hard for me to tell without knowing your specific query, the size of the database and the values you are querying for.

@hyouuu
Copy link

hyouuu commented Oct 1, 2020

@jedelbo one of the crashes' predicate is type ==[c] "calendar" where type is a String property on the realm object; size of the database is about 7000 records

@jedelbo
Copy link
Contributor Author

jedelbo commented Oct 1, 2020

@hyouuu I would say there should be some links involved for you to be affected by this.

@hyouuu
Copy link

hyouuu commented Oct 2, 2020

@jedelbo with the latest version I'm still seeing crash reports regarding Key not found - I did upgrade from 4.3.0 to 5.3.7. Could you check if there could be other causes to the problem? Thanks!

Fatal Exception: RLMException
Key not found
Fatal Exception: RLMException
0 CoreFoundation 0x18ca925ac __exceptionPreprocess
1 libobjc.A.dylib 0x1a0b0c42c objc_exception_throw
2 Pendo 0x1026c2584 RLMThrowResultsError(NSString*)
3 Pendo 0x1026c27f0 -[RLMResults count]
4 Pendo 0x10286ec88 Results.count.getter

@hyouuu
Copy link

hyouuu commented Oct 2, 2020

Would use v10 fix the problem?

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 23, 2024
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 this pull request may close these issues.

Realm.NET SDK 5.01 throws exception when filter returns null
3 participants