Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android trace file created but zero bytes long

I am trying to follow the instructions on this page to create a trace file. I can see the file in File Explorer in DDMS and can pull it onto my PC but it is zero bytes long.

Any suggestions as to what I might be doing wrong, please?

like image 984
prepbgg Avatar asked Feb 01 '10 22:02

prepbgg


1 Answers

The problem seems to have been that the stopMethodTracing() call which I had put in the onDestroy() method (as suggested in the Dev Guide) failed to stop the tracing even though I had tried three different means of ending the activity ... rotating the screen, pressing the Home Key and using Taskiller to kill the app.

By moving the stopMethodTracing() elsewhere I now have a trace with data in it!

(The vital clue was that I noticed that LogCat was reporting TRACE STARTED but never reported TRACE STOPPED.)

like image 102
prepbgg Avatar answered Sep 23 '22 18:09

prepbgg