5

I have trouble with my android project, I did not touch anything and suddenly my app stopped working because of this error. Do you have some idea about what is happening? The error is this:

10-30 22:53:38.246: E/AndroidRuntime(19137): FATAL EXCEPTION: Thread-1210
10-30 22:53:38.246: E/AndroidRuntime(19137): java.lang.OutOfMemoryError
10-30 22:53:38.246: E/AndroidRuntime(19137):    at com.android.volley.toolbox.DiskBasedCache.streamToBytes(DiskBasedCache.java:316)
10-30 22:53:38.246: E/AndroidRuntime(19137):    at com.android.volley.toolbox.DiskBasedCache.readString(DiskBasedCache.java:526)
10-30 22:53:38.246: E/AndroidRuntime(19137):    at com.android.volley.toolbox.DiskBasedCache.readStringStringMap(DiskBasedCache.java:549)
10-30 22:53:38.246: E/AndroidRuntime(19137):    at com.android.volley.toolbox.DiskBasedCache$CacheHeader.readHeader(DiskBasedCache.java:392)
10-30 22:53:38.246: E/AndroidRuntime(19137):    at com.android.volley.toolbox.DiskBasedCache.initialize(DiskBasedCache.java:155)
10-30 22:53:38.246: E/AndroidRuntime(19137):    at    com.android.volley.CacheDispatcher.run(CacheDispatcher.java:85)

please help me!!

4
  • Whatever you have stored on the disk has become too large to fit in the memory at once? Commented Oct 31, 2013 at 2:11
  • Hi jony, Have you got the solution. I am also having same exception. Can you share the solution, please ? Commented Mar 20, 2014 at 11:18
  • Will you please your code here for more understanding? Commented Apr 6, 2015 at 10:18
  • may be this [issue][1] can help you! [1]: stackoverflow.com/questions/24095909/… Commented Apr 7, 2015 at 3:32

4 Answers 4

5

Looks like a fix for this went in June 24th .

Sign up to request clarification or add additional context in comments.

1 Comment

As far as I can see it isn't released yet although it looks like a fix.
3

-If the problem is due to Bitmaps then use

Lazy Imageloader for Bitmaps in listviews

-Make sure you dnt have too much work in its background task.

-And if possible please post your code from where you are getting this issue so we can also learn from it . THanks! :)

1 Comment

I am using UNiversal Image loader for loading images in my feedlist but I am getting at com.android.volley.toolbox.DiskBasedCache.streamToBytes(DiskBasedCache.java:316) error.I am using a viewpager with five fragments.What can be the reason behind this.
2

This thing can be an easy fix for this

just add this line in your application tag in manifest file

android:largeHeap="true"

like this

<application
    android:largeHeap="true"
    android:allowBackup="true"
    ......

Comments

2
+50

you can detect you memory leaks from Memory analyzer in eclipse which is taking much space and optimize your code by that

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.