> I read in this post that I am supposed to have 16Mb available for my
> computer, but when I check the "heap size" it is never > 2.8Mb, and
> yet it still crashes.

Did you make any progress on this? Your description sounds very
similar to what I experience with my own app. My app never uses more
than 4 MB or so, leaks some 50 K per run, yet crashes after just a few
runs (back button - relaunch cycles), unless I kill its process in
between; it also crashes after a few visits to the home screen with
the Home button. I'm not making any progress in tracking down the root
causes. I use BitmapFactory (and the camera) but not the Gallery.

Thanks

On Jan 18, 6:44 pm, gymshoe <[email protected]> wrote:
> I don't think I am doing anything "funky".
> Basically I have a view composed of two pages, one which is visible
> and one which is invisible at any given time. When the visible page is
> clicked, the visible page becomes invisible and the invisible page is
> made visible.
> One page consists of a gallery.  The other page is an ImageView. Each
> time the ImageView is made visible it is updated with a call to:
> ImageView.setImageBitmap(BitmapFactory.decodeFile
> (currentGalleryPicture)).  After about 20 iterations of this, there is
> OOM error.
>
> From your helpful comments, I realize that my OOM error is occurring
> without the debugger attached.  This must relate then to the decodeFile
> () problem more than the Gallery memory leak.  I tried attaching the
> debugger and attempted to get an OOM simply from using gallery, but I
> was not able to get it to crash.  Perhaps my gallery is too small
> (20items, each ~20k).
>
> I read in this post that I am supposed to have 16Mb available for my
> computer, but when I check the "heap size" it is never > 2.8Mb, and
> yet it still crashes.  (The "allocated" is never >2Mb...)   When you
> wrote: "I noticed an immediate continual increase in memory usage ",
> which memory are you referring to: "heap size" or "allocated"?  I
> don't see either of these change except when there is GC, which I can
> identify by the log file, but that doesn't happen very often.  I did
> notice that if I go very slowly toggling my views, then the uncommon
> GC that does occur is adequate to prevent an OOM error.  However, the
> GC certainly isn't doing its job.
>
> Thanks for your comments, Mike, it improved my understanding of the
> issues.
>
> Jim

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to