-
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
Detect invalid RealmResults #1945
Labels
Comments
beeender
added a commit
that referenced
this issue
Jan 22, 2016
* When the original RealmList is deleted, for most methods of RealmResults should just work without crash by just treat it like an empty RealmResults. * RealmResults.where() throws IllegalStateExecption in this case. * RealmResults.isValid() return false in this case. This is a temp fix, check realm/realm-core#1434 for more details. Close #1945
beeender
added a commit
that referenced
this issue
Jan 22, 2016
* When the original RealmList is deleted, for most methods of RealmResults should just work without crash by just treat it like an empty RealmResults. * RealmResults.where() throws IllegalStateExecption in this case. * RealmResults.isValid() returns false in this case. This is a temp fix, check realm/realm-core#1434 for more details. Close #1945
beeender
added a commit
that referenced
this issue
Jan 25, 2016
* When the original RealmList is deleted, for most methods of RealmResults should just work without crash by just treat it like an empty RealmResults. * RealmResults.where() throws IllegalStateExecption in this case. * RealmResults.isValid() returns false in this case. This is a temp fix, check realm/realm-core#1434 for more details. Close #1945
beeender
added a commit
that referenced
this issue
Jan 25, 2016
* When the original RealmList is deleted, for most methods of RealmResults should just work without crash by just treat it like an empty RealmResults. * RealmResults.where() throws IllegalStateExecption in this case. * RealmResults.isValid() returns false in this case. This is a temp fix, check realm/realm-core#1434 for more details. Close #1945
beeender
added a commit
that referenced
this issue
Jan 25, 2016
* When the original RealmList is deleted, for most methods of RealmResults should just work without crash by just treat it like an empty RealmResults. * RealmResults.where() throws IllegalStateExecption in this case. * RealmResults.isValid() returns false in this case. This is a temp fix, check realm/realm-core#1434 for more details. Close #1945
#2133 fixed this. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
The following code might lead to a native crash:
The reason is that Realm's storage engine doesn't invalidate
dogs
afterowners.clear()
. Once it does, an exception should be thrown atdogs.size()
.See also realm/realm-core#1413
The text was updated successfully, but these errors were encountered: