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

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Solutions on the web

via Stack Overflow by FiN
, 11 months ago
Realm access from incorrect thread. Realm objects can only be accessed on the thread they were created
via Stack Overflow by Nishant Verma
, 8 months ago
This Realm instance has already been closed, making it unusable.
via GitHub by SergeyTrukhachev
, 1 year ago
This Realm instance has already been closed, making it unusable.
via GitHub by zachtom
, 11 months ago
This Realm instance has already been closed, making it unusable.
via GitHub by zaki50
, 11 months ago
This Realm instance has already been closed, making it unusable.
via GitHub by zaki50
, 6 months ago
This Realm instance has already been closed, making it unusable.
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(BaseRealm.java:383)
at io.realm.MaterialDocRealmProxy.realmGet$document_number(MaterialDocRealmProxy.java:126)
at com.my.application.test.Model.MaterialDoc.getDocumentNumber(MaterialDoc.java:29)
at com.my.application.test.Model.MaterialDoc.toString(MaterialDoc.java:42)
at android.widget.ArrayAdapter$ArrayFilter.performFiltering(ArrayAdapter.java:480)
at android.widget.Filter$RequestHandler.handleMessage(Filter.java:234)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:145)
at android.os.HandlerThread.run(HandlerThread.java:61)

Users with the same issue

2 times, 11 months ago
3 times, 1 year ago
2 times, 1 year ago
12 times, 1 year ago
6 times, 1 year ago

Write tip

Know the solutions? Share your knowledge to help other developers to debug faster.