Acknowledged
CIQQA-4869

Swim session created with ActivityRecording is ended by the system after ~8 hours (FR965)

Hi Connect IQ team,

I'm Ron Nahari, a Connect IQ developer from Israel. I've built a device app that lets Sabbath-observant Jews keep wearing their Garmin watch over the Sabbath. I'm working on it together with the Zomet Institute, an Israeli institute for technology and Jewish law.

For about 25 hours the watch has to stay passive: the wearer's movement shouldn't create any records. A pool swim session does exactly that. While it is recording, the watch counts neither steps nor floors, and the touchscreen is disabled.

The problem:

  • Device: Forerunner 965, firmware 29.05, SDK 9.2.0
  • Session: createSession({:sport => Activity.SPORT_SWIMMING, :subSport => Activity.SUB_SPORT_LAP_SWIMMING, :poolLength => 25.0})
  • After 8.3 hours of recording, the system ended the session and showed the native Save / Resume / Discard screen on top of my app.
  • The app did not crash. There is no entry in CIQ_LOG, and Session.isRecording() never returned false before the app was covered.
  • The native Pool Swim activity on the same watch also ended by itself after a few hours.

My questions:

  1. Is there a time limit or inactivity timeout on swim sessions? Can an app disable it or extend it to 25 hours?
  2. If not, is there another way to suspend step and floor counting while my app is running? For example, an option in createSession, or a different sport / sub-sport that has no such limit.

Restarting the session from the app is a poor workaround for us, because the watch plays a tone and vibrates on every stop and start.

Thanks,
Ron Nahari

  • This starts to sound more like a firmware bug than a CIQ specific. Maybe you could do the same test (both with native activity and CIQ app) using different sports to narrow it down (maybe it is a bug only related to swim, maybe it happens with all sports). I would also contact Garmin Support with these findings, they usually send you a code that you use in the Garmin Connect app to upload debug logs to them, they might be able to see there more than you can. And in case you have another watch you can also try to see if similar spontaneous restarts happen there as well.

    Ah, BTW this reminds me a bug I had a few years ago. Back then sometimes I went out to run just before midnight and in some runs I had a similar restart. Back then I had a feeling that it might somehow be related to midnight.

    Actually you could try one more thing: not sure if it applies (depends when you start the activity vs your watch settings) but maybe changing / disabling DnD and sleep related features can "work around" it (in which case you have more useful data to send to Garmin to pinpoint the bug). I remembered now that in the newer watches you have this feature when you stop an activity and choose "Resume Later", and then don't resume it yet by the time the evening report / sleep window / whatever would start then it gives you an alert and asks you whether you forgot to save or you really want to resume later (but sleep related functions won't work)

  • Update with new evidence: the watch itself appears to restart during
    long pool swim sessions

    I ran more tests and now have a FIT file and an app log that show what
    actually happens. Device: Forerunner 965, software 29.05, SDK 9.2.0.

    What I see

    1. During a session created with SPORT_SWIMMING / SUB_SPORT_LAP_SWIMMING
    (poolLength 25.0), the records in the FIT file simply stop.
    2. About 5.5 minutes later the same file contains a power_up event
    (event 6, event_type 4).
    3. After that, the file continues with GPS enabled, and the session and
    lap summaries say sport = running, although the sport message still
    says swimming / lap swimming.
    4. The file is never finalized. A FIT viewer reports it as corrupted
    and repairs it.
    5. My app writes a log line in onHide() and in onStop(). Neither was
    written. The log just ends, which matches the whole device going
    down, not the app being closed.

    It has happened three times, at different durations

    - Native Pool Swim activity: ended after 4 h 43 min. File not finalized,
    no timer stop event.
    - Session created by my app: ended after 8.3 h. The watch showed the
    native Save / Resume / Discard screen. No entry in CIQ_LOG.
    - Session created by my app, 2 h 36 min after a fresh session was
    started: this is the run described above.

    So it does not look like a time limit. It also happens with the native
    activity, so it is not specific to my app.

    One more thing I noticed

    In one case, right after discard() followed by createSession() and
    start(), isRecording() returned false 10 seconds later and timerState
    was 0. Doing the same again worked.

    My questions

    1. Is this a known issue with pool swim sessions on the FR965?
    2. Pool swim is the only activity I found that suspends both step and
    floor counting. Is there any other way for an app to get that, for
    example an option in createSession or another sport / sub-sport?

    I can send the FIT file and the app log privately to someone from
    Garmin. I prefer not to post the file publicly because it contains
    personal data.

    Thanks,
    Ron

  • Thanks again. The hourly check is a good idea, and I'll do that in the next test so I can catch the exact moment it stops.

    About the stop button: the watch was lying on the table for the whole activity, so I'm sure no button was pressed by accident.

    That might also be a clue. Over 8 hours there was no movement and no heart rate at all, because the watch wasn't on a wrist. Maybe the firmware has some kind of inactivity or off-wrist timeout that ends the session after a long period without any signal? That would also explain why the native Pool Swim activity stopped by itself.

    About auto pause: I'll check that it's disabled in the activity settings

    That bug looks related, though the symptom is a bit different: there the timer keeps getting paused while the session continues, and in my case the Save / Resume / Discard screen appeared.

    For the next test I'll wear the watch, check it every hour, and save the activity when it stops. Then I'll check the FIT file for timer events with timer_trigger = auto, like in the Venu 4 report.

    .

     

  • Try to check the watch every hour, then if you notice it stopped, save the activity, then look into the data and try to think what did you do up to that point vs what did you do at that point. In some activities there's automatic pause, though that can be disabled in the activity settings (minus some possibe bug that was reported in the past month here) and my guess is that during 8+ hours there would've been many occasions when auto pause would make sense, so it's probably not that. Maybe it's the reincarnation of this pause bug? See:  Venu 4 (18.32) auto-pauses a Connect IQ ActivityRecording session on its own  

  • Hi flocsy,

    Thanks a lot for the detailed reply and the testing ideas. They're very helpful.

    One more data point: I also tried the watch's native Pool Swim activity, without my app at all, and it also stopped by itself after a few hours. So I don't think it's my code or an accidental button press. It looks more like something in the firmware, maybe an inactivity timeout specific to swim activities.

    I'll still run the test you suggested (logging the stop button and the battery level) to get exact data.

    About diving: it's only supported on a small number of devices, so it isn't a practical option for this app, which needs to run on as many watches as possible.

    Ron