-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
java.lang.IllegalStateException: Illegal State: Row/Object is no longer valid to operate on. Was it deleted? #1206
Comments
Hi @Rilley If this is not the case. Can you provide some sample code that provoke this error? |
Thank you for your response I will add some code to see public class NamespaceApp extends Application {
Note, I`ve added "!backend.isValid()" I`m calling on First activity launches I make sure to close the realm connection I`m using within the realm connection, And when I The InitBackend class:
} |
Hi @Rilley |
Hi @cmelchior Thank you for you response. I I`ve already updated to the latest realm lib version, and added the checkup isValid, any way I will keep you posted if the error will appear again. I only saw it once on Crashlytics |
Thanks, because from the info you have provided it should work. So we need a reproducible case to be able to debug this further. I will close this issue for now, but feel free to reopen it if some new information surfaces or you are able to reproduce it. |
It happens once in a while. No threads involved. Tough to reproduce as it does not happen in second trial. java.lang.IllegalStateException: Illegal State: Object is no longer valid to operate on. Was it deleted by another thread? |
Answer: The Bad Code:
The Good and Error Free Code: So that was the Solution For This Error, This Was Error, as i was accessing deleted object after deleting it. LOL |
java.lang.IllegalStateException: Object is no longer valid to operate on. Was it deleted by another thread? Application performing deletes action when it's in the background , once the application comes to the foreground it crashes the App. Is there any way to handle this ? |
Hello,
I`m getting
java.lang.IllegalStateException: Illegal State: Row/Object is no longer valid to operate on. Was it deleted?
Info From Crashlytics
Samsung-SM-G850A
Android 5.0.2
HTC ONE X+
Android 4.2.2
I`m using
buzzboxSDK-0.6.5.jar
Raw error:
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.cashdivider.app/com.cashdivider.app.gui.SettingsActivity}: java.lang.IllegalStateException: Illegal State: Row/Object is no longer valid to operate on. Was it deleted?
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2790)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2855)
at android.app.ActivityThread.access$900(ActivityThread.java:181)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1474)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:145)
at android.app.ActivityThread.main(ActivityThread.java:6117)
at java.lang.reflect.Method.invoke(Method.java)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1399)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1194)
Caused by: java.lang.IllegalStateException: Illegal State: Row/Object is no longer valid to operate on. Was it deleted?
at io.realm.internal.Row.nativeIsNullLink(Row.java)
at io.realm.internal.Row.isNullLink(Row.java:156)
at io.realm.BackendRealmProxy.getCurrency(BackendRealmProxy.java:81)
at com.cashdivider.app.gui.fragment.SettingsFragment.init(SettingsFragment.java:249)
at com.cashdivider.app.gui.fragment.SettingsFragment.onCreate(SettingsFragment.java:74)
at android.support.v4.app.Fragment.performCreate(Fragment.java:1766)
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:917)
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1138)
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1120)
at android.support.v4.app.FragmentManagerImpl.dispatchCreate(FragmentManager.java:1924)
at android.support.v4.app.FragmentActivity.onCreate(FragmentActivity.java:268)
at android.support.v7.app.AppCompatActivity.onCreate(AppCompatActivity.java:58)
at com.cashdivider.app.gui.BaseActivity.onCreate(BaseActivity.java:90)
at com.cashdivider.app.gui.SettingsActivity.onCreate(SettingsActivity.java:22)
at android.app.Activity.performCreate(Activity.java:6374)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1119)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2743)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2855)
at android.app.ActivityThread.access$900(ActivityThread.java:181)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1474)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:145)
at android.app.ActivityThread.main(ActivityThread.java:6117)
at java.lang.reflect.Method.invoke(Method.java)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1399)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1194)
The text was updated successfully, but these errors were encountered: