1

I'm getting a crash that I can't reproduce. Here's the stack trace:

android.support.v4.app.FragmentManagerImpl.checkStateLoss (FragmentManager.java:1343)
android.support.v4.app.FragmentManagerImpl.popBackStackImmediate (FragmentManager.java:486)
android.support.v4.app.FragmentActivity.onBackPressed (FragmentActivity.java:179)
com.test.radio.RadioPlayer.onBackPressed (RadioPlayer.java:2372)

And here's the relevant code in RadioPlayer.java:

    @Override
    public void onBackPressed() {
        if(isTaskRoot()){
            startActivity(new Intent(this,SplashScreen.class));
            this.finish(); // this is line 2372
        } else {
            super.onBackPressed();
        }
    }

    @Override
    protected void onSaveInstanceState(Bundle outState) {
        outState.putInt("PlayState", currentAction);
        super.onSaveInstanceState(outState);
    }

Any help is appreciated.

codeman
  • 8,868
  • 13
  • 50
  • 79
  • Could that cause it? – codeman Feb 25 '15 at 18:56
  • See [this](http://stackoverflow.com/questions/22713002/java-lang-illegalstateexception-can-not-perform-this-action-after-onsaveinstanc) & [this](http://stackoverflow.com/questions/15391129/any-side-effect-to-solve-can-not-perform-this-action-after-onsaveinstancestate) – Josef Feb 26 '15 at 17:50

0 Answers0