-
-
Notifications
You must be signed in to change notification settings - Fork 365
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Crash with overlay shop enabled #5498
Comments
I can confirm (Also Android 14, SC v57.0-beta2) |
Can't reproduce in v56.1, Android 10 (though I'm not sure what is meant by "Touch a shop around you"; in shop overlay, I tapped the plus button, then an existing shop, and then switched to another app) |
Yes, it means tap an existing shop. Here is how it looks to me on Android 14, SC v57.0-beta2: shops_overlay_crush.mp4 |
Thanks for the report! |
It is reproducible with the things overlay, too. So, the old fragment for the newly to be added element is for some reason not removed when it is replaced by the fragment for the clicked element. Not sure, why. The code to show a fragment in the bottom sheet area is in |
Last change regarding the child fragment manager and handling of back stack in that class was made by @tapetis. Pinging him because maybe he has an idea. |
Isn't the problem related to the following line that adds every bottom sheet fragment shown to the back stack, which in turn causes all of them to save their state when the app is moved to the background unless they were popped beforehand from the back stack? StreetComplete/app/src/main/java/de/westnordost/streetcomplete/screens/main/MainFragment.kt Line 955 in 4cc2e2a
It seems like |
Ah, so this issue must have existed for a very long time already... I wonder how the fragment transaction API is supposed to be used when one wants to add or replace a fragment which should be able to be popped. |
The way the |
But shouldn't the old fragment be removed already because of the line above? StreetComplete/app/src/main/java/de/westnordost/streetcomplete/screens/main/MainFragment.kt Line 954 in 4cc2e2a
|
The fragment is removed in the sense that it is no longer displayed in its container. However, it remains in the back stack due to the separate |
I created a pull request with a fix, but I am not sure if this is how it should be done. |
How to Reproduce
Stack trace:
Expected Behavior
App not crashed
Versions affected
Android 14 - v57.0-beta2
The text was updated successfully, but these errors were encountered: