-
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
Fatal Exception: RLMException "Key not found" when accessing filtered Results #6830
Comments
Seems like the issue realm/realm-dotnet#2025 has been soloved. What you experience here must be a different issue. I would like to know if the |
@jedelbo yes it's indexed: override public class func indexedProperties() -> [String] {
return ["date", "meta", "type", "tags", "repeatRule"]
} |
I assume that you are not able to reproduce this problem in your own test setup, but would you be able to share a sample realm file with some typical data in it so I can get a better idea of what is going on? You can share it privately with me by sending it to [email protected]. |
@jedelbo Unfortunately I don't have access to users' realm file, and haven't been able to repro myself. Will simulate the upgrade path and see if can get a file. Another crash that might be related to this - when searching
In realm/realm-dotnet#2025 @tipa said there're some threading issues - might be related to the above? Is there any way to downgrade to 4.x? Would 10.x help at all? |
I don't think this is a threading issue. Unfortunately we don't have a way of downgrading to 4.x. 10.x would probably have the same issue. The query engine is very much the same. I am rather confident that we can fix this issue. |
Great to hear you're confident on this! Do you also have clue on the above StringNode issue - is that from the same cause? |
The last example you gave also included the |
Do you have a stacktrace of the original error? |
Root cause probably found! |
That's awesome thanks @jedelbo! In the meanwhile I did a try catch block and used manual filtering to mitigate the issue for users, and will try the newer version and report back when I release the next version |
Goals
access filtered results normally
Expected Results
after calling filter on Results, the filtered results should be accessable
Actual Results
accessing any property on the filtered Results would crash the app with exception "Key not found"
Steps for others to Reproduce
e.g. use predicate
type ==[c] "calendar"
wheretype
is aString
property on the realm object, then callsearchResults.count
would cause crash for some users. Note that my app recently updated from Realm 4.3.0 to 5.4.7Version of Realm and Tooling
Realm framework version: 5.4.7
Realm Object Server version: NA
Xcode version: 12.0.1
iOS/OSX version: Both iOS 13 & 14
Dependency manager + version: SPM
There's an issue on .NET which seems to be from the same cause, and one of the participants said the latest version also didn't fix for him: realm/realm-dotnet#2025
This is causing 10% of my users to experience crash and please help find the cause and make a fix asap
The text was updated successfully, but these errors were encountered: