ZipXtract
ZipXtract copied to clipboard
[BUG] Crash: TransactionTooLargeException when Starting Foreground Service
Bug
App crashes when starting compression/extraction if too many files are selected. Cause: ~1.84 MB payload passed via Intent.putExtra() exceeds Android Binder limit (~1 MB).
Steps to Reproduce
- Select a large file set (many files / long paths).
- Tap Compress/Extract.
- App crashes immediately.
Expected
Foreground service should start and run the task without crashing.
Analysis
- Binder transaction = 1,841,280 bytes → exceeds limit.
- Crash at
ContextImpl.startForegroundService(). - Root cause: full file list/metadata passed directly in Intent.
Fix Suggestion
-
Don’t use
putExtra()for large data. -
Instead:
- Save data to a temp file and pass only its path, or
- Store list in an app-wide cache/singleton and pass only a key.
Logcat
See attached log: zipxtract_crash_log_filtered.txt
Snippet:
!!! FAILED BINDER TRANSACTION !!! (parcel size = 1841280)
FATAL EXCEPTION: main
java.lang.RuntimeException: android.os.TransactionTooLargeException: data parcel size 1841280 bytes
at android.app.ContextImpl.startForegroundService(ContextImpl.java:2010)
at x3.v1.onClick(SourceFile:362)
Device
- Device: Mi 11X
- OS: LineageOS 22.2 (MicroG)