chucker
chucker copied to clipboard
OutOfMemoryError: Failed to allocate a 8208 byte allocation with 3418760 free byte
:writing_hand: Describe the bug
Downloading large files (over 150mb) crashes, I'm sure it's Chucker's problem
Exception
Throwing OutOfMemoryError "Failed to allocate a 32 byte allocation with 4673640 free bytes and 4564KB until OOM, target footprint 268435456, growth limit 268435456; failed due to fragmentation (largest possible contiguous allocation 0 bytes). Number of 256KB sized free regions are: 0" (VmSize 6440568 kB, recursive case)
Use
if (BuildConfig.DEBUG) {
addInterceptor(
ChuckerInterceptor.Builder(this@App)
.collector(ChuckerCollector(this@App))
.maxContentLength(250000L)
.redactHeaders(emptySet())
.alwaysReadResponseBody(false)
.build()
)
}
:bomb: Steps to reproduce
- Clone https://github.com/liangjingkanji/Net/tree/debug
- installing - Runing
- Wait for the download to be about 150mb
- Crash
:wrench: Expected behavior
Do not crash when downloading large files
:camera: Screenshots
:iphone: Tech info
- Device: Android Simulator
- OS: Android 13
- Chucker version: 3.5.2
:page_facing_up: Additional context
I've recommended your project to others a long time ago