Skip to content

Conversation

@jguegel
Copy link

@jguegel jguegel commented Sep 30, 2025

Type of change(s)

  • Bug fix
  • Feature / enhancement
  • Infrastructure / tooling (CI, build, deps, tests)
  • Documentation

What changed and why

  • fix app crash by saving minimalState on rotation

Tests performed

  • tried rotation 20-30 times without crash (more seems to be unrealistic)

Closes the following issue(s)

Checklist

  • I read the contribution guidelines.
  • I manually tested my changes on device/emulator (if applicable).
  • I updated the "Unreleased" section in CHANGELOG.md (if applicable).
  • I have self-reviewed my pull request (no typos, formatting errors, etc.).
  • All checks are passing.

Comment on lines +1410 to +1414

override fun onSaveInstanceState(outState: Bundle) {
val minimalState = Bundle()
super.onSaveInstanceState(minimalState)
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not saving the state will hide the bug, not kill it. Always try to investigate and fix the root cause (e.g., figure out what's making the state so large that it crashes the app)

Copy link
Author

@jguegel jguegel Sep 30, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The root cause is the saving of too many fragments:

  • each fragment ~1256-1448 Bytes
  • total 867.372 Bytes just for the fragments

A TransactionTooLargeException is thrown, because we are above the max 1MB TransactionLimit (together with all other transactions; but the fragments are by far the biggest amount).

Therefore i thought just saving the minimum into it, seemed to be a reasonable solution to at least "postpone" the bug to an unlikely amount of rotations.

@naveensingh naveensingh added the waiting for author If the author does not respond, the issue will be closed. Otherwise, the label will be removed. label Sep 30, 2025
@fossifybot
Copy link
Contributor

fossifybot bot commented Oct 15, 2025

This pull request was automatically closed due to inactivity and/or lack of response from the author. If you have further updates or additional information, please comment or reopen the PR to continue.

@fossifybot fossifybot bot removed the waiting for author If the author does not respond, the issue will be closed. Otherwise, the label will be removed. label Oct 15, 2025
@fossifybot fossifybot bot closed this Oct 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

App crashes after rotating several times

2 participants