Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android Memory Analysis

Tags:

android

I have to search for memory leaks in an Application at the moment and have a workflow problem. This ( http://android-developers.blogspot.com/2011/03/memory-analysis-for-android.html ) blog post states:

If you're running ADT (which includes a plug-in version of DDMS) and have MAT installed in Eclipse as well, clicking the “dump HPROF” button will automatically do the conversion (using hprof-conv) and open the converted hprof file into Eclipse (which will be opened by MAT).

But wen I press the button within eclipse and try to open the hprof file I get this error - so I still have to do the conversion:

Error opening heap dump 'com.baseapp.foo.hprof'. Check the error log for further details. Error opening heap dump 'com.baseapp.foo.hprof'. Check the error log for further details. Unknown HPROF Version (JAVA PROFILE 1.0.3) (java.io.IOException) Unknown HPROF Version (JAVA PROFILE 1.0.3)

anyone knows what I am doing wrong here? I am using ADT 16

like image 218
ligi Avatar asked Mar 05 '12 10:03

ligi


1 Answers

I had this issue on my setup also, it seems there is a certain series of steps that cause eclipse to default to saving to a file (instead of doing the conversion and opening it).

Anyway to fix it:

Preferences (The global Eclipse ones) -> Android -> DDMS -> HPROF Action -> set to "Open in Eclipse" (Mine was previously on "Save to Disk")

like image 190
smith324 Avatar answered Sep 21 '22 03:09

smith324