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
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

github-actions bot commented Feb 3, 2026

✅ Generated APK variants!

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

1 participant