java.lang.IllegalStateException

This Realm instance has already been closed, making it unusable.

Samebug tips0

There are no available Samebug tips for this exception. If you know how to solve this issue, help other users by writing a short tip.

Don't give up yet. Paste your full stack trace to get a solution.

Solutions on the web13299

  • via GitHub by zaki50
    , 7 months ago
    This Realm instance has already been closed, making it unusable.
  • via GitHub by guness
    , 2 months ago
    This Realm instance has already been closed, making it unusable.
  • This Realm instance has already been closed, making it unusable.
  • Stack trace

    • java.lang.IllegalStateException: This Realm instance has already been closed, making it unusable. at io.realm.BaseRealm.checkIfValid(BaseRealm.java:437) at io.realm.RealmResults.isLoaded(RealmResults.java:872) at io.realm.RealmResults.size(RealmResults.java:371) at io.realm.RealmBaseAdapter.getCount(RealmBaseAdapter.java:98) at android.widget.ListView.onMeasure(ListView.java:1155) at android.view.View.measure(View.java:18796) at android.widget.RelativeLayout.measureChildHorizontal(RelativeLayout.java:715) at android.widget.RelativeLayout.onMeasure(RelativeLayout.java:461) at android.view.View.measure(View.java:18796) at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5951) at android.widget.FrameLayout.onMeasure(FrameLayout.java:194) at android.view.View.measure(View.java:18796) at android.widget.RelativeLayout.measureChildHorizontal(RelativeLayout.java:715) at android.widget.RelativeLayout.onMeasure(RelativeLayout.java:461) at android.view.View.measure(View.java:18796) at android.support.v4.widget.DrawerLayout.onMeasure(DrawerLayout.java:1075) at android.view.View.measure(View.java:18796) at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5951) at android.widget.FrameLayout.onMeasure(FrameLayout.java:194) at android.support.v7.widget.ContentFrameLayout.onMeasure(ContentFrameLayout.java:135) at android.view.View.measure(View.java:18796) at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5951) at android.support.v7.widget.ActionBarOverlayLayout.onMeasure(ActionBarOverlayLayout.java:391) at android.view.View.measure(View.java:18796) at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5951) at android.widget.FrameLayout.onMeasure(FrameLayout.java:194) at android.view.View.measure(View.java:18796) at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5951) at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1458) at android.widget.LinearLayout.measureVertical(LinearLayout.java:746) at android.widget.LinearLayout.onMeasure(LinearLayout.java:629) at android.view.View.measure(View.java:18796) at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5951) at android.widget.FrameLayout.onMeasure(FrameLayout.java:194) at com.android.internal.policy.PhoneWindow$DecorView.onMeasure(PhoneWindow.java:2658) at android.view.View.measure(View.java:18796) at android.view.ViewRootImpl.performMeasure(ViewRootImpl.java:2108) at android.view.ViewRootImpl.measureHierarchy(ViewRootImpl.java:1224) at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1460) at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1115) at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:6023) at android.view.Choreographer$CallbackRecord.run(Choreographer.java:858) at android.view.Choreographer.doCallbacks(Choreographer.java:670) at android.view.Choreographer.doFrame(Choreographer.java:606) at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:844) at android.os.Handler.handleCallback(Handler.java:739) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:148) at android.app.ActivityThread.main(ActivityThread.java:5422) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)

    Write tip

    You have a different solution? A short tip here would help you and many other users who saw this issue last week.

    Users with the same issue

    2 times, 6 months ago
    Unknown user
    Once, 1 year ago
    3 times, 1 year ago
    2 times, 1 year ago
    12 times, 1 year ago
    1 more bugmates