Like many others here I'm getting OutOfMemoryError from BitmapFactory when decoding multiple bitmaps. I am sure I am not leaking memory. Here is the system log from a crash:
I/dalvikvm-heap( 501): Grow heap (frag case) to 8.731MB for 1357499- byte allocation I/ActivityManager( 82): Process com.android.vending (pid 333) has died. D/dalvikvm( 501): GC freed 7 objects / 248 bytes in 164ms D/CameraService( 32): getParameters V/QualcommCameraHardware( 32): getParameters: EX E/Camera ( 501): _getParameters: antibanding=auto;antibanding- values=off,50hz,60hz,auto;effect- values=mono,negative,solarize,pastel,mosaic,resize,sepia,posterize,whiteboard,blackboard,aqua;jpeg- quality=100;jpeg-thumbnail-height=384;jpeg-thumbnail-quality=30;jpeg- thumbnail-width=512;luma-adaptation=0;nightshot-mode=0;picture- format=jpeg;picture-size=2048x1536;preview-format=yuv422sp;preview- frame-rate=15;preview- size=480x320;rotation=0;whitebalance=auto;whitebalance- values=auto,custom,incandescent,fluorescent,daylight,cloudy,twilight,shade D/dalvikvm( 501): GC freed 204 objects / 1415776 bytes in 140ms E/dalvikvm-heap( 501): 778240-byte external allocation too large for this process. E/ ( 501): VM won't let us allocate 778240 bytes D/skia ( 501): xxxxxxxxxxxxxxxxxxxx allocPixelRef failed W/dalvikvm( 501): threadid=15: thread exiting with uncaught exception (group=0x 4000fe68) E/AndroidRuntime( 501): Uncaught handler: thread Thread-8 exiting due to uncaught exception E/AndroidRuntime( 501): java.lang.OutOfMemoryError: bitmap size exceeds VM budget As you can see the heap was just grown to 8.731 MB, which is much less than the 16 MB allowed, and much less than the maximum memory this same program has routinely used -- over 10 MB. Just prior to the failed allocation of 778,240 bytes GC freed 1,415,776 bytes. So there should be plenty of memory available. I am scrupulously recycling bitmaps nulling pointers, etc. Any ideas what's going on, or for a workaround? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---

