title: Failure saving state: active TestFragment{978450f} has cleared index: -1
body: <p>This error occurs when I open an activity from a fragment. App crashes after that activity loaded.</p>
  
  <pre><code>Intent intent = new Intent(getActivity(), TestActivity.class);
  getParentFragment().startActivityForResult(intent, 100);
  </code></pre>
  
  <p>On Going through stack overflow found that this happens while trying fragment transaction where we don't have reference to the correct instance of a fragment. But I haven't done any fragment transaction in that activity. When this error will occur and how to handle it?</p>
  
  <p>Error Log:</p>
  
  <blockquote>
    <p>11-29 10:11:43.786: E/AndroidRuntime(18088):
    java.lang.IllegalStateException: Failure saving state: active
    TestFragment{1fa01248} has cleared index: -1      11-29 10:11:43.786:
    E/AndroidRuntime(18088):  at
    android.support.v4.app.FragmentManagerImpl.saveAllState(FragmentManager.java:1767)
    11-29 10:11:43.786: E/AndroidRuntime(18088):  at
    android.support.v4.app.FragmentActivity.onSaveInstanceState(FragmentActivity.java:527)
    11-29 10:11:43.786: E/AndroidRuntime(18088):  at
    android.app.Activity.performSaveInstanceState(Activity.java:1298)
    11-29 10:11:43.786: E/AndroidRuntime(18088):  at
    android.app.Instrumentation.callActivityOnSaveInstanceState(Instrumentation.java:1288)
    11-29 10:11:43.786: E/AndroidRuntime(18088):  at
    android.app.ActivityThread.callCallActivityOnSaveInstanceState(ActivityThread.java:3958)
    11-29 10:11:43.786: E/AndroidRuntime(18088):  at
    android.app.ActivityThread.performStopActivityInner(ActivityThread.java:3369)
    11-29 10:11:43.786: E/AndroidRuntime(18088):  at
    android.app.ActivityThread.handleStopActivity(ActivityThread.java:3425)
    11-29 10:11:43.786: E/AndroidRuntime(18088):  at
    android.app.ActivityThread.access$1100(ActivityThread.java:151) 11-29
    10:11:43.786: E/AndroidRuntime(18088):    at
    android.app.ActivityThread$H.handleMessage(ActivityThread.java:1327)
    11-29 10:11:43.786: E/AndroidRuntime(18088):  at
    android.os.Handler.dispatchMessage(Handler.java:102) 11-29
    10:11:43.786: E/AndroidRuntime(18088):    at
    android.os.Looper.loop(Looper.java:135) 11-29 10:11:43.786:
    E/AndroidRuntime(18088):  at
    android.app.ActivityThread.main(ActivityThread.java:5254) 11-29
    10:11:43.786: E/AndroidRuntime(18088):    at
    java.lang.reflect.Method.invoke(Native Method) 11-29 10:11:43.786:
    E/AndroidRuntime(18088):  at
    java.lang.reflect.Method.invoke(Method.java:372) 11-29 10:11:43.786:
    E/AndroidRuntime(18088):  at
    com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903)
    11-29 10:11:43.786: E/AndroidRuntime(18088):  at
    com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)</p>
  </blockquote>