Hi Google,

My app that has been running for over 2 years without an update, finally 
broke with Jelly Bean.  The error: "Sorry, an error has occurred: bitmap is 
recycled".

The problem was with calling recycle on a bitmap:

Bitmap bitmapOld = bitmap;
bitmap = Bitmap.createScaledBitmap(bitmap, newWidth, newHeight, false);
bitmapOld.recycle();

Note: I never referenced bitmapOld again.

The fix was easy, I just don't recycle any more.  However, it seems odd 
that this would have broken.  Maybe creating the scaled bitmap shares 
memory with the unscaled bitmap?

Anyway, hopefully this information is useful to someone.

Cheers, and keep up the excellent work!

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to