Yesterday I released my very first Garmin watch-face on the CIQ store (Digital Simplicity, https://apps.garmin.com/en-US/apps/97b91745-9287-421d-aa8a-abb437e08eea, the code is open-source: https://github.com/kelnage/digital-simplicity). I'd been able to test my watch-face on my Fenix 5+ and a Forerunner 645 prior to releasing it more widely - but once it was released to the world, I quickly started getting informed by some users it was crashing on the Fenix 5X (but not the Fenix 5).
I eventually managed to get one of these users to send me the contents of their CIQ_LOG.YAML (or YML as they had), and the relevant part of the file to my app was as follows:
Error: Symbol Not Found Error Details: 'Failed invoking <symbol>' Time: 2019-04-26T00:30:10Z Part-Number: 006-B2604-00 Firmware-Version: '13.00' Language-Code: eng ConnectIQ-Version: 3.0.10 Store-Id: 97b91745-9287-421d-aa8a-abb437e08eea Store-Version: 3 Filename: 94Q02834 Appname: Digital Simplicity Stack: - pc: 0x10001c75 - pc: 0x10001db1
I know from developing the app that this means I am referring to a symbol that does not exist for a specific object - but that debug message is not particularly helpful. Worse, I have been trying to recreate this crash in the simulator, following all of the steps described by my users, and I'm not able to trigger this error myself.
Outside of sending these users a special debug version that does a println before every call to a function, or buying a Fenix 5X to test on (hah, sorry Garmin - but no), is there any sane way I can debug this myself? Can I convert (what I assume is) a program counter in to a line number? One user has seemed to suggest that the very first version I released did not crash in this way - and fortunately, I tag my releases, so I have been trying to bisect the bug using git (https://github.com/kelnage/digital-simplicity/compare/v1.0.0...v1.1.1) - but really nothing is coming to mind!
This was resolved by checking whether the module Toybox.Position has the attribute :getInfo.