Skip to content

fix: prevent TransactionTooLargeException by removing large list save…#6641

Open
Inuth0603 wants to merge 1 commit intocommons-app:mainfrom
Inuth0603:fix/transaction-too-large-exception
Open

fix: prevent TransactionTooLargeException by removing large list save…#6641
Inuth0603 wants to merge 1 commit intocommons-app:mainfrom
Inuth0603:fix/transaction-too-large-exception

Conversation

@Inuth0603
Copy link
Copy Markdown
Contributor

Fixes #6639

What changes did you make and why?

This PR fixes the TransactionTooLargeException crash that occurred when the app was backgrounded and resumed.

Root Cause:
Fragment state (android:support:fragments) was ~530KB, exceeding Android's safe transaction limit. This was caused by saving large lists (uploadMediaDetailAdapter.items) directly into the Bundle in onSaveInstanceState.

Changes:

  • Removed putParcelableArrayList for UPLOAD_MEDIA_DETAILS in UploadMediaDetailFragment.onSaveInstanceState
  • Removed putParcelableArrayList for LIST_OF_DESCRIPTION_AND_CAPTION in DescriptionEditActivity.onSaveInstanceState
  • Updated DescriptionEditActivity to fall back to intent bundle if savedInstanceState doesn't have the list

Trade-off:
On process death (rare), users may need to re-enter description/caption data. This is acceptable compared to a crash.

Tests performed

  • Verified no compile errors
  • Manual testing recommended: background app, kill process, restore from recents

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Feb 3, 2026

✅ Generated APK variants!

@neeldoshii
Copy link
Copy Markdown
Collaborator

@Inuth0603 Thanks for contributing, will review this PR today.

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.

[Bug]: app crash on wakeup

2 participants