On Apr 11, 3:44 pm, HippoMan <hippo.mail...@gmail.com> wrote:
> My android app is getting an "Out of memory" error without a useful
> stack trace. It occurs after I have repeatedly re-invoked its main
> logic through a menu interaction, which leads me to believe that
> there's a memory leak somewhere.
>
> I say that the stack trace isn't useful because it doesn't include
> references to any of my own code. There are no references to my own
> code in the logcat output, either.

The problem with OOMs is that the thread/code fragment that will
trigger the OOM is not necessarily the one that leaked memory. This is
probably what you are observing. It is just "bad luck" that the
Android message loop triggers it as it is trying to allocate memory
that has been used up somewhere else.

> I'm wondering if any of you can help me figure out where my memory
> leak might be occurring, given my stack trace and my logcat output.

Why not create a series of heap dumps over time and analyze their
delta using the Eclipse Memory Analyzer (MAT)? That should point out
where the leak is originating from. You will need to convert the
Dalvik heap dump to Sun's .hprof format before MAT can read it.

Regards,
Thilo

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

To unsubscribe, reply using "remove me" as the subject.

Reply via email to