Bizarre CIQ 1Hz watchface fenix 5X firmware bug

I just had a very strange situation going on which I thought I should report to Garmin.

I am in the middle of creating a watch face which updates every second. It is currently in a stable state, just waiting for me to have time to add a few more items to the display and decide what custom fonts I want to use etc etc. It uses a clipping region and onPartialUpdate() to update the seconds and a background service which runs every 15 minutes to obtain weather data. So, it is currently side loaded onto the watch.

About 10 minutes ago I happened to look at the watch and what I saw was very strange. It was showing the default analogue watch which is displayed when a watch face crashes, but the second hand was not moving, and overlayed on top was my clipping region with the digital seconds being updated! I captured a screen shot which I have configured as a hot key, but the image in the bitmap file shows only the analogue watch face without my seconds.

When the screenshot was complete the display went back to the analogue watch, but 5 seconds later, the second hand stopped again and the onPartialUpdate() seconds started being displayed on top again. But on the minute, when an onUpdate() ran, my full digital watch face was displayed again and it was back to normal.

But...

If I scrolled to a widget and back to the clock the analogue clock returns. But then 5 seconds later, the second hands stop moving and my digital seconds are overlayed again and the process repeats.

Even after connecting to the PC (to download the bitmap) and disconnecting again the behaviour is the same. I was able to capture this on video:

www.youtube.com/watch

I checked the watch face log file and CIQ_LOG.txt and there is nothing indicating any kind of crash or other problem going on. Other than this strange behaviour everything seems to be working normally. The watch is currently running in this state, so if anyone at garmin would like me to do anything to obtain more information I'm happy to oblige.
  • We were considering the possibility that the system did not detect the change between the two versions, but if it failed to send a completely different face, that is certainly not the issue.
    I would like to clarify that I do not think this is anything to do with the two different versions.

    When the problem first occurred, I only had a single version. I only added the second version after connecting the watch to the PC in order to save the screenshot which I had tried to take to capture evidence of the problem. So, the problem occurred prior to loading the second version which I could see running when previewing the watch faces. Please do not confuse the issue as being related to my loading an updated version since the problem was occurring before doing this.
  • Well, it was not a one off, it has happened again. And I am currently running the latest 4.12 beta with display 2.31.
  • I agree based on your report that the old prg was not related to this issue. We were considering the possibility that the system did not detect the change between the two versions, but if it failed to send a completely different face, that is certainly not the issue. Based on this, I'd say it doesn't appear it has anything to do with your application at all actually. If you don't mind sending the latest version anyway, we will have it in case we change our mind and want to investigate what it is doing. I think the device team has a couple ideas they will be looking at. If this happens again, let us know anything you can about the conditions prior to it occurring.


    It's been months I haven't coded for CIQ but now I wonder a thing after this post. Newer watches has two higher frequency processors inside. Does watchfaces and activities run on different processors or just on the same? I wonder how Garmin os and its other parts work...
  • Former Member
    Former Member
    The Device team believes they have found an issue that could cause what you are seeing, and are working on a fix now.

    FYI: The fix they are working on assumes your watchface is crashing at some point after it was loaded (but the system is not properly handling that crash and continuing to run the face). You may want to investigate the conditions that trigger the failure. I believe the only way to clear this error is to turn the device off and back on. If you send us a copy of your .prg, we may also attempt to investigate the crash.
  • I suspect you are right Brian, the watch face crashed properly today showing a Q! But, nothing was written to the LOGS/App.TXT nor to the LOGS/CIQ_LOG.TXT

    What is more, the only way to get the watch face working again is to delete the settings and data files. Strangely enough,this is the exact same behaviour I was getting from my previous downloaded watch face I was using which prompted me to develop my own. It's almost as if there is some corruption occurring getting into the data files which prevents the watch face from working.

    So, how does one go about troubleshooting a watch face which crashes but does not write any errors into either log file? Given I am seeing the same kind of symptom from two watch faces, one which I created and one which I downloaded, it makes me wonder if there is a problem with CIQ itself. Maybe if I see this again I can send you the prg file and the settings and data files so you can investigate? I was stupid enough to delete them rather than save them today.
  • Former Member
    Former Member
    I'll talk to the device team about the lack of logs. It wouldn't be overly surprising if we had an issue writing them from watchfaces. (There shouldn't be an issue, but...)

    You can certainly send the face and files if it happens again. I think the file encryption will prevent us from using the data files though. You could just send the prg any time. I'd recommend looking at the things you are saving though. If you manage to save a bad value when shutting down, it could cause a persistent crash on boot.
  • My watch face crashed again last night so I have been able to do some experimentation.

    There are no indications of a crash in either the app log file or in CIQ_LOG.TXT. The crash is caused by the data file, if I delete this watch face works again, if I put it back, it crashes again.

    If I build a version of my watch face which does something stupid with the value returned by getProperties to deliberately cause the watch face to crash, I still do see an error in any log file so there does appear to be an issue of writing crash errors to the logs.

    But, if I build a version of the watch face which reads no properties at all, it still crashes. Therefore, to me it would appear that this is some kind of corruption at a raw data level, rather than in my CIQ data. When I have no code reading properties, the watch face still crashes when the data file exists even though I am reading nothing from it. But if I then simply remove the data file it works and does not crash. Therefore how can it be my code which is crashing? It seems the watch face crashes outside of my code during initialisation associate with reading the data file.

    I also tried loading the data file into the simulator directory, but the simulator seems to ignore and deletes the file, even if I run the version of the code which loads properties.

    I have saved the prg, str and set files and will send them into the CIQ email address. Hopefully this will help determine what the problem is since I am pretty sure it's not in my code. This is also similar to behaviour I am seeing from other watch faces I have downloaded. They work for a while and then crash on startup until I delete the data file.

    In the mean time, if you have any ideas on how I can troubleshoot this further, please let me know. This is kind of troubleshooting, reading core files interpreting log files etc is kind of what I do as a day job so I should have some idea what I am doing.
  • Former Member
    Former Member
    I suspect something is going wrong at the file decryption stage. Does the face still run in the watchface selection preview screen when it is in this state?

    Due to the encryption of the object store, we will probably have to try to reproduce this one directly to investigate. I don't actually see your email. You might need to try sending again. You should zip up the files. I think our email filter rejects attachments with the .prg extension.
  • When in this state, the watch face does not run from the preview either. I just get the traditional Q! symbol.

    I have emailed the files zipped up. I had to rename the .prg file to .gar in order for the mail server to accept this even though it was in a zip file. You will need to re-name it back again after extraction.

    Let me know when you have this in case something else goes wrong.
  • Former Member
    Former Member
    Thanks, the email came through.