Tracking stops by itself

Started by auric, May 25, 2011, 15:30:59

0 Members and 3 Guests are viewing this topic.

auric

Version: 1.8.3ME
Android version: 2.3.3, HTC build 2.36.405.8
Device: DHD

Hi Menion,

This was reported previously, then considered solved. However, I'm experiencing the same issues as a while ago: track recording stops by itself.
A little while ago, I updated my DHD to Gingerbread. Since then, I started stress-testing Locus again and I stumbled upon the same issue as in the early days of Locus.

Concrete situation: This morning at 8:09 local time I started a recording. Then, I hit the home button to return to my home screen with Locus running on the background. It's a 20 minute drive from home to work and I kept Locus recording on arrival. During the morning, I did little to nothing with my phone before I checked on Locus around 13:30. The GPS indicator told me that GPS was active and in good reception.

When I started Locus, it started from scratch (noticed because the screen was rebuild) as though it wasn't started yet, then the notification "unfinished track detected" popped up and the "recording state" was set to "paused".

Since I noticed this in the days after the upgrade, I cleaned all error logging yesterday (there were a bunch of  them) and I checked those log files: there was one created at 12:31.
Then I checked the recording itself and it seems that it didn't record a lot since my arrival at work, which could be due to my settings (not recording when new point is no 3m from previous recorded point, no recording when accuracy is lower then 15m).
Then I checked the NMEA file, which is recorded on track record, the last entry was saved at 9:20

During the recording, I was inside the building all the time, mostly next to a large window which means that I did have full GPS reception, I did however move some times so that GPS reception was sometimes lost.
At 9:20 I was still at my desk next to the window and what's more: yesterday I had a 150km car trip on which recording was stopped as well after about two hours of recording and while having a constant reception.

Included there's the error log from today - which is quiet unreadable due to obfuscation :-)  - which I hope can clarify things to you. It is created the moment that I opened Locus again to check for the current recording state.


After I noticed recording was stopped, I restarted recording (around 13:31) and checked again at 14:30. The same happened: Locus had to re-open and rebuild all over again and a new error log was created (included as well). No extra points were recorded, which could be because of my settings of course but I'm not sure because in the NMEA file there was no new entry either: the last entry was still the one of 9:20 and there was no new entry created for the recording (re-)started at 13:30

So, I'm detecting a couple of problems here:
  • Track recording stops after a while, probably when Locus is in the background
  • Restart recording doesn't seem to go very well after this kind of error
  • Restarting NMEA recording doesn't work either in this case

Please note: when starting a recording, stop recording after a little pause, restart recording after a little pause... both normal tracking as well as NMEA tracking work as expected!
LM Pro - LocusMap 4 🥇
  •  

daubor

#1
Same here!
Tried to record a car-trip. After finishing it, i checked locus and it said that it detects an unfinished recording :( -> recording was stopped in the middle! No logs at this point of time.
GPS should be there as well!
Locus was in the background and screen was off.

I will check this in different environments...because i have some additional apps running.
-JuiceDefender
-Tasker
Maybe there is some influence between them!
  •  

Menion

#2
aren't these two killing running services? check it because when they kill recording, notification will remain but record stops ...
- Official help (ideas, questions, problems): help.locusmap.eu
- Advanced topics, sharing of knowledges: you're here!
- LM 4 Beta download, LM 4 Release download
  •  

durian

#3
I had the same experience yesterday evenning. Had logging on the whole time in the train, while I was watching a Doctor Who episode. The tracking had stopped and Locus had disappeared. Train journey is about an hour.

I assumed it was the system who killed them (I don't have anything special running, but I though Android killed processes as well?).

I also had the logging on in the morning, without watching a movie, and then it worked OK.

-peter
  •  

daubor

#4
Quote from: "menion"aren't these two killing running services? check it because when they kill recording, notification will remain but record stops ...
No, JuiceDefender is capable of enabling/disabling e.g. wifi/radio/... but not gps!!
Tasker is able to kill apps, but it's not configured to do this!

This morning i did a background recording again!
Everything was fine.
Even a short gps lost was no problem.
  •  

auric

#5
Quote from: "menion"aren't these two killing running services? check it because when they kill recording, notification will remain but record stops ...
As for me, I don't have any process killer installed.
LM Pro - LocusMap 4 🥇
  •  

fencepost

#6
I'm having a similar problem.  Running Locus Pro on a rooted Motorola Droid.  No app killers on my phone.
  •  

Menion

#7
hmm so today I finally tested locus in terrain and I had after cca hour (2700 points recorded) same issue. When I came home, I watched logs in phone and no error, no memory problem. Only message:
  Scheduling restart of service TrackRecording ...
  Scheduling restart of service GpsConnection ...

So it looks like system killed both my services for unknown reason (I was listening music only) and problem was mainly that these services do not restart itself correctly, so when they are killed, they will remain killed ...

Solution probably would be, fix this and allow correct restarting of services. If this will be fixed, there should be only few seconds space (it takes around 5sec before restart is called) in recording. Sounds good right? I'll look at is soon ...
- Official help (ideas, questions, problems): help.locusmap.eu
- Advanced topics, sharing of knowledges: you're here!
- LM 4 Beta download, LM 4 Release download
  •  

auric

#8
That looks good indeed. 5 seconds of missing tracks is not so bad.
Its strange however that services are killed, even when not under extreme memory usage...

Just for your information, although I'm sure you already know this: on Android Developers there's an interesting paragraph on Process Lifecycle that says:
    A started service can use the startForeground(int, Notification) API to put the service in a foreground state, where the system considers it to be something the user is actively aware of and thus not a candidate for killing when low on memory. (It is still theoretically possible for the service to be killed under extreme memory pressure from the current foreground application, but in practice this should not be a concern.)
    [/list]
    I haven't created a service myself yet, but it might be a thought? :-)
    LM Pro - LocusMap 4 🥇
    •  

    auric

    #9
    I don't know if this has its effect on the MyTracks recording as well.
    I've been thinking about creating a new bugreport for this, but I have a feeling that this could be related, so I'm posting it here.

    If I use the (less preferred) MyTracks method to record a track, this is what I see (although further testing is required since I don't fully understand what's happening)
    I started the tracking at 9:10 local time and didn't touch my phone until 10:07. The MyTracks tracking icon wasn't there and neither was the GPS signal indicator. I opened Locus (it started from scratch) and showed me that recording was stopped. So I started it again.

    At that point, 10:07:04, there's a log file created:
    ----------  May 28, 2011 10:07:04 AM  ----------
    TAG:MyTracks
    MSG:onServiceConnected()
    TRACE:java.lang.IllegalStateException: A track is already in progress!
    at android.os.Parcel.readException(Parcel.java:1330)
    at android.os.Parcel.readException(Parcel.java:1276)
    at com.google.android.apps.mytracks.a.a.a(L:171)
    at menion.android.locus.core.a.b.a.onServiceConnected(L:123)
    at android.app.LoadedApk$ServiceDispatcher.doConnected(LoadedApk.java:1098)
    at android.app.LoadedApk$ServiceDispatcher$RunConnection.run(LoadedApk.java:1115)
    at android.os.Handler.handleCallback(Handler.java:587)
    at android.os.Handler.dispatchMessage(Handler.java:92)
    at android.os.Looper.loop(Looper.java:143)
    at android.app.ActivityThread.main(ActivityThread.java:4196)
    at java.lang.reflect.Method.invokeNative(Native Method)
    at java.lang.reflect.Method.invoke(Method.java:507)
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
    at dalvik.system.NativeStart.main(Native Method)

    Indeed, when I stop the recording, I can see that there's just one file.
    However, tracking stopped at 9:54:37 (maybe because I entered a building by then) and restarted at 10:07:59 (same trackfile)

    As said, maybe this is because of the same issue.
    And although I hope the Locus tracking is reliable soon (so that I can use that again  :D ), you might want to know about this one as well :-)
    LM Pro - LocusMap 4 🥇
    •  

    rijackson741

    #10
    The same thing happened to me today. I have no app killer installed, and was not running anything that would use a lot of resources. I didn't even put Locus into the background, just turned the screen off. I turned the screen back on several times, and it looked fine, then at one point I tuned it on, and Locus was not there any more. And of course it had stopped recording. You seem to have figured out what the problem is, but in case it helps I have attached the error log. I notice that it is quite different to the one Auric posted.

    As another note, I have also recently upgraded to Gingerbread.
    •  

    Menion

    #11
    fine, version for test is on forum ...
    - Official help (ideas, questions, problems): help.locusmap.eu
    - Advanced topics, sharing of knowledges: you're here!
    - LM 4 Beta download, LM 4 Release download
    •  

    auric

    #12
    I'm excited. Current results are very promising.
    Started the recording at 17:03:04 and my trip must have ended around 17:20 local time.
    I didn't stop the recording, kept Locus in the background and used my phone minimally.

    At 20:10 I opened Locus and paused the recording. It was only then that it appeared to me that Locus itself was still up and running! The track was complete, but of course, it was only 20 minutes of recording.
    Then, I checked the NMEA file and the last entry was at 20:10:51!
    Ten minutes later, I restarted recording, one minute later I paused it again and checked the NMEA log. The entries were added to the log.

    Now I'm pausing it and I'm planning to restart it tomorrow morning.
    Good job!

    Oh, and I have the impression that Locus is much more battery efficient now. So I'm twice as happy :-)
    LM Pro - LocusMap 4 🥇
    •  

    rijackson741

    #13
    10 hours, and it's still recording. I'll leave it recording overnight (although it's obviously not going to move, so it will not add any points until I get up tomorrow!).
    •  

    Menion

    #14
    hmm I tested it over night and seems that recording works fine but GPS was turned of during night :) damn ... so still some "mistake" somewhere ...
    - Official help (ideas, questions, problems): help.locusmap.eu
    - Advanced topics, sharing of knowledges: you're here!
    - LM 4 Beta download, LM 4 Release download
    •