java.lang.IllegalStateException: Realm access from incorrect thread. Realm objects can only be accessed on the thread they were created.

Stack Overflow | V1 Kr | 7 months ago
tip
Click on the to mark the solution that helps you, Samebug will learn from it.
As a community member, you’ll be rewarded for you help.
  1. 0

    Realm Android exception occured during performFiltering()!

    Stack Overflow | 7 months ago | V1 Kr
    java.lang.IllegalStateException: Realm access from incorrect thread. Realm objects can only be accessed on the thread they were created.
  2. 0

    IllegalStateException: Realm access from incorrect thread. Realm objects can only be accessed on the thread they were created.

    GitHub | 4 months ago | kevivforever
    java.lang.IllegalStateException: Realm access from incorrect thread. Realm objects can only be accessed on the thread they were created.
  3. 0

    GitHub comment 2594#213205105

    GitHub | 11 months ago | DanteAndroid
    java.lang.IllegalStateException: This Realm instance has already been closed, making it unusable.
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.IllegalStateException

      Realm access from incorrect thread. Realm objects can only be accessed on the thread they were created.

      at io.realm.BaseRealm.checkIfValid()
    2. io.realm
      RealmResults.size
      1. io.realm.BaseRealm.checkIfValid(BaseRealm.java:449)
      2. io.realm.RealmResults.isLoaded(RealmResults.java:872)
      3. io.realm.RealmResults.size(RealmResults.java:372)
      3 frames
    3. Java RT
      ArrayList.<init>
      1. java.util.AbstractCollection.toArrayList(AbstractCollection.java:348)
      2. java.util.AbstractCollection.toArray(AbstractCollection.java:339)
      3. java.util.ArrayList.<init>(ArrayList.java:97)
      3 frames
    4. Android Platform
      HandlerThread.run
      1. android.widget.ArrayAdapter$ArrayFilter.performFiltering(ArrayAdapter.java:456)
      2. android.widget.Filter$RequestHandler.handleMessage(Filter.java:234)
      3. android.os.Handler.dispatchMessage(Handler.java:111)
      4. android.os.Looper.loop(Looper.java:194)
      5. android.os.HandlerThread.run(HandlerThread.java:61)
      5 frames