Tracking stops by itself

Started by auric, March 01, 2011, 16:44:10

0 Members and 1 Guest are viewing this topic.

auric

Ok, this is one just to keep in mind, since I wasn't able to reproduce it consistently and thus difficult to test or fix. It is however quite problematic seen from the tracking point of view.

The problem is that Locus stops tracking after a while. Not always, just sometimes. Coincidence or not, it seems to be happening only when I use the HTC Locations application as well. I thought of different possible scenario's:
  • It might happen when HTC Locations (and thus "another application that uses the GPS") stops listening for GPS signal. However, in several situations, the tracking just continued when I closed the application at arrival.
  • It might be caused by the fact that Locus responds on tap-inputs, although it isn't the active application. However, I think that would be strange and by the way, it also happens when the "stop" control isn't visible.
  • It might be because Locations makes a strange call to the GPS and force disables it. Don't know whether that would be possible, I haven't tried to write an application that disables the GPS after a while. It seems to happen often when I re-calculate a route, causing Locations to "disable", then "enable" gps again and recalculate. However, the problem never occurs when I do a manual recalculation as a test.

Fact is that, when the problem occurs, these are the symptoms:
  • The track isn't visible on the map, while it is displayed while recording is going on
  • The tracking buttons (record, pause, stop) are in status "stopped" so that only the "record" button is clickable
  • The track is visible in the list of recorded tracks. However, it is unchecked, this in contrast to the behaviour when you hit "stop" after recording: when you hit "stop", the track is saved and checked by default, so that it is still visible on the map. When the problem occurs - as said - the track is visible in the list but unchecked.

In some occasions, tracking stopped during my trip (driving) and in other occasions, it stopped when I already arrived at my destination.
I'll keep you updated when I discover more information, but I wanted to share this anyway. The pattern "stops recording but doesn't activate the newly recorded track" might be a good start to discover what's going on, since that is not default behaviour..
LM Pro - LocusMap 4 🥇
  •  

auric

#1
Update: Yesterday I started logging my tracks. At home, I paused the logging and kept it that way over night. This morning, I wanted to restart the logging I paused yesterday, however, the track was stopped and not checked (so invisible)
When I look at the statistics, it says it has recorded 679 points for 19 minutes (the time that I actually recorded before I hit pause).
The only option I had this morning, was to start a new recording. GPS was disabled as well, it didn't enable automatically when opening Locus and Locus displayed the question: "GPS is disabled, do you want to enable it?"
LM Pro - LocusMap 4 🥇
  •  

svartbjorn

#2
For me it is even more serious. I have experienced the following in 5 out of 8 recordings so far: After about 3 km (16 minutes) Locus hangs. Sometimes the phone reboots, sometimes it is dead and I have to remove the battery to restart. I had one case where I could communicate with the Locus, but then it stopped responding, the phone got completely locked, and I had to take out the battery. But usually the phone is dead when I pick it up and check. I get a track log though for the first about 3km. I use downloaded  (offline) maps. I have seen the trouble both with no other GPS app running and with the app "Instamapper" (reporting GPS position online) running at the same time. No difference, so this hang doesn't seem to be related to other programs running. BUT, I have also succeeded in completing my run and saved the track. I have tried different zoom levels. No difference. I have an HTC Desire with Android 2.2. The phone is rooted, so I have Locus installed on the SD card. That has proven to be ok for all my other apps. So I guess Locus also should be happy with running from the SD card. I will try with online maps to see if this is related to offline maps. Has this something to do with drawing the track live on the map or the recording itself?
  •  

Menion

#3
look like very serious problem. I'll have to look on it closely in next few day. Anyway guys, may you look into locus/logs directory and check if there is any error file? May contain something that should help me ...

 thanks
- 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

#4
Didn't experience such behaviour. Don't have a rooted phone though. I experienced once a complete lock, when I configured Locus to use a Bluetooth GPS receiver, close it, connected to the Bluetooth receiver using BlueGPS4Droid, then opened Locus which tried to access the bluetooth gps as well and obviously didn't succeed. But it locked up my device.

Concerning the problem I reported, there are several logfiles (crash-xxxx.err). There isn't one for each day the logging went wrong. I found only two that are created on the time that the logging was interrupted.

I'm sending you those files in the logs.zip file.
The others are empty files or OutOfMemoryExceptions, probably created while I was downloading too many tiles :-)
And optional.zip are two log files that I'm sending to you without specific error reporting, but they might interest you :-)
LM Pro - LocusMap 4 🥇
  •  

Menion

#5
Hi,
  I rewrote big part of track recording part in Locus. Today I had small trip, together with small bus part it was

3 hours of recording, 16km, cca 5800 points. All without any problem!

so please try also.
- 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

#6
What I experienced is this:
- Today I started a recording, then got it paused for 12 hours now. I wanted to re-start the recording only to find out that it wasn't possible anymore: recording has stopped, track is in the track list but unchecked...

During the day, I did use my phone for other things.
You know what I think? Android is killing Locus since it wasn't used that much and wasn't doing anything at that moment.
So I ended up here with the "recording track" notification in the notification area but clicking it doesn't allow me to continue the track.
Why did I notice this? The tracks that I unchecked this morning in the tracks list, were now checked again.

Don't know whether this could be the reason why locus "stopped" recording during the trip the other day: there were other applications running, mainly a heavy navigator, maybe Android ran out of resources and killed Locus to give the navigator more resources. And mainly, I don't know whether you can do anything about it, since Locus is in the background at that time and although it is not idle (it was recording!) Android kills it anyway to free up resources. And on top of that, I don't know whether Android kills background running, non-idle apps...
LM Pro - LocusMap 4 🥇
  •  

auric

#7
heh.. "unfinished track detected"
Cool :-)
LM Pro - LocusMap 4 🥇
  •  

auric

#8
Yesterday, using version 0.9.26.4, I started a recording at 6:47:58 GMT. I wanted to try continual recording during the day (it helps that I'm next to a window all day and I have good reception). I hit the Home button to hide Locus and went off.
At 7:16:54 GMT I downloaded the NMEA track to my computer using Eclipse, so that the SD card remained mounted.

During the day, I didn't open Locus even once, I did use other applications. The GPS signal in the status bar was there all day at full reception.

At the end of the day, when I came home, I opened Locus to stop the recording. Then, things went very fast. What I saw was Locus starting entirely again (white screen, then map loading, ...) in stead of just coming back to the front and the GPS status gave me a "Searching for signal" icon (you know, the flickering icon). The recording seemed to be stopped in the morning, there was no record of my way back home.
The NMEA record goes up to 7:32:29 GMT then stops.
No error logs are created.

It confuses me, I can't find a way to reproduce this consistently :)
I was wondering... Are you logging anything and preferably everything with the tag Locus? I could try to run aLogCat continually, logging only the lines  Locus produces and trying to figure out what's going on... I however can't find any Locus-specific logging...

Today, I'm recording again the entire day, using 0.9.27 Market Edition. So far so good, Locus is still recording (NMEA file is still being updated) and I opened Locus a couple of times this morning. From now on, I'm not going to open it again though and see what happens.
LM Pro - LocusMap 4 🥇
  •  

Menion

#9
looks like run on long track with track recording. Now I understand why on My Tracks works four developers :)

so about logcat, looks you're familiar with whole developing system, that's great. I'm using my own implementation of logging so for published versions all logs except Log.e() are disabled!

since 0.9.26.4 I did some small improvements to track recording so maybe it helped. Now whole recording is maximally separate service that do not depend on whole Locus, so it's possible that system killed Locus application because he need memory, but Locus recording service should run still. If not, then there is probably still some mistake because system should not kill running active service until there is really very critical memory problem!

thanks for excellent testing Auric!
- 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

#10
Cool! I was actually thinking only yesterday about how it would behave if recording was done as a service. It should be more stable. Indeed, I see the TrackRecordingService running. Ha!
Well, it's still recording, so that's great.

If it's still recording this evening, be sure I will kill Locus (app, not the services) manually just to see what happens  :P

Just tried MyTracks (long time) just to find out that they as well are using a Track Recording Service. You found it out by yourself, they needed 4 developers for it ;)

You're more than welcome. You're the one that deserves all credit for the magnificent app  :D
LM Pro - LocusMap 4 🥇
  •