Closed Zhuinden closed 6 years ago
12-15 21:00:35.497 2524-2524/com.zhuinden.realmbookexample E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.zhuinden.realmbookexample, PID: 2524
java.lang.IllegalStateException: Object is no longer valid to operate on. Was it deleted by another thread?
at io.realm.internal.UncheckedRow.nativeGetString(Native Method)
at io.realm.internal.UncheckedRow.getString(UncheckedRow.java:157)
at io.realm.BookRealmProxy.realmGet$title(BookRealmProxy.java:131)
at com.zhuinden.realmbookexample.data.entity.Book.getTitle(Book.java:33)
at com.zhuinden.realmbookexample.paths.books.BooksAddBookView.bind(BooksAddBookView.java:86)
at com.zhuinden.realmbookexample.paths.books.BooksActivity.showEditBookDialog(BooksActivity.java:134)
at com.zhuinden.realmbookexample.paths.books.BooksPresenter.showEditDialog(BooksPresenter.java:71)
at com.zhuinden.realmbookexample.paths.books.BooksAdapter$BookViewHolder$2.onClick(BooksAdapter.java:105)
Amazingly, it seems to happen if I... uh... delete from the Realm then click quickly.
...I'll just add a validity check before the bind...
Theoretically this should never happen, but apparently it does.
Investigate.