java.lang.IllegalArgumentException: Only valid managed objects can be copied from Realm

java.lang.IllegalArgumentException: Only valid managed objects can be copied from Realm.

at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2423)

at enter code hereandroid.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2483)

at android.app.ActivityThread.access$900(ActivityThread.java:153)

at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1349)

at android.os.Handler.dispatchMessage(Handler.java:102)

at android.os.Looper.loop(Looper.java:148)

at android.app.ActivityThread.main(ActivityThread.java:5441)

at java.lang.reflect.Method.invoke(Native Method)

at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:738)

at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:628)

Caused by: java.lang.IllegalArgumentException: Only valid managed objects can be copied from Realm.

at io.realm.Realm.checkValidObjectForDetach(Realm.java:1486)

at io.realm.Realm.copyFromRealm(Realm.java:1201)

at io.realm.Realm.copyFromRealm(Realm.java:1175)

at co.greative.indojekcustomer.mFood.KategoriSelectActivity.onCreate(KategoriSelectActivity.java:108)

at android.app.Activity.performCreate(Activity.java:6303)

at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1108)

at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2376)

... 9 more...

Read More »

By: StackOverFlow - Monday, 12 March

Related Posts

  • Older News
  • Java Realm Out of Range Exception StackOverFlow (4 days ago) - Fatal Exception: java.lang.ArrayIndexOutOfBoundsExceptionOut of range in /Users/cm/Realm/realm-java/realm/realm-library/src/main/cpp/io_realm_internal_OsResults.cpp line 108(requested: 0 valid: 0) io.realm.internal.OsResults.nativeGetRowMainActivity.randomizeEvents (MainActivity.java:1600)...MainActivity$42.run (MainActivity.java:1739)randomizeEvents()public void randomizeEvents() {Realm nrealm;nrealm = Realm.getDefaultInstance();RealmResults eventList = nrealm.where(Event.class).equalTo("theevent", "theevent").findAll();if(eventList.size != 0) {evt = eventList.get(0);...