manager: fix TransactionTooLargeException crash on large module install logs#1491
Open
YangQi0408 wants to merge 1 commit into
Open
manager: fix TransactionTooLargeException crash on large module install logs#1491YangQi0408 wants to merge 1 commit into
YangQi0408 wants to merge 1 commit into
Conversation
…ll logs When installing modules that produce large log output (e.g. theme modules with thousands of icons), the install log text state grows unboundedly, causing TransactionTooLargeException when the Activity's saved state Bundle exceeds the Binder transaction limit (~1MB). This was previously reported in bmax121#927 and fixed in cb684e6 by switching from rememberSaveable to remember, but that caused the log to reset on navigation (bmax121#1308). Fix both issues by: - Using rememberSaveable for text state (preserves log on navigation) - Truncating text at runtime to 100K chars when it exceeds the limit - Keeping full log in StringBuilder (remember) for saving to file - Also fixing ExecuteAPMActionScreen which had the same issue The 100K char limit (~100KB) is well below the Binder limit and still covers ~2000-3000 lines of install log output. Closes: bmax121#927
Contributor
Author
|
a module for test |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When installing modules that produce large log output (e.g. theme modules with thousands of icons), the install log text state grows unboundedly, causing TransactionTooLargeException when the Activity's saved state Bundle exceeds the Binder transaction limit (~1MB).
This was previously reported in #927 and fixed in cb684e6 by switching from rememberSaveable to remember, but that caused the log to reset on navigation (#1308).
Fix both issues by:
The 100K char limit (~100KB) is well below the Binder limit and still covers ~2000-3000 lines of install log output.
Closes: #927