Fixed
Status Update
Comments
[Deleted User] <[Deleted User]> #2
Hi Ed, Thank you so much for these suggestions. I've been reviewing them and merging them in. Hopefully it should be live. I've included a thank you note too in the article.
vi...@google.com <vi...@google.com>
vi...@google.com <vi...@google.com>
il...@google.com <il...@google.com>
ap...@google.com <ap...@google.com> #3
Great! Thanks a lot, I'll look for the live updates soon!
Description
androidX version: androidx.appcompat:appcompat:1.1.0-alpha04
It's not easy to reproduce this bug. But I can show you guys the stack when crash occured:
#main(1)
ComponentActivity.java:288
Caused by:androidx.activity.ComponentActivity.onBackPressed
Can not perform this action after onSaveInstanceState
Fatal Exception:java.lang.IllegalStateException
androidx.activity.ComponentActivity.onBackPressed(ComponentActivity.java:288)
android.app.Activity.onBackPressed(Activity.java:2523)
android.app.FragmentManagerImpl.popBackStackImmediate(FragmentManagerImpl.java:498)
android.app.FragmentManagerImpl.checkStateLoss(FragmentManagerImpl.java:1337)
stack above is the crash point. Focus on the last line, the point where exception was thrown is at checkStateLoss. why this, I found the reason.
link:
Older versions will throw an exception from the framework {@code FragmentManager.popBackStackImmediate}, but the commit above remove these workaround code. you can review the change by the link above or open the picture in the attachment.
I know the code related in 1.1.0 stable version was changed and you guys refactor this already, but I still can not find the workaround code so you guys should check this problem with 1.1.0-alpha04 and newest code both.