android-volley
android-volley copied to clipboard
java.lang.OutOfMemoryErrorDiskBasedCache.java:327
This error happens a lot :
java.lang.OutOfMemoryErrorDiskBasedCache.java:327 Failed to allocate a 538970759 byte allocation with 3641544 free bytes and 85MB until OOM
DiskBasedCache.java:327com.android.volley.toolbox.DiskBasedCache.streamToBytes
DiskBasedCache.java:545com.android.volley.toolbox.DiskBasedCache.readString
DiskBasedCache.java:567com.android.volley.toolbox.DiskBasedCache.readStringStringMap
DiskBasedCache.java:408com.android.volley.toolbox.DiskBasedCache$CacheHeader.readHeader
DiskBasedCache.java:161com.android.volley.toolbox.DiskBasedCache.initialize
CacheDispatcher.java:84com.android.volley.CacheDispatcher.run
same problem
Still occur a lot...
could you guys share the way of implementing the volley
The failed allocation is 500MB. Is this due to a logic error or header corruption?
Same stack trace as #61 and I think both are related to #37
Note that the problem occurs during initialize and no cleanup is triggered when this occurs, so the same exception is likely to occur the next time initialize is called.
This has become a huge issue for our application. We are only initializing a single volley queue and are seeing this during some app startups. The error is unrecoverable and results in the user having to clear data or uninstall the app. Nowhere do we request or a GB of allocation. I am convinced it is another manifestation of a bug reading the header. Any guidance would be greatly appreciated.
Exception java.lang.OutOfMemoryError: Failed to allocate a 1701651079 byte allocation with 4632116 free bytes and 249MB until OOM com.android.volley.toolbox.DiskBasedCache.streamToBytes (DiskBasedCache.java:323) com.android.volley.toolbox.DiskBasedCache.readString (DiskBasedCache.java:541) com.android.volley.toolbox.DiskBasedCache.readStringStringMap (DiskBasedCache.java:563) com.android.volley.toolbox.DiskBasedCache$CacheHeader.readHeader (DiskBasedCache.java:404) com.android.volley.toolbox.DiskBasedCache.initialize (DiskBasedCache.java:157) com.android.volley.CacheDispatcher.run (CacheDispatcher.java:84)
Note that the official Volley repo is now on GitHub at https://github.com/google/volley
I submitted a PR to address this problem: https://github.com/google/volley/pull/13
This issue (https://github.com/google/volley/issues/12) has been fixed in the official Volley repo.