android-volley icon indicating copy to clipboard operation
android-volley copied to clipboard

java.lang.OutOfMemoryErrorDiskBasedCache.java:327

Open ben-j69 opened this issue 8 years ago • 8 comments

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

ben-j69 avatar Feb 02 '16 16:02 ben-j69

same problem

crossle avatar Mar 08 '16 04:03 crossle

Still occur a lot...

ben-j69 avatar Apr 25 '16 07:04 ben-j69

could you guys share the way of implementing the volley

ghost avatar Apr 26 '16 01:04 ghost

The failed allocation is 500MB. Is this due to a logic error or header corruption?

joebowbeer avatar Sep 28 '16 07:09 joebowbeer

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.

joebowbeer avatar Oct 04 '16 05:10 joebowbeer

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)

blueyetisoftware-jason avatar Feb 12 '17 17:02 blueyetisoftware-jason

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

joebowbeer avatar Feb 14 '17 01:02 joebowbeer

This issue (https://github.com/google/volley/issues/12) has been fixed in the official Volley repo.

joebowbeer avatar Jul 28 '17 22:07 joebowbeer