realm / realm-android-adapters

Adapters for combining Realm Java with Android UI components and framework classes
realm.io
Apache License 2.0
414 stars 134 forks source link

How can you eliminate this error? #134

Closed vs011 closed 6 years ago

vs011 commented 6 years ago

Fatal Exception: java.lang.IllegalStateException Object is no longer valid to operate on. Was it deleted by another thread?

  io.realm.internal.UncheckedRow.nativeGetString (SourceFile)
  io.realm.internal.UncheckedRow.getString (SourceFile:157)
  io.realm.RealmSpeiseplanMenueRealmProxy.realmGet$menueText (SourceFile:649)
  my.domain.model.RealmSpeiseplanMenue.getMenueText (SourceFile:238)
  my.domain.adapters.MenuAdapter.popupInformation (SourceFile:443)
  my.domain.adapters.MenuAdapter.access$000 (SourceFile:52)
  my.domain.adapters.MenuAdapter$3.onClick (SourceFile:334)
  android.view.View.performClick (View.java:5697)
  com.balysv.materialripple.MaterialRippleLayout$PerformClickEvent.run (SourceFile:648)
  com.balysv.materialripple.MaterialRippleLayout$3.onAnimationEnd (SourceFile:336)
  android.animation.AnimatorSet$AnimatorSetListener.onAnimationEnd (AnimatorSet.java:855)
  com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1120)
cmelchior commented 6 years ago

It probably happened because you are storing a reference to an object that was deleted, but it is hard to tell without seeing the code.

But ideally, these kinds of questions belong on Stack Overflow where there is also a bigger community able to answer your question.