Trace File is created but empty

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


Sponsored Links
 Hi,

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): iphonegm.viamichelin.com:
212.11.63.74 (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/
com.fontana.Controller.VmBoussole}}
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
entries]
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
entries]
07-23 10:04:46.864: DEBUG/skia(8754): purging 191K from font cache [28
entries]
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/
com.fontana.Controller.VmBoussole}}
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
records
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,
this);

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

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. listview orientation

How to orient listview items horizontal. Thanks
--~--~---------~--~----~------------~-------~--~----~

2. Problem with PNG as xml Background but not in JAVA!

Hi all,
I'm having problems with setting the background image for views in xml
files.

I have a png called mml_background.png in the drawable folder of my
project.

Setting the background as follows in xml:
        android:background="@drawable/mml_background"
gives the error:
ERROR Error: No resource found that matches the given name (at
'background' with value '@drawable/mml_background').    general_list.xml        
/
project/res/layout      line 2  Android AAPT Problem

However, I can use the png OK in java:
Bitmap bmp = BitmapFactory.decodeResource( getResources(),
R.drawable.mml_backgound);

I have several other png icons in the same project that I can use OK
in either the xml or in code!!!

Does anyone have any idea what could be wrong?

Best Regards,
Don
--~--~---------~--~----~------------~-------~--~----~

3. OpenGL ES application on WebView

4. trying to get phone number from BroadcastReceiver

5. How does BaseAdapter communicate with its ListView?

6. How to Call Browser Activity

7. notification of browser