Antennapod: MainActivity.loadFragment(): Can not perform this action after onSaveInstanceState

Created on 11 Oct 2016  路  9Comments  路  Source: AntennaPod/AntennaPod

1.6.1.2

java.lang.IllegalStateException: Can not perform this action after onSaveInstanceState
    at android.support.v4.app.FragmentManagerImpl.checkStateLoss(FragmentManager.java:1493)
    at android.support.v4.app.FragmentManagerImpl.enqueueAction(FragmentManager.java:1511)
    at android.support.v4.app.FragmentManagerImpl.popBackStack(FragmentManager.java:575)
    at de.danoeh.antennapod.activity.MainActivity.loadFragment(MainActivity.java:350)
    at de.danoeh.antennapod.activity.MainActivity.loadFragment(MainActivity.java:320)
    at de.danoeh.antennapod.fragment.ItemlistFragment$3.onPostExecute(ItemlistFragment.java:257)
    at de.danoeh.antennapod.fragment.ItemlistFragment$3.onPostExecute(ItemlistFragment.java:253)
    at android.os.AsyncTask.finish(AsyncTask.java:636)
    at android.os.AsyncTask.access$500(AsyncTask.java:177)
    at android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:653)
    at android.os.Handler.dispatchMessage(Handler.java:102)
    at android.os.Looper.loop(Looper.java:135)
    at android.app.ActivityThread.main(ActivityThread.java:5343)
    at java.lang.reflect.Method.invoke(Native Method)
    at java.lang.reflect.Method.invoke(Method.java:372)
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:905)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:700)
confirmed bug

Most helpful comment

Looking at the stack trace a bit more, I think I know when this happens. It happens when you leave the app while it currently deletes a feed. That code path still uses an AsyncTask instead of RxJava, so it should be rewritten anyway.

All 9 comments

@keunes @ByteHamster this ticket has no way to replicate it, could we close?

I'll leave this one to @ByteHamster for a quick review or closing - maybe there's an obvious error that is easy to find?

I don't know how to reproduce but the crash is still present in 2.0.3 and 2.1.0-RC3. According to Google Play, in the last 30 days, this crash happened 20 times. Happens with different vendors and different Android versions. It's not a major issue (other things crash a lot more often) but it is still a bug.

Any idea how we could figure out how to reproduce? Or will we have to wait until someone pops in that is affected and can provide more details?

Looking at the stack trace a bit more, I think I know when this happens. It happens when you leave the app while it currently deletes a feed. That code path still uses an AsyncTask instead of RxJava, so it should be rewritten anyway.

Looking at the stack trace a bit more, I think I know when this happens. It happens when you leave the app while it currently deletes a feed. That code path still uses an AsyncTask instead of RxJava, so it should be rewritten anyway.

I was able to replicate this based on your instructions, here is a trace

https://gist.github.com/tonytamsf/eab393a46d97829243ebee44f4b081c2

Shouldn't this be closed with #4728 being merged?

I can test #4728 to see if I see this crash log

Shouldn't this be closed with #4728 being merged?

Oh, right. GitHub does not close issues when a PR is merged to any branch except develop :(

I can test #4728 to see if I see this crash log

That would be great :)

Was this page helpful?
0 / 5 - 0 ratings