I have a Recycler view which opens another fragments with replace. The problem is when I start to open a fragment from the list and press back to fast right after each other at some point the application crashes with the following problem:
E/InputEventSender: Exception dispatching finished signal.
E/MessageQueue-JNI: Exception in MessageQueue callback: handleReceiveCallback
E/MessageQueue-JNI: java.lang.IllegalStateException: Can not perform this action after onSaveInstanceState
at android.support.v4.app.FragmentManagerImpl.checkStateLoss(FragmentManager.java:1527)
at android.support.v4.app.FragmentManagerImpl.enqueueAction(FragmentManager.java:1545)
at android.support.v4.app.FragmentManagerImpl.popBackStack(FragmentManager.java:590)
Sometimes it also says no host and both cases the issue is that the Activity is not available to show the fragments. the Stacktrace which is shown Doesn't have any detailed message about some other issue. And now the question is what's causing the Activity destroy? How to understand this?
I use popBackStackImmediate
method on back button.