Why does my App crash at 8.05 or 8.06 km of activity recording?

Former Member
Former Member
I need help with a mysterious crash:

I start an activity recording, and after 8.05 km or 8.06 km the app crashes. This can be reproduced and happens on my and on someone else's F3, but it does not happen on the simulator.

The error log CIQ_LOG.txt has no associated entry.

When the F3 lies on the table over night, it runs for many hours but since it doesn't reach 8.05 km, it doesn't crash. The simulator doesn't crash for any reasonable distance.

Initially I though that the crash was related to how I convert session.elapsedTime and session.elapsedDuration into strings etc., but this part of the source is not even called when the crash occurs.

Speculating that it is related to a memory leak: how could I debug it? What should I avoid in my code? Why does the crash occur at a given distance but not duration? Does anybody else have a similar problem?
  • By FIX - the CIQ guys meant remove that feature entirely and thus one have to implement the lap screen manually


    Have the plans changed since Brandon wrote the following in this thread on May 19? My understanding was that the unpreventable, and unadjustable auto lap that occurred at 5 miles was going to go away, but that we'd still get the native lap screen when the app calls Activity.addLap().

    (Brandon from 5-19) - The native lap screens appearing is the default behavior of the system. There are apps that prefer having this behavior, so I don't believe we will completely remove them, but an option to disable these is under consideration.
  • OK - Now I found this post which is what NIKEOW must have been referring to.

    Post

    The lap screen was removed at this time because it was not properly incorporated with ConnectIQ. When the lap banner was up, pressing buttons would trigger unintended behaviors from the native recording modes. We may eventually be able to re-enable the native banner using an option in the ActivityRecording Session, but for now, you will need to push your own view if you need a lap screen.


    I checked and it looks like VA still shows the native lap screen and Fenix3 and Epix do not. (I don't have a 920 handy) I'm not sure of the proper way to deal with this.
  • The unwanted autolap at each 5miles is still there on the vivoactive and the system lap screen is still there if I add a lap in the app. I don't mind the system lap screen, and I don't mind if it goes away. I just don't want the 5mile autolap!
  • OK - Now I found this post which is what NIKEOW must have been referring to.

    Post



    I checked and it looks like VA still shows the native lap screen and Fenix3 and Epix do not. (I don't have a 920 handy) I'm not sure of the proper way to deal with this.


    In the same thread I asked about the VA, and the CIQ folks said it would be removed on the va at some point in time with a FW update. 3.20 just came out, so something after that.
  • Yes.. MoxyRoger. That's what I am referring to. Now I need to add code to have the lap screen show up. But... Since VA still does not yet remove the auto lap screen. And I've implemented mine.... I'm not sure what will happen to the actual device. Dratzzzz
  • My understanding is that this "fix" will also be brought to vivoactive, but I'm not sure of the timeline. I wasn't privy to the discussion around removing the native autolap banner, so I'm not entirely clear on the reasoning.

    Roger: we've received your email about this, and I'll make sure someone responds. I'll see if I can post back a summary of our reply.
  • I just touched base with the vivoactive team, and they've brought this fix into their development firmware version, so I can confirm that the autolap change will be in an upcoming vivoactive firmware release.
  • I just touched base with the vivoactive team, and they've brought this fix into their development firmware version, so I can confirm that the autolap change will be in an upcoming vivoactive firmware release.


    So this is both removing the system lap screen, as well as removing the lap mark generated by the FW each 5 miles? I don't want the 5 mile lap mark to show up in the .FIT file when it's uploaded to Garmin Connect. I only want lap marks in the .FIT that are generated by my app..
  • Here are the change notes for that particular change:

    This changes the default AutoLap setting for the Generic sport profiles
    to Off. Previously it had been on with a distance of 5 miles/km
    depending on your distance measurement preference. This was the only
    "extra" feature enabled by default in the Generic profile and it causes
    issues with Connect IQ apps, all of which use the Generic profile when
    recording an activity.


    This does not affect any existing profiles on the devices, but any new
    profiles using the Generic sport will not have AutoLap enabled. This
    works well with Connect IQ because its profile is recreated each time
    an app is launched.


    So this will both disable the AutoLap notification and the mark in the FIT file because it's turning off the feature entirely.
  • My understanding is that this "fix" will also be brought to vivoactive, but I'm not sure of the timeline. I wasn't privy to the discussion around removing the native autolap banner, so I'm not entirely clear on the reasoning.

    Roger: we've received your email about this, and I'll make sure someone responds. I'll see if I can post back a summary of our reply.


    Alphamonkey responded today to an inquiry from Roger about the removal of the native lap screen. Roger's main contention was that a breaking change (with regard to CIQ apps) was introduced in device firmware and there was little notification or justification. We should have done a better job of communicating about this change. Here's a little of what Alphamonkey had to say:

    For every app where it’s existence is a benefit like yours, there’s an app like the area calculator where it really doesn’t belong, yet appears simply because… it’s just there. In general our goal is to keep API compatibility and to avoid breaking API changes, but the lap page was really more of a bug – a bug that helped some people, we admit, but still a bug.


    Hopefully that explains things a little better. In the past, teams within Garmin have been able to act somewhat unilaterally because there was nothing like a public-facing Connect IQ API to be concerned about. Now things have changed, and Garmin must be more cognizant of whether what appears to be an innocuous change might have ramifications for our Connect IQ developer community. As a company, we're still fairly new at this... it turns out coordination amongst multiple teams is pretty challenging. Who knew? :rolleyes: I don't mean to offer excuses--we're learning and will continue to improve.

    At the very least, I'm glad that many of your are willing to add to the conversation here and offer your opinions. We value your comments!