-
Notifications
You must be signed in to change notification settings - Fork 25
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
ANR on saveInstanceState #76
Comments
@a-blekot In order to ensure that all the desired saved state gets saved before the OS can kill an app, I've considered some options in the past for what to do about this. The best I've come up with is to support a setting that disables |
@byencho thank you for quick feedback 🙂 I'm new dev in the current project, so I need some time to investigate which part of state must be preserved during configuration changes (or other reason when onSaveInstanceState gets called). Maybe you could give some advice how to identify big state objects) What comes to my mind, is to measure Bundle objects when they are actually going to be saved. And save this info to analyze it later. Mostly we have some simple primitives in our screen's State. I think only String objects could take a lot of space... P.s. I agree that ANR is better than TransactionTooLargeException )) maybe we could handle it with ForegroundService? Or service with notification would not help in this case? |
@a-blekot You can use something like TooLargeTool to try and monitor the data going in the As for the Foreground service idea, that might be tricky. You wouldn't want every app using |
Thanks! I will try this tool tomorrow! Interesting detail is that all ANRs are on Android 12+. Maybe changes to file system restrictions affects saving data by Bridge? |
@a-blekot That is an interesting detail. I'd have to look into that. |
@byencho little update on this ANR collection starts only on Crashlytics SDK version 18.2.4 But in our case we see this ANRs for Android 12+, so maybe it has some connection) |
OK good to know, thanks @a-blekot! |
Hi!
We have ANRs in our Crashlytics. All devices running Android 12 and 13. 66% of them are Samsung devices ))
Could you please help to find the reason of these ANRs )
systid=25492
- it's different in each case. Other parts of stack-trace are the same.we use following code to init Bridge
Where
StateSaver
is interface which is implemented by our FragmentsThe text was updated successfully, but these errors were encountered: