App crashes on Fenix 8

I just received a User Feedback report that my app Sail2WIN crashes on startup on a Fenix 8 51mm Solar.

Sail2WIN runs without issues on all Fenix 8 models using the simulator.

I build using SDK 6.4.0 since I don't need the new features offered in the newer SDK releases, 6.4.0 works, and I'd like to avoid introducing new problem to be debugged.

I ran the ERA viewer and see no report of the crash.

Is there a known problem with using SDK 6.4.0 to build for the Fenix 8 models ?

Does anyone have other thoughts about why my app would crash on startup on the Fenix 8 when it runs fine on the Simulator ?

Thanks in advance for any help.

  • it can be problem with new firmware, look at the top of this page

    forums.garmin.com/.../fenix-8-series

  • Yes.. And it's not just the F8 with this issue

    "We are aware of users who are seeing boot loops or devices being stuck on the Garmin logo when trying to start GPS activities. We understand the impact of this disruption and are currently investigating a cause and will remove this message when a resolution is found. 

    Thank you all for your patience as we work to resolve this." 

  • So you're saying that restarting the watch is one possible manifistation of a known firmware problem on the Fenix 8 ?

    And.... how can I see all posts on this thread. Many have vanished.

  • I see 2 pages worth of posts in this thread..  Look at the bottom and you'll see

    1 2

    We are on page 2 right now.

  • Thanks Jim (eye roll about missing that!)

  • There is only one problem.... The new SDK often requires the newest firmware for device and it means that your app will be unavailable for anyone who doesn't update firmware (e.g. today's problem with gps and restarting devices, draining battery etc.). The same problem will be with APAC devices where new version are publishining months later than wordwide.

    But ofc you know very well that the device config (compiler.json) which causes newly built apps to require new firmware is not tied to the SDK version. The related APAC issue won't be solved by using an old SDK version, either.

    If a build an app today, the minimum firmware/CIQ version for that app will be determined by the device files (compiler.json), not the SDK.

    Like it or not, the contents of the device files aren't versioned per se. You just get the latest version from Garmin (assuming that you accept updates), with no way to roll back / select a version unless you do so manually.

    Whether you build using the oldest SDK that supports your devices or the newest SDK, that’s not going to magically change the contents of compiler.json for your devices.

    Sure, you can edit those device files by hand, but you also know that you’re not supposed to do that. And your decision to edit the device files is not strictly related to choosing to use an old or new SDK.

    In my opinion if your don't have to use the newest SDK use that you tested your apps, especially that usually apps built with the newer sdk consume more memory...

    Yes, I used to think just like you and I avoided updating to the latest SDK for that very reason.

    That was back when you could actually build for existing devices using older SDKs. This doesn’t seem to be possible with CIQ 5.* anymore (see below).

    The only reason to use the newest SDK is the newest devices

    Yes, and this thread is specifically about using SDK 6.4.0 to build for Fenix 8 (one of the newest devices).

    You are not supposed to do that. As a matter of fact, you are not supposed to do that for any current (not-so-new) device which has been updated to CIQ 5.0.0 or 5.0.1 (which is all the CIQ 4 devices).

    Again:

    - CIQ 5.0.0 requires SDK 7.1.0 iirc

    - CIQ 5.0.1 requires SDK 7.3.0

    A Garmin employee confirmed that CIQ 5.x devices require newer SDKs, too.

    https://forums.garmin.com/developer/connect-iq/i/bug-reports/building-ciq-5-devices-e-g-fr955-in-sdk-4-2-4-results-in-error-claiming-sdk-5-0-0-or-greater-is-required---shouldn-t-this-be-sdk-7-1-0

    And again, if the compiler compatibility checks were working properly, then the compiler would literally refuse to build for newer devices that it doesn’t support.

    You can see this easily by trying to build for Fenix 8 with SDK 7.2.0 - it will say that this compiler only support CIQ 5.0.0 and you need a newer one for CIQ 5.0.1.

    You can see the same by trying to build for any CIQ 5.x device with a (very old) 4.x SDK — it will correctly say that this compiler does not support 5.x devices, but it will incorrectly suggest that a 5.x SDK will build for those devices. (Clearly wrong because 5.x SDKs came out long before CIQ 5.x) That bug in the SDK compatibility check is the only reason you can even build for CIQ 5.x devices with a 6.* SDK. But you’re not supposed to.

    As I said above, if your app is really simple (like a simple data field), then you might get away with using a too-old SDK. But obviously Garmin will never recommend doing so and neither would I. You would have to test your app on a real device and make sure it’s not calling any API that actually requires SDK 7.1 (or 7.3).

    We’ve already seen issues where resource-related code will crash if you build an app for a CIQ 5.* device with a too-old SDK (like SDK 6.*). Either that or the simulator will produce an error when you try to the run an app.

    The only reason to use the newest SDK is the newest devices

    I'm not 100% sure what you mean by "newest devices", but fr955 was released 3 years ago. It came out with CIQ API 4.x but now it's on CIQ 5.x. If you want to support fr955 properly, you have to use SDK 7.1.0 or higher.

    I checked compiler.json for all devices, and all the CIQ 4+ devices have been configured to be on CIQ 5.0.x now. There's no devices configured for CIQ 4.* anymore.

    So the other reason to use the new(er) SDKs is to use devices which have been updated to the newest CIQ. That's almost all currently supported watches afaik, except for the Fenix 6 Pro family, which is on CIQ 3.4.x iirc.

  • As another illustration of what I'm talking about (and a way to confirm which compilers should support which API levels), you can look in the respective SDK folder under bin/compilerinfo.xml:

    e.g. 6.4.0

        <targetSdkVersions>
            <version supportsBarrels="false">1.2.0</version>
            <version supportsBarrels="false">1.3.0</version>
            <version supportsBarrels="true">1.4.0</version>
            <version supportsBarrels="true">1.5.0</version>
            <version supportsBarrels="false">2.1.0</version>
            <version supportsBarrels="false">2.2.0</version>
            <version supportsBarrels="false">2.3.0</version>
            <version supportsBarrels="true">2.4.0</version>
            <version supportsBarrels="true">3.0.0</version>
            <version supportsBarrels="true">3.1.0</version>
            <version supportsBarrels="true">3.2.0</version>
            <version supportsBarrels="true">3.3.0</version>
            <version supportsBarrels="true">3.4.0</version>
            <version supportsBarrels="true">4.0.0</version>
            <version supportsBarrels="true">4.1.0</version>
            <version supportsBarrels="true">4.2.0</version>
        </targetSdkVersions>
    

    Note that the tag is called targetSdkVersions but it really refers to CIQ API versions. (There was a time when the SDK and API versions were identical/correlated. That's also why the property that is now called minApiLevel in manifest.xml used to be called minSdkVersion.)

    (despite the fact that the highest version here is 4.2.0, SDK 6.4.0 will still build for CIQ 5.0.0, which is the bug I was referring to before. It seems that it doesn't really look at this list and simply assumes that the SDK version only needs to be greater or equal to the CIQ version)

    e.g. 7.1.0 - 7.2.1

    (support for CIQ 5.0.0 added)

    <targetSdkVersions>
            <version supportsBarrels="false">1.2.0</version>
            <version supportsBarrels="false">1.3.0</version>
            <version supportsBarrels="true">1.4.0</version>
            <version supportsBarrels="true">1.5.0</version>
            <version supportsBarrels="false">2.1.0</version>
            <version supportsBarrels="false">2.2.0</version>
            <version supportsBarrels="false">2.3.0</version>
            <version supportsBarrels="true">2.4.0</version>
            <version supportsBarrels="true">3.0.0</version>
            <version supportsBarrels="true">3.1.0</version>
            <version supportsBarrels="true">3.2.0</version>
            <version supportsBarrels="true">3.3.0</version>
            <version supportsBarrels="true">3.4.0</version>
            <version supportsBarrels="true">4.0.0</version>
            <version supportsBarrels="true">4.1.0</version>
            <version supportsBarrels="true">4.2.0</version>
            <version supportsBarrels="true">5.0.0</version>
        </targetSdkVersions>

    (SDKs 7.1.x have a bug where they will build for CIQ 5.0.1 even though they're not supposed. The compiler check for CIQ API compatibility was fixed in SDK 7.2.x)

    e.g. 7.3.0 - 7.4.3

    (support for CIQ 5.0.1 added)

    <targetSdkVersions>
            <version supportsBarrels="false">1.2.0</version>
            <version supportsBarrels="false">1.3.0</version>
            <version supportsBarrels="true">1.4.0</version>
            <version supportsBarrels="true">1.5.0</version>
            <version supportsBarrels="false">2.1.0</version>
            <version supportsBarrels="false">2.2.0</version>
            <version supportsBarrels="false">2.3.0</version>
            <version supportsBarrels="true">2.4.0</version>
            <version supportsBarrels="true">3.0.0</version>
            <version supportsBarrels="true">3.1.0</version>
            <version supportsBarrels="true">3.2.0</version>
            <version supportsBarrels="true">3.3.0</version>
            <version supportsBarrels="true">3.4.0</version>
            <version supportsBarrels="true">4.0.0</version>
            <version supportsBarrels="true">4.1.0</version>
            <version supportsBarrels="true">4.2.0</version>
            <version supportsBarrels="true">5.0.0</version>
            <version supportsBarrels="true">5.0.1</version>
        </targetSdkVersions>

    e.g. 8.0.0 beta (support for CIQ 5.1.0 added)

        <targetSdkVersions>
            <version supportsBarrels="false" systemLevel="1">1.2.0</version>
            <version supportsBarrels="false" systemLevel="1">1.3.0</version>
            <version supportsBarrels="true" systemLevel="1">1.4.0</version>
            <version supportsBarrels="true" systemLevel="1">1.5.0</version>
            <version supportsBarrels="false" systemLevel="2">2.1.0</version>
            <version supportsBarrels="false" systemLevel="2">2.2.0</version>
            <version supportsBarrels="false" systemLevel="2">2.3.0</version>
            <version supportsBarrels="true" systemLevel="2">2.4.0</version>
            <version supportsBarrels="true" systemLevel="3">3.0.0</version>
            <version supportsBarrels="true" systemLevel="3">3.1.0</version>
            <version supportsBarrels="true" systemLevel="4">3.2.0</version>
            <version supportsBarrels="true" systemLevel="5">3.3.0</version>
            <version supportsBarrels="true" systemLevel="6">3.4.0</version>
            <version supportsBarrels="true" systemLevel="4">4.0.0</version>
            <version supportsBarrels="true" systemLevel="5">4.1.0</version>
            <version supportsBarrels="true" systemLevel="6">4.2.0</version>
            <version supportsBarrels="true" systemLevel="7">5.0.0</version>
            <version supportsBarrels="true" systemLevel="7">5.0.1</version>
            <version supportsBarrels="true" systemLevel="8">5.1.0</version>
        </targetSdkVersions>

    I noticed that info about system levels was added here too, which is cool.

    TL;DR If I really wanted to know which compiler/SDK supports which CIQ versions, I would look at compilerinfo.xml in the SDK folder. All of the compilers from 7.2 and higher should be enforcing these versions as well (meaning that if you try to build for a CIQ version that isn't on the list, the compiler should give you an error.)

  • In my opinion if your don't have to use the newest SDK use that you tested your apps, especially that usually apps built with the newer sdk consume more memory... The only reason to use the newest SDK is the newest devices

      this comment is another example of why I think the old SDKs should be updated so that the compiler CIQ API version compatibility checks are fixed, meaning the old compilers should refuse to build for devices which have a too-new CIQ API.

    To be clear, today SDK 6.4.0 (for example) will build for any CIQ 5.* device (including FR955, released 3 years ago, so it's not exactly the "newest device"), but I think most of us agree that it should not, bc fr955 is now configured to have CIQ 5.0.0, and building with an old SDK will cause issues with CIQ 5.x (in the general case).

    As I mentioned in this bug report, I believe the problem is that the compiler in older SDKs (prior to 7.2.x) is implemented such that the API version compatibility check mistakenly assumes that if the SDK is version X, then it supports all CIQ API levels <= X. This may have been true a long time ago, but obviously hasn't been true for a long time.

    Evidence for my guess is:

    - if you try to build for a CIQ 5.* device with a 4.* SDK, the compiler returns an error that the device isn't supported (correct), but says that you need a 5.* SDK to build for that device (clearly wrong).

    To be clear, if you try to build for a CIQ 5.0.0 device, it says you need SDK 5.0.0 or higher, and if you try to build for a CIQ 5.0.1 device, it says you need CIQ 5.0.1 or higher. To me this is a very clear sign that the compiler is conflating SDK version and API version support. I'm sure if I edited the device file to indicate a connectIqApiVersion of 9.9.9, the compiler would say that SDK 9.9.9 would be required.

    EDIT: I actually did this test. I edited fr955/compiler.json so the connectIqVersion for the sole part number was 9.9.9 and tried to build with SDK 7.1.1. I got the following error message:

    > ERROR: Device 'fr955' requires an SDK version of 9.9.9 or greater to be compiled. The current SDK version is 7.1.1. Update your SDK using the Connect IQ SDK Manager.

    Again, this is wrong because we all know that the SDK version number is no longer equal to its max supported CIQ API version. (e.g. SDK 6.4.0 does not support CIQ 5.0.0)

    - if you try to build for a CIQ 5.* device with a 6.* SDK, the compiler happily builds without error, which is also clearly wrong. (As we all know, 6.* SDKs came out long before before CIQ 5.)

    I'm not throwing shade at anyone here, only pointing out that devs will obviously continue to use old SDKs, either bc:

    - (new devs) they don't know old SDKs are incompatible with CIQ 5.*

    or

    - (established devs) they don't believe old SDKs are (generally) incompatible with CIQ 5.*

    This issue just keeps coming up over and over again (like a lot of CIQ-related stuff).

  • even you change versions in json configuration

    The problem is even if you change the connectIqVersion in compiler.json, you can only trick the store into letting you load the app onto devices with older CIQ versions. You can't prevent your users from updating to newer CIQ versions which may be incompatible with old SDKs.

    So yeah, even though fr955 is now configured with connectIqVersion = 5.0.0, for example, you could edit compiler.json to change the version to 4.x if you want, and build with an old SDK, if you want (*).

    (* I'm just assuming this is what you're talking about, given your other statement: "The new SDK often requires the newest firmware for device and it means that your app will be unavailable for anyone who doesn't update firmware (e.g. today's problem with gps and restarting devices, draining battery etc.). The same problem will be with APAC devices where new version are publishining months later than wordwide.")

    That won't prevent users from updating their fr955 devices to CIQ 5 (most probably already did), which means your app may crash on those devices, if you built with a too-old SDK.

    That's obviously the reason (or one of the reasons) that the store won't let you install apps on a device that has a lower connectIqVersion than the one specified in compiler.

    The other problem here (I'm guessing) is you would also have to change the firmwareVersion value in compiler.json, which means you would (probably) have to know which old firmware version corresponds to the desired old CIQ version, for every device you care about. Even if you pull this off successfully, my point above still stands: you cannot prevent users from updating their firmware.

  • Seems this was caused by a corrupt CPE file that went out to a bunch of different devices.

    "To resolve this, press and hold the power button until the device turns off, then power it back on, and sync with the Garmin Connect app or Garmin Express.  If this does not resolve your issue, please click here for more information."