java.lang.OutOfMemoryError: Failed to allocate a 1464012 byte allocation with 286292 free bytes and 279KB until OOM


Samebug tips4

Try adding these lines to your manifest: "android:hardwareAccelerated="false"" and "android:largeHeap="true"" as it seems to work for some cases. See also this article about handling bitmaps on android's documentation: https://goo.gl/8LVrzp


6 months ago
Expert tip

The memory is leaking. Try to analyze the HEAP or use LeakCanacy (https://github.com/square/leakcanary) to figure out where is the exact problem.


3 months ago

Solutions on the web622

Solution icon of stackoverflow
via Stack Overflow by GetRealRenz
, 8 months ago
Failed to allocate a 1464012 byte allocation with 286292 free bytes and 279KB until OOM

Solution icon of github
via GitHub by pkirankmr
, 1 year ago
Failed to allocate a 24540476 byte allocation with 6407436 free bytes and 6MB until OOM

Solution icon of github
via GitHub by Nexolight
, 8 months ago
Failed to allocate a 1369452 byte allocation with 840912 free bytes and 821KB until OOM

Solution icon of github
via GitHub by YShein
, 3 weeks ago
Failed to allocate a 2073612 byte allocation with 1133696 free bytes and 1107KB until OOM

Solution icon of github
via GitHub by kientux
, 1 year ago
Failed to allocate a 626707 byte allocation with 216077 free bytes and 211KB until OOM

Solution icon of github
via GitHub by markharding
, 9 months ago
Failed to allocate a 3686412 byte allocation with 518192 free bytes and 506KB until OOM

Solution icon of github
via GitHub by chiahan1123
, 1 year ago
Failed to allocate a 2414892 byte allocation with 616552 free bytes and 602KB until OOM

Solution icon of github
via GitHub by noinlijin
, 1 month ago
Failed to allocate a 4545436 byte allocation with 1625615 free bytes and 1587KB until OOM

Solution icon of github
via GitHub by wakedeer
, 1 year ago
Failed to allocate a 63489036 byte allocation with 16777216 free bytes and 31MB until OOM

Solution icon of github
via GitHub by strubelz
, 11 months ago
Failed to allocate a 8294412 byte allocation with 6008112 free bytes and 5MB until OOM

Stack trace

java.lang.OutOfMemoryError: Failed to allocate a 1464012 byte allocation with 286292 free bytes and 279KB until OOM
	at dalvik.system.VMRuntime.newNonMovableArray(Native Method)
	at android.graphics.BitmapFactory.nativeDecodeStream(Native Method)
	at android.graphics.BitmapFactory.decodeStreamInternal(BitmapFactory.java:634)
	at android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:610)
	at com.nostra13.universalimageloader.core.decode.BaseImageDecoder.decode(BaseImageDecoder.java:83)
	at com.nostra13.universalimageloader.core.LoadAndDisplayImageTask.decodeImage(LoadAndDisplayImageTask.java:265)
	at com.nostra13.universalimageloader.core.LoadAndDisplayImageTask.tryLoadBitmap(LoadAndDisplayImageTask.java:223)
	at com.nostra13.universalimageloader.core.LoadAndDisplayImageTask.run(LoadAndDisplayImageTask.java:136)
	at com.nostra13.universalimageloader.core.ImageLoader.displayImage(ImageLoader.java:297)
	at com.nostra13.universalimageloader.core.ImageLoader.displayImage(ImageLoader.java:209)
	at com.nostra13.universalimageloader.core.ImageLoader.loadImage(ImageLoader.java:528)
	at com.nostra13.universalimageloader.core.ImageLoader.loadImage(ImageLoader.java:489)
	at com.nostra13.universalimageloader.core.ImageLoader.loadImageSync(ImageLoader.java:602)
	at com.nostra13.universalimageloader.core.ImageLoader.loadImageSync(ImageLoader.java:543)
	at com.example.navbartest.Parsers.InitNews.getImage(InitNews.java:58)
	at com.example.navbartest.Parsers.InitNews.<init>(InitNews.java:33)
	at com.example.navbartest.Parsers.InitNews.onLoadMore(InitNews.java:101)
	at com.example.navbartest.Fragments.MoneyFragment$onLoadMore.doInBackground(MoneyFragment.java:76)
	at com.example.navbartest.Fragments.MoneyFragment$onLoadMore.doInBackground(MoneyFragment.java:72)

Write tip

You have a different solution? A short tip here would help you and many other users who saw this issue last week.

Users with the same issue

Samebug visitor profile picture
Unknown user
Once, 2 weeks ago
Samebug visitor profile picture
Unknown user
2 times, 11 months ago
Once, 1 year ago
Once, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
69 more bugmates