java.lang.OutOfMemoryError: bitmap size exceeds VM budget

by Matt Kanninen » Thu, 26 Nov 2009 01:37:20 GMT


Sponsored Links
 This:
        private static final int[] glowDrawableIds={
                R.drawable.graphic_microphoneglow_01,
                R.drawable.graphic_microphoneglow_02,
                R.drawable.graphic_microphoneglow_03,
                R.drawable.graphic_microphoneglow_04,
                R.drawable.graphic_microphoneglow_05,
                R.drawable.graphic_microphoneglow_06,
                R.drawable.graphic_microphoneglow_07,
                R.drawable.graphic_microphoneglow_08,
                R.drawable.graphic_microphoneglow_09,
                R.drawable.graphic_microphoneglow_10
        };
...
View glow = findViewById(R.id.glow);
..

glow.setBackgroundResource(glowDrawableIds[scale]);

is causing

11-25 09:21:02.046: WARN/UsageStats(1018): Failed to persist new stats
11-25 09:21:02.694: DEBUG/dalvikvm(2386): GC freed 298 objects / 15656
bytes in 61ms
11-25 09:21:02.952: ERROR/dalvikvm-heap(2386): 1111680-byte external
allocation too large for this process.
11-25 09:21:02.952: ERROR/(2386): VM won't let us allocate 1111680
bytes
11-25 09:21:02.952: DEBUG/AndroidRuntime(2386): Shutting down VM
11-25 09:21:02.952: WARN/dalvikvm(2386): threadid=3: thread exiting
with uncaught exception (group=0x4001b180)
11-25 09:21:02.952: ERROR/AndroidRuntime(2386): Uncaught handler:
thread main exiting due to uncaught exception
11-25 09:21:03.014: ERROR/AndroidRuntime(2386):
java.lang.OutOfMemoryError: bitmap size exceeds VM budget
11-25 09:21:03.014: ERROR/AndroidRuntime(2386):     at
android.graphics.Bitmap.nativeCreate(Native Method)
11-25 09:21:03.014: ERROR/AndroidRuntime(2386):     at
android.graphics.Bitmap.createBitmap(Bitmap.java:468)
11-25 09:21:03.014: ERROR/AndroidRuntime(2386):     at
android.graphics.Bitmap.createBitmap(Bitmap.java:435)
11-25 09:21:03.014: ERROR/AndroidRuntime(2386):     at
android.graphics.Bitmap.createScaledBitmap(Bitmap.java:340)
11-25 09:21:03.014: ERROR/AndroidRuntime(2386):     at
android.graphics.BitmapFactory.finishDecode(BitmapFactory.java:488)
11-25 09:21:03.014: ERROR/AndroidRuntime(2386):     at
android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:462)
11-25 09:21:03.014: ERROR/AndroidRuntime(2386):     at
android.graphics.BitmapFactory.decodeResourceStream(BitmapFactory.java:
323)
11-25 09:21:03.014: ERROR/AndroidRuntime(2386):     at
android.graphics.drawable.Drawable.createFromResourceStream
(Drawable.java:697)
11-25 09:21:03.014: ERROR/AndroidRuntime(2386):     at
android.content.res.Resources.loadDrawable(Resources.java:1705)
11-25 09:21:03.014: ERROR/AndroidRuntime(2386):     at
android.content.res.Resources.getDrawable(Resources.java:580)
11-25 09:21:03.014: ERROR/AndroidRuntime(2386):     at
android.view.View.setBackgroundResource(View.java:7187)

--



java.lang.OutOfMemoryError: bitmap size exceeds VM budget

by Amit » Thu, 17 Jun 2010 15:08:00 GMT


 Hi

java.lang.OutOfMemoryError: bitmap size exceeds VM budget
I am getting this message in my log. As I investigated and found out
while loading contact image this error comes.I checked  size of the
image file and it was normal so came to a conclusion that other
processes filling up the memory and hence at the time this image is
being loaded ,VM running low of memory.

My question is that, is there any tool to figure out which process is
responsible for occupying memory so that we can look into the process
for the exact reason.

Thanks,
Amit

--


Sponsored Links


Other Threads

1. [WTS] Motorola Backflip + Pulsa 3 diskon 20%

As per subject, jual :

1. Motorola Backflip 95% scratchless, eclair + rooted, support apps2sd,
batangan sama charger+kabel data aja. Harga *IDR 2.000.000*
2. Pulsa 3 sistem transfer pulsa diskon 20%, contoh : pulsa IDR 100.000
hanya *IDR 80.000* (berlaku kelipatan, boleh untuk nomor yang berbeda per
IDR 10.000)
stok *IDR 2.500.000* per hari. :D

jika minat, silahkan japri ke : hamdiy.h...@gmail.com


 ------------------------------

"I'm cynical, sarcastic and I have a smartass attitude. It's a natural
defense against drama, bullshit and stupidity. And frankly, I really don't
care if you're the least bit offended by it."

-- 
===============

2. WTHelp : Suhu desire tolongin donk

Suhu saya kan mau S off desire sy pake cara virtual box, udah jalan lancar
semua tp
pada step 3 ga mau jalan lg prosesnya tulisannya cm "waiting for flashing
complate" ( Gambar sy lampirkan )
Dilayar desire tertulis "Normal NAND detected. Non-PVT4.

Pengen sy ulang dr awal lg tp ga berani soalnya kan sy baca peringatannya
klo desirenya dimatiin bs bikin brick desirenya ......

Mohon bantuan dari suhu suhu desire semua  ......Thanks

-- 
===============

3. Mapping Keycodes and Scancodes to generate an Intent.

4. How to save state of check box status

5. How to display ProgressDialog while starting Activity?

6. Keycodes and Scancodes Mapping for Intent

7. The server could not process your apk. Try again.