New issue 520 by giovanni...@gmail.com: Battery drain when not in use
http://code.google.com/p/mytracks/issues/detail?id=520
What steps will reproduce the problem?
1. I full charge my phone
2. I don't use MyTracks and I keep GPS off
3. During the following hours, MyTracks is always at the second place
(after the Display and before Cell Standby) in the list of the Battery Use
Screen
What is the expected output? What do you see instead?
When I don't use MyTracks, I don't expect to see it at the top of the list
of applications draining the battery
What version of MyTracks are you using? On what version of Android? On what
phone?
MyTracks 1.1.7 / Android 2.3.4 / Nexus S
If possible please provide a log. Either upload here or send to mytracks-
sup...@google.com.
Detailed instructions can be found here:
http://code.google.com/p/mytracks/wiki/HowToReportErrors
I will send the log by email.
Please provide any additional information here:
Observed behaviour looks very similar to the Google Maps problem described
in the following post:
http://www.google.com/support/forum/p/Google%20Mobile/thread?tid=6bcdbe3c9425039c&hl=en
Comment #1 on issue 520 by rdama...@google.com: Battery drain when not in
use
http://code.google.com/p/mytracks/issues/detail?id=520
(No comment was entered for this change.)
I did another experiment:
1. disabled gps
2. disabled "use wireless network" in "location & secutiry settings"
3. fully charged the phone
4. never opened MyTracks
5. after 3 hours, I took another log (I will send it by email)
Results:
- MyTracks is the third application in terms of energy consumption, (after
Display and Phone Calls)
- MyTracks does not appear in the log
Bye
Gio
I don't really understand this issue. I checked the log but I did not see
any suspicious. Contrary to what you wrote I see My Tracks being launched
many times which would explain why it consumed battery.
I have also been experiencing this issue.
I previously had no issues with my phone. I have a Droid X running Android
2.3.3.
I installed MyTracks last Wednesday (7/20/11) and was amazed by its
functionality. It is a great application, and I want to continue using it.
However, starting that same day, my phone began restarting on its own (I'm
going to open another ticket for this). In the following 5 days, my phone
restarted on average 8 times per day by itself, possibly more that I didn't
notice. In addition, my battery discharged FAR faster than before. So much
faster that even when plugged into an outlet, if I had wireless tethering
enabled, my phone would die in a matter of hours.
I realized that the issue was probably MyTracks, since the problems began
right after installing it. Yesterday (7/25) I uninstalled MyTracks, and I
have not had either problem again. My phone has not restarted at all in the
past 24 hours, and my battery is losing charge at its normal rate.
However, different from the OP, MyTracks was not listed at all in the
applications that consumed my battery power at any point. This I cannot
explain.
If I re-install MyTracks and experience the same issue, I'll provide a log.
Currently my log file does not mention MyTracks, since it was uninstalled
yesterday.
Answer to comment #3: if you examine the log related to comment #2, you
will see that MyTracks has never been launched but the application still
won the third prize for power consumption.
Comment #6 on issue 520 by rdama...@google.com: Battery drain when not in
use
http://code.google.com/p/mytracks/issues/detail?id=520
(No comment was entered for this change.)
Comment #7 on issue 520 by rdama...@google.com: Battery drain when not in
use
http://code.google.com/p/mytracks/issues/detail?id=520
I have one suspicion on this, although I'm unable to reproduce: would you
be so kind as to test installing the attached APK, then rebooting your
phone, and seeing if the issue is gone (e.g. if after a day there's no
longer a battery drain)?
Thanks
Attachments:
MyTracks-noboot.apk 1.1 MB
I'm sorry but I'm leaving for a 8 days bicycle trip and I'd like to track
the entire holiday using MyTracks :-)
When I will be back home, I'll do the test you proposed.
Thanks for attention to this issue
Bye, Gio
Comment #9 on issue 520 by rdama...@google.com: Battery drain when not in
use
http://code.google.com/p/mytracks/issues/detail?id=520
I just noticed this started right around the time we refactored executors
on the service (which was in 1.1.5) - it could be related.
When I noticed this behavior on my phone there was an old version of Google
Maps, because the phone was new.
Some days after I received the Google Maps update, I reinstalled MyTracks
and the the behavior disappeared.
Now when I charge the phone completely, MyTracks appears in the Battery Use
Screen only after I start using it.
Maybe the problem was related to using last version of Mytracks with an old
version of Google Maps.
From my point of view, the issue is closed.
Thank you for assistance!
Bye,
Gio
Unfortunately there are others reporting that the issue is still there,
even with the newest (unreleased) versions of Android and Maps.
I'm also seeing this problem. HTC Hero using latest mytracks and maps
version as of today.
There does not seem to be any update here for a while, any solution that
has been found?
I charged my battery before going to bed, in the morning mytracks accounted
for 37% of battery use. Had not used mytracks for about a week...
I'm getting this exact problem as well on my Samsung Galaxy S2. I've
searched everywhere and don't see it running but it still is showing up as
the second highest battery usage application.
We have had something similar with another application. In our case what
happened was we end the application and the GPS rermains on with some
handsets. With the x10 mini pro Android 2.1 it goes off after a while. With
the Xperia ARC Android 2.3 and Nexus one Android 2.3.4 it stays on forever.
I can look in running services and the service is not there.
If we click on Manage Applications - All and force stop the application
that is supposedly not running the GPS will go off. What is happening is
that Android is not destroying the application immediately but scheduling
it for destruction only when it requires the memory. With My Tracks on
these handsets it does destroy the service immediately, we suspect because
My Tracks uses a lot of memory. The point is that Android decides when to
destroy the service and this will be different for different handsets. We
had to modify our application so that it will unregister for the GPS or any
high battery consuming tasks when the service stops recording and not at
service destruction.
We have had something similar with another application. In our case what
happened was we end the application and the GPS remains on with some
handsets. With the x10 mini pro Android 2.1 it goes off after a while. With
the Xperia ARC Android 2.3 and Nexus one Android 2.3.4 it stays on for a
long time. I can look in running services and the service is not there.
If I click on Manage Applications - All and force stop the application that
is supposedly not running the GPS will go off. What is happening is that
Android is not destroying the service immediately but scheduling it for
destruction only when it requires the memory. The point is that our
application continues in memory consuming power, GPS in our case, until
Android decides to do a clean up. This cleanup will be scheduled
differently for different handsets and is probably dependent on memory
usage by other applications as well. We fixed this by unregistering the GPS
service as part of the OnDestroy event handler which is called when the
service is ended by the user. Not sure if this is the problem but it fits
the symptoms described here which I haven't experienced with MyTracks.
The solution is to stop anything that consumes power in the OnDestroy event
handler.
We have had something similar with another application. In our case what
happened was we end the application and the GPS remains on with some
handsets. With the x10 mini pro Android 2.1 it goes off after a while. With
the Xperia ARC Android 2.3 and Nexus one Android 2.3.4 it stays on for a
long time. I can look in running services and the service is not there.
If I click on Manage Applications - All and force stop the application that
is supposedly not running the GPS will go off. What is happening is that
handler. Actually I consider it a bug in Android as Android should do the
clean up immediately after the service ends and not some indeterminate time
in the future.
We have had something similar with another application. In our case what
happened was we end the application and the GPS remains on with some
handsets. With the x10 mini pro Android 2.1 it goes off after a while. With
the Xperia ARC Android 2.3.3 and Nexus one Android 2.3.4 it stays on for a
long time. I can look in running services and the service is not there.
If I click on Manage Applications - All and force stop the application that
is supposedly not running the GPS will go off. What is happening is that
Android is not destroying the service immediately but scheduling it for
destruction only when it requires the memory. The point is that our
application continues in memory consuming power, GPS in our case, until
Android decides to do a clean up. This cleanup will be scheduled
differently for different handsets and is probably dependent on memory
usage by other applications as well. We fixed this by unregistering the GPS
service as part of the OnDestroy event handler which is called when the
service is ended by the user. Not sure if this is the problem but it fits
the symptoms described here.
The solution for us is to stop anything that consumes power in the
OnDestroy event handler.
Investigating further we looked at MyTracks on an Xperia Arc Android 2.3.3
using DDMS in Eclipse and it shows a number of threads running, one of
which is android.hardware.SensorManager$SensorThread This thread is keeping
MyTracks running. It will be stopped when the Android reclaims the memory
but that could be anytime in the future.
Actually I consider it a problem in Android as Android should stop the
application from continuing to run a while after the service ends and not
some indeterminate time long in the future. Otherwise it puts too much
responsibility on app developers to behave well.
We have had something similar with another application. In our case what
happened was we end the application and the GPS remains on with some
handsets. With the x10 mini pro Android 2.1 it goes off after a while. With
the Xperia ARC Android 2.3.3 and Nexus one Android 2.3.4 it stays on for a
long time. I can look in running services and the service is not there.
If I click on Manage Applications - All and force stop the application that
is supposedly not running the GPS will go off. What is happening is that
Android is not destroying the service immediately but scheduling it for
destruction only when it requires the memory. The point is that our
application continues in memory consuming power, GPS in our case, until
Android decides to do a clean up. This cleanup will be scheduled
differently for different handsets and is probably dependent on memory
usage by other applications as well. We fixed this by unregistering the GPS
service as part of the OnDestroy event handler which is called when the
service is ended by the user. Not sure if this is the problem but it fits
the symptoms described here.
Investigating further we looked at MyTracks on an Xperia Arc Android 2.3.3
using DDMS in Eclipse and it shows a number of threads running, one of
which is android.hardware.SensorManager$SensorThread . This thread is
keeping MyTracks alive and it shouldn't be running after the user has
stopped it and MyTracks no longer shows up in running services. It will be
stopped when Android reclaims the memory but that could be anytime in the
+1 here. Noticed this for the first time today, but I cannot say what has
triggered it. Pretty sure it is something very recent on my phone. (Galaxy
S II)
Funny observation: In the battery usage app, when I press 'menu'
and 'refresh', I notice that momentarily the MyTracks icon actually changes
to the generic Android icon, and the "MyTracks" string is removed or
changed into something else. This happens too quickly for me to see what
happens (<0.1 sec?) Could it be that the MyTracks app is wrongly listed
instead of some other "system subroutine" or something?
I have exactly this problem (MyTracks using 26% of battery despite being
off; won't obey force stop commands and regardless of GPS on/off.) HTC
Incredible2 with updated maps and MyTracks versions. I only noticed this
since October 20, so it might be related to the Oct 14 updated of MyTracks?
I have the same observation as in Comment 21 (battery usage monitor, a
google.something? appears momentarily, replaced by My Tracks).
I love the app, but can't use it if it drains my battery in a couple hours
when I'm not using it!
Same issue here. Haven't used the app for days but it is showing 18%
battery use, second only to display. It has only started doing this since I
made my first recording about a week ago; it didn't do it before then. I
have force stopped the app several times but it still keeps using battery.
I think that what is written in comment 19 above is probably correct.
On my galaxy s2 mytracks uses a lot of power without me launching it after
reboot, but if I use some memory-intensive app mytracks stops to drain the
battery. I therefore think it has something to do with lazy destruction as
described in comment 19.
This can also be used as a work-around for the problem: Launch an app that
uses a lot of memory after you have been using mytracks to force android to
kill all remains of it.
I also have noted similar behavior on my MyTouch Slider 3G but because I've
been aware of the Garbage Collection policy(which is very different than on
non-mobile machines) on mobile devices described in comment 19, I haven't
really given this much of a second thought... For <most> apps the policy is
logical, it might mot be for My Tracks, although generally it's bad policy
to explicitly kill the app's process, maybe it should be done here.
In the meantime, because My Tracks wouldn't be nearly the only app which
maybe should be killed quickly, every serious User really needs to install
a Task Killer app of some sort.
IMO,
TSU
dear friends, has the issue been resolved?