Help testing colorized datafield

Former Member
Former Member
Hello,

I'm developing a custom datafield where I plan on changing the text or background color depending on various criteria. The datafield is dynamically adjusting to all the layouts on the Fenix 3 and the 920 XT.

The datafield works in the simulator, but when I load it on my Fenix 3, all I see is the ConnectIQ logo with a yellow exclamation mark...

If anyone could help me test the datafield by sideloading the .prg file on their device, I would be very grateful :)

Zipped .prg files:
920 XT Custom DataField
Fenix 3 Custom DataField

-Torstein
  • I can take a peek when I get home.
  • Yeah, it crashes for me on a 920. I'm not sure what is going wrong, but I'm seeing this in the Garmin/APPS/LOGS/CIQ_LOG.TXT.

    @PC = 0x10000021
    TVM ERROR:
    Unexpected Type Error
    Failed invoking <symbol>

    @PC = 0x10000AB1
    @PC = 0x10000BA1
    TVM ERROR:
    Unexpected Type Error
    Failed invoking <symbol>
  • Former Member
    Former Member over 10 years ago
    Thank you Travis, that helps. There is no logging on the Fenix 3, so I'm practically flying blind :)
    (The datafield doesn't produce any errors in the simulator)

    -Torstein
  • Former Member
    Former Member over 10 years ago
    Based on the context an Unexpected Type Error almost certainly means one of the values you are using is null on the device but initialized to a value in the simulator. Do you have null checks on all the values you are using for your calculation?

    Also, do you have a <prg_name>.txt and CIQ_LOG.txt file in your GARMIN/APPS/LOGS folder on your fenix 3? Connect IQ errors will be printed to CIQ_LOG.txt and Sys.println() calls will print to the other file.
  • Former Member
    Former Member over 10 years ago
    I have to admit I don't have null checks on all values. The lame excuse is that I wanted to minimize the app footprint.
    I also assumed (yes, I know, assumptions is the... and so on) that the simulator and the watch behaved similarly with regard to variable initialization.
    I will add more null checks for testing from now on :)

    There are no log files at all in the LOGS folder on my fenix 3 (Firmware 3.0). I made double sure there was Sys.println() calls in the last app i loaded on it.
  • Former Member
    Former Member over 10 years ago
    We have issues open to improve the simulator in terms of making it behave closer to the devices. I believe this has already been noted but I'll look through them. The best practice right now is to null check everything.

    The log files shouldn't be there initially. You will have to create the log files on your own. Once you create them it should start logging correctly.
  • Former Member
    Former Member over 10 years ago
    Thanks, Ken!

    Logging works now, but it slowed down the watch significantly. Guess it is a good idea to delete the logs after a debugging session.

    I must say, after a decade as a Java Enterprise programmer, getting more and more more frustrated with the increased complexity of that environment, it is very refreshing coding in Monkey C :)
  • Former Member
    Former Member over 10 years ago
    The print log will cause significant slow downs if you have a lot of prints in your code. For best results, try to limit your print calls only to what you need when using this log, and avoid using it if you only need the crash log.

    The file will auto archive, when it reaches 10KB, and the old archive will be deleted when that happens, so you shouldn't need to delete the logs until you are ready to disable the feature.
  • I must say, after a decade as a Java Enterprise programmer, getting more and more more frustrated with the increased complexity of that environment, it is very refreshing coding in Monkey C :)


    +1

    There are things that I think are a little too simple, but the hole experience is very nice indeed...