New datafield error when installed, but after restart it works

I am a rookie trying to publish a datafield to be used on cycling activities. I originally made it for my VA3, but later I clone it and modified it to use it on my Edge1000 . On the VA3, when I originally installed it, there is the exclamation mark signaling an issue. But then I close the app on the watch and open it again and after that it starts working well. On the Edge something similar happened, but instead of just closing the "Activity", I had to turn off and on the device so that it can start working.
Currently I am having both datafields just on my developer dashboard, so I may submit them for general release after I fix those kind of issues.
Any clue what I may doing wrong?
  • If you see an IQ!, your DF crashed and you should have something in \garmin\apps\logs\ciq_log.txt. If you see this with a sideload, in "build for device wizard", unckeck "Build release version", and ciq_log will show you a more detailed stack trace, but if it's a store/release build version, the <myapp>.prg.debug.xml file in the bin directory can help in sunderstanding it. See https://forums.garmin.com/forum/developers/connect-iq/1333774-reading-ciq_log-txt

    But one thing to look for in your code, is check things you get from Activity.Info (or the info passed to compute()) as some things will be null before you start recording, or even for a few seconds after recording starts. Also, not all the things in Activity.Info are available on all devices.
  • thanks! I looked into my /garmin/apps/logs and the CIQ_LOG has only one line:
    ERROR: Unexpected Type Error
    DETAILS: Failed invoking <symbol>
    STORE_ID: 5be3e2c22af2424693f705429e5e72d7
    CALLSTACK:
    @PC = 0x1000186e

    somebody understand what it tries to tell me?
  • Does this happen with a sideload? There you can use a version of the app with debug symbols and see more in the ciq_log file. If not, you can get info on what the "PC=" in yours means, using the tips in the thread I linked to in my last post.