zhanghai / zhanghai/MaterialFiles
TransactionTooLargeException
Nobody has claimed this yet.
- Dominant language
- Kotlin
- Stars
- 9k
- Forks
- 736
- PR merge metrics
- No merged PRs in 30d
Description
Steps to reproduce the issue:
- Have a directory with 5000 images and videos
- Open any of these in the built in image viewer
- Leave the app (Go home, switch app via recent apps etc.)
The app crashes with the error below.
Android version: 15
ROM: LineageOS 22.1-20250207-NIGHTLY-husky
App version: 1.7.4 (F-Droid)
Process: me.zhanghai.android.files, PID: 19064
java.lang.RuntimeException: android.os.TransactionTooLargeException: data parcel size 1273768 bytes
Bundle stats:
androidx.lifecycle.BundlableSavedStateRegistry.key [size=1272740]
android:support:activity-result [size=1176]
android:support:fragments [size=1271188]
fragment_4e0c74f1-10d8-4dc8-a3ad-d0d78fd8d538 [size=1270844]
arguments [size=225420]
me.zhanghai.android.files.viewer.image.ImageViewerFragment$Args [size=225272]
savedInstanceState [size=1044300]
me.zhanghai.android.files.viewer.image.ImageViewerFragment$State [size=1044148]
PersistableBundle stats:
[null]
at android.app.servertransaction.PendingTransactionActions$StopInfo.run(PendingTransactionActions.java:146)
at android.os.Handler.handleCallback(Handler.java:991)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loopOnce(Looper.java:232)
at android.os.Looper.loop(Looper.java:317)
at android.app.ActivityThread.main(ActivityThread.java:8787)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:591)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:871)
Caused by: android.os.TransactionTooLargeException: data parcel size 1273768 bytes
at android.os.BinderProxy.transactNative(Native Method)
at android.os.BinderProxy.transact(BinderProxy.java:586)
at android.app.IActivityClientController$Stub$Proxy.activityStopped(IActivityClientController.java:1498)
at android.app.ActivityClient.activityStopped(ActivityClient.java:100)
at android.app.servertransaction.PendingTransactionActions$StopInfo.run(PendingTransactionActions.java:135)
... 8 more```
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by examining the ImageViewerFragment$Args and ImageViewerFragment$State entries identified in the crash's saved-state bundle, then reproduce the issue with a directory containing about 5,000 images and videos on Android 15. Trace what is retained when the viewer is backgrounded; done means leaving the built-in image viewer no longer causes TransactionTooLargeException.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, kotlin
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100