Trace File is created but empty

by qLabs » Thu, 23 Jul 2009 16:39:43 GMT

Sponsored Links

I have a problem with creating a trace file containing logs on my app.
I use Debug.startMethodTracing("tracing");
and in my onDestroy() method i stop the methodTracing.

Everything is going fine, like my file is created on my phone BUT it
is empty, and i don't get why because it worked once and since i can't
get it working.
Here is the log ive got, and it says that it is writting on the file,
so this is acting a bit weird.

07-23 10:04:28.234: INFO/dalvikvm(8754): TRACE STARTED: '/sdcard/
log.trace' 8192KB
07-23 10:04:28.684: DEBUG/SensorManager(8754): found sensor: AK8976A 3-
axis Accelerometer, handle=0
07-23 10:04:28.684: DEBUG/SensorManager(8754): found sensor: AK8976A 3-
axis Magnetic field sensor, handle=1
07-23 10:04:28.694: DEBUG/SensorManager(8754): found sensor: AK8976A
Orientation sensor, handle=2
07-23 10:04:28.694: DEBUG/SensorManager(8754): found sensor: AK8976A
Temperature sensor, handle=3
07-23 10:04:28.774: DEBUG/LocationManager(8754): Constructor: service
= android.location.ilocationmanager$stub$pr...@431d12e8
07-23 10:04:28.784: DEBUG/GpsLocationProvider(64): setMinTime 50000
07-23 10:04:29.974: DEBUG/Sensors(64): sensors=00000005, real=00000005
07-23 10:04:30.014: DEBUG/GpsLocationProvider(64): setMinTime 50000
07-23 10:04:30.134: DEBUG/Provider status changed(8754): gps
07-23 10:04:30.934: DEBUG/GpsLocationProvider(64): TTFF: 2147
07-23 10:04:31.594: DEBUG/InetAddress(8754): (family 2, proto 6)
07-23 10:04:34.844: DEBUG/dalvikvm(8754): GC freed 5381 objects /
289792 bytes in 145ms
07-23 10:04:37.834: WARN/ActivityManager(64): Launch timeout has
expired, giving up wake lock!
07-23 10:04:38.044: WARN/ActivityManager(64): Activity idle timeout
for HistoryRecord{4338ae38 {com.fontana.Controller/
07-23 10:04:40.764: DEBUG/dalvikvm(8754): GC freed 11580 objects /
532992 bytes in 156ms
07-23 10:04:41.604: DEBUG/Provider status changed(8754): gps
07-23 10:04:43.264: DEBUG/Provider status changed(8754): gps
07-23 10:04:43.354: DEBUG/dalvikvm(116): GC freed 975 objects / 44056
bytes in 306ms
07-23 10:04:44.364: DEBUG/skia(8754): purging 195K from font cache [28
07-23 10:04:45.764: DEBUG/dalvikvm(8754): GC freed 9116 objects /
548472 bytes in 156ms
07-23 10:04:45.844: DEBUG/skia(8754): purging 191K from font cache [28
07-23 10:04:46.864: DEBUG/skia(8754): purging 191K from font cache [28
07-23 10:04:47.874: INFO/ActivityManager(64): Displayed activity
com.fontana.Controller/.VmBoussole: 20079 ms
07-23 10:04:48.114: DEBUG/Sensors(64): sensors=00000001, real=00000001
07-23 10:04:48.114: DEBUG/LocationManager(8754): removeUpdates:
listener = com.fontana.controller.vmbouss...@431c8580
07-23 10:04:48.134: WARN/ActivityManager(64): Duplicate finish request
for HistoryRecord{4338ae38 {com.fontana.Controller/
07-23 10:04:48.134: DEBUG/dalvikvm(8754): +++ active profiler count
now 0
07-23 10:04:48.134: INFO/dalvikvm(8754): TRACE STOPPED: writing 821051
07-23 10:04:48.574: INFO/ActivityManager(64): Process
com.fontana.Controller (pid 8754) has died.

Any idee?


Trace File is created but empty

by qLabs » Thu, 23 Jul 2009 17:49:30 GMT

 Alright, so ive succeed recording the file, the problem was i was
running ddms at the same same time and it seems that there is like a
bug when u run it, the prog just dosent write on the file.

So, now that i have the log, here is my problem.

My app is using the GPS, and i register the GPS using the
requestOnLocationUdpate like this
locationManager.requestLocationUpdates(this.provider, 50000, 20,

But i notice in the log that my onLocationChanged method is called way
to many time. I guess this is because im loosing the fix of the GPS
and each time it is refixing it just calls the onLocationUpdates

Is is right, or am I declaring the GPS wrong?

Sponsored Links

Trace File is created but empty

by qLabs » Thu, 23 Jul 2009 20:17:02 GMT

 ok so i found my prob, it dosent come from the GPS fix but from the
time that takes the method Location.distanceTo and Location.bearingTo.
I think ill try to improve the method what u guys did @google :-)

Other Threads

1. What's best way to resume activity and play audio file after spawned thread completes download?

Why don't you simply use thread join wait and notify? Curious...

> solve this would be very much appreciated.

2. Updating a unique AppWidgetProvider from a Service

Here is my issue, I want to be able to update a specific
AppWidgetProvider (home screen widget) from a custom service class.  I
have to build the remote view in the service because I'm also doing
some networking in there, which takes some time.

The problem is that I can't figure out how to update a specific widget
(individual widgets can have different update intervals, using the
alarm manager).

If I wanted to do it from the onUpdate of the AppWidgetProvider I
could just call appWidgetManager.updateAppWidget(appWidgetId,

Does anyone have any experience with this or any suggestions?



3. gphone and RF transceiver

4. Lazy Loading Images in a ListView

5. Display locally stored html webpage using webview

6. VerifyError issue with Android 1.5 devices

7. AudioFlinger write blocked for 103 msecs warnings