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

io.realm.RealmResults cannot be cast to io.realm.BaseRealm #25

Closed
simc opened this issue May 12, 2016 · 2 comments
Closed

io.realm.RealmResults cannot be cast to io.realm.BaseRealm #25

simc opened this issue May 12, 2016 · 2 comments
Assignees
Milestone

Comments

@simc
Copy link

simc commented May 12, 2016

Actual Results

The App crashes with the following error:
java.lang.ClassCastException: io.realm.RealmResults cannot be cast to io.realm.BaseRealm
at io.realm.RealmRecyclerViewAdapter$1.onChange(RealmRecyclerViewAdapter.java:54)
at io.realm.RealmResults.notifyChangeListeners(RealmResults.java:1032)
at io.realm.RealmResults.notifyChangeListeners(RealmResults.java:1018)
at io.realm.HandlerController.notifyRealmResultsCallbacks(HandlerController.java:302)
at io.realm.HandlerController.notifySyncRealmResultsCallbacks(HandlerController.java:283)
at io.realm.HandlerController.notifyTypeBasedListeners(HandlerController.java:274)
at io.realm.HandlerController.notifyAllListeners(HandlerController.java:261)
at io.realm.HandlerController.realmChanged(HandlerController.java:384)
at io.realm.HandlerController.handleMessage(HandlerController.java:116)
at android.os.Handler.dispatchMessage(Handler.java:98)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5254)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)

Version of Realm and tooling

Realm version: 0.90.1
Realm Android Adapters: 1.1.0

Which Android version and device: 5.1.1 (emulator)

This happens when I change the displayed datasets from another thread and the recycler is set to auto update...

@cmelchior
Copy link
Contributor

Uhh, that is embarrassing. We will fix that immediately.

@cmelchior
Copy link
Contributor

A fix for this has been released in 1.2.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants