title: All fragments on backstack, have nulls in onSaveInstanceState, after rotation
body: <p>After rotating a device, any fragment we have on the backstack or in the fragmentSupportManager, activates the onSaveInstanceState.</p>
  
  <p>However, after the first rotation, everything inside is null (all variables) and the app crashes with null pointer exceptions.</p>
  
  <p>I'm wondering why if the fragment is virtually destroyed to nothing (all values are null) why the fragment still exists and onSaveInstanceState is being called?</p>
  
  <p>My code is quite deep, with multiple base classes, and presenter classes to lift a lot of the code out of the fragments. I'm also only using one Activity and using fragmentTransaction.replace.</p>
  
  <p>I can add code if people require it, but there's a lot! I'm hoping there is something obvious or something that I don't understand about the way the backstack works/retains it's fragments.</p>
  
  <p>links I have looked at that haven't helped are</p>
  
  <p><a href="https://stackoverflow.com/questions/15621256/will-onsaveinstancestate-be-called-on-fragments-in-the-back-stack">Will onSaveInstanceState be called on fragments in the back stack?</a><br>
  <a href="https://stackoverflow.com/questions/15313598/once-for-all-how-to-correctly-save-instance-state-of-fragments-in-back-stack">Once for all, how to correctly save instance state of Fragments in back stack?</a><br>
  <a href="https://stackoverflow.com/questions/15608709/using-onsaveinstancestate-with-fragments-in-backstack">Using onSaveInstanceState with fragments in backstack?</a><br>
  <a href="https://stackoverflow.com/questions/24411398/backstack-fragments-blank-on-rotation">BackStack Fragments blank on rotation</a><br>
  <a href="https://stackoverflow.com/questions/27062056/save-state-of-fragments-in-backstack?rq=1">Save state of fragments in backstack</a>  </p>