-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Realm (7.0.8) crashes when iterates through RealmResults (Key not found) #7174
Comments
The unrolled stack trace is (assuming it is
|
Also, some additional info may be found in issue #7145, which I've reported some time ago from the same app build. |
The stack trace indeed have similarities with #7145, but from the use case it seems a bit different. I am not immediately able to reproduce by iterating the result in a background thread on changes (both insert and deletion) with:
|
Any chance of getting hold of the realm files exhibiting this behavior? |
@rorbech I may have jumped to conclusions and the crash is not so persisted as I thought. One more report from
|
Seems to be another instance of memory mapping problem. Assigning to @finnschiermer |
Hello. |
@sdex. Unfortunately not. We've not been able to reproduce this bug internally yet. We're working on increasing testing as well as improving error detection and reporting, but so far without hitting it. |
This issue is too confusing. The initial report is about a key not found. Then comes a stack trace that is completely unrelated. It is likely two different bugs being discussed here. Since reporting we've shipped fixes both for a KeyNotFound problem and fixes to the memory mapping management, so both bugs could possibly be solved. I'm closing this bug. Feel free to create a new issue if (any of) the problem(s) is still present. |
Goal
Keep a collection as a class field in looper thread and iterate through it periodically.
Actual Results
Crash.
Steps & Code to Reproduce
RealmResults<Item> items
as a field in the android Service class.for (Item item : items)
My best guess is that the collection was being modified at the same moment, however, it had never happened before updating to realm 7.
Version of Realm and tooling
Realm version(s): 7.0.8
Realm Sync feature enabled: No
Android Studio version: 4.0/4.2
Android Build Tools version: 30.0.4
Gradle version: 5.6.1
Which Android version and device(s):
SAMSUNG-SM-T377A 6.0.1,
OnePlus 7 Pro, 10
Crash report from SAMSUNG-SM-T377A 6.0.1:
Crash report from OnePlus 7 Pro, 10:
The text was updated successfully, but these errors were encountered: