The Sim does not report the location of the error

The error reporting in the Sim does not report the location of the error:

On the sim I get:
Failed invoking <symbol>
Unexpected Type Error

No reference to module or line number.

Running the same (faulty) code on the device I get
Error: Unexpected Type Error
Details: 'Failed invoking <symbol>'
Time: 2018-12-31T22:00:41Z
Part-Number: 006-B2697-00
Firmware-Version: '12.00'
Language-Code: eng
ConnectIQ-Version: 3.0.7
Filename: QS_RACE
Appname: QsRace
Stack:
- pc: 0x100060ed
File: /Users/[my username}/Documents/watchApp/sharedCode/sharedCode.mc
Line: 75
...


Makes debugging a real pain!

Sim: SDK 3.0.7, Eclipse Oxygen 3a, macOS Mojave 10.14.2
Device: fenix5 S/W Version 12

[EDIT]
And there is nothing in the Sim's APP LOGS (/private/var/folders/ly/qnh242bx7z98fz51w0yvjvjm0000gn/T/GARMIN/APPS/LOGS)
  • jim_m_58 Right, like I mentioned, I tried doing it that way and it wasn't worth it when I wanted to rapidly iterate through 6-10 different families after changing one thing and wanting to test it.

    Run configs are simply not worth it for me when I have more than 2-3 different targets to test.

    Once again it's the case of:
    - That's the way it is, deal with it
    or
    - It works for me!

    Maybe we're all different and can tolerate different things but that doesn't mean the UX can't be improved. For example, it would be a very simple change to for the "default run config" to remember the last device selected. A less simple change would be for run configs to allow the device to be unspecified, so you could have your own "on-the-fly run config" where you can choose a different device infrequently.

    If I can save a few clicks and a few seconds each time I run an app, that would make me personally slightly happier to (try to) develop Garmin apps. I can't speak for anyone else.

    I could give examples at my day job IRL where things have gone unfixed for 5+ years or more because it "only" wasted 30 seconds every time you filled out a bug report.

    Well guess what happened to those 30 seconds when you multiplied it by all those years and all those devs. Guess what happened to that slight feeling of aggravation when you multiplied it by 365 * 5 days.

    Same kind of attitude which is fine. I'm not paying Garmin to fix things, but then again Garmin isn't paying me to find actual bugs every time I look at something. Which is fine, since I'm doing it voluntarily.

    EDIT: To be clear, I'm not demanding anything. I just wanted to say (for the second time), that it would be "nice" if the Run App UX was a little more streamlined and convenient. Because as devs, we are pressing that Run button a lot.

    If it's never gonna change, that's fine. I'll either keep trying to develop Garmin apps or not, but either way nobody will notice anyway.

    EDIT2: What's a far more serious problem for me is that sometimes:
    - Sending settings to a data field without killing the app means that the settings are reset to default
    OR
    - Sending settings at all doesn't work

    I don't have a reliable test case for either of those, but it's happened enough times that I would just hardcode test properties in the XML.
  • If you feel like you're doing the same manual testing over and over you should write run no evil tests imho.

    as for the run config i only define one for running apps and change the app/target as i move through my projects... I manually test my code typically only on 1 device: the code is either device specific or the code is generic. Generic code should run on all devices and device specific code only runs on that device (family) and I'm confident that that code won't affect other families as that code isn't visible to them as i've jungled it out.

    I couldnt imagine defining a seperate run config target for each of my apps (I have 20 published apps and a multitude of unpublished work in progress apps...)
  • peterdedecker Great point. Yes, to be fair my unit testing is pretty abysmal. Yes, in some sense I am doing things the hard way. (Like I only recently discovered you could add multiple annotations to a symbol >_>.)

    The truth is, I have always done a lot of UI/UX, which is why unit testing is not my strength, even when I work on stuff that has no UI whatsoever. And when I change something in the UI, I prefer to test on all devices immediately, instead of waiting for a milestone and testing everything sequentially per-device.

    Maybe I'm just doing it wrong.

    But would it shock you to hear that at my day job IRL, we don't have automated unit testing? Everyone just runs unit tests by hand, and that's a whole company of devs working like that.

    Yes, some of my apps have very generic code that doesn't need to be tested on different devices or which could easily be tested with Run No Evil.

    It does get tough when you either have:
    - Visuals/input that are slightly different per-family (stopwatch example)
    - Features that are different per-family (my latest app, which has 6 tiers of features >_<). Because I just had to squeeze the most out of every platform (CIQ1/2/3 X Multisport/Non-multisport)

    I'm pretty sure I can't do a run no evil test on onUpdate() or compute(). And the way I write stuff to save memory, unfortunately I don't have a ton of pretty helper functions. For example, if I'm computing avg/min/max of a metric, that's inline in compute() because I don't want to waste a function call. In my "feature-packed" apps, I don't have any functions unless:
    - they can't be written as one-liners
    - they are called from more than one place

    That's why I posted elsewhere that I wish "full device" testing could be automated in some way. Like just to run the app/data field on X different targets, to see if it crashes on init. (Again with pushing the boundaries of memory limits >_>)

    Peter, jim_m_58 thanks for the advice anyway.

    I couldnt imagine defining a seperate run config target for each of my apps (I have 20 published apps and a multitude of unpublished work in progress apps...)


    My point exactly. But if I write apps that push the boundaries of all "families" (maybe I shouldn't), then I need 3-6 run configs for each app, minimum.

    Anyway, none of that changes my opinion that the Run App UX could be improved. To say "maybe I shouldn't be running manually so often" is valid, but somewhat tangential to the point.
  • Please correct me if I'm missing an easier way to do things.

    I don't know how everyone else does it, i can only speak for myself...

    I create a single run config and set it up for the project you're currently building/running/testing. I click the green/white arrow button to launch the app using my run config. If I want to change devices or apps, I modify that single run configuration. This minimizes the number of configurations I need to manage, and requires a bunch of clicking only when i want to change the configuration.

    Using a setup like this, it is a single click to re-launch the app, even if it is already running... which is less work than clicking through Reset All App Data and it does exactly what you want.
  • I have the same setup as travis for building/running, a run config called "run"

    for testing i have a second run config "run tests"

    this allows me to run my code and test code with nearly 1 click :)
  • Travis.ConnectIQ fair enough. I tried it that way and I didn't like it, but I guess if everyone else is happy with it, then that's what I'll have to go with.

    I tried it with just 2 or 3 run configs and I absolutely hated it every time I had to change configs. Just the way you described.

    I guess I thought that if the default run config could prompt you for a target and a custom run config could remember your last target, then it wouldn't be unreasonable to optionally have the opposite scenario: for a custom run config to prompt you and the default run config to remember.

    That way we could keep a handful of custom run configs around, and have an "on-the-fly" config that could prompt you.

    To me it just didn't make sense that as soon as you create a custom run config for convenience, then you lose the other convenience of being able to be prompted on the fly when you want to be prompted.

    But if I'm literally the only person who thinks this would be a time-saver, then I guess I'll stop asking for it.
  • I think my post has been hijacked and I'm concerned that the initial bug may be overlooked.
  • It isn't being overlooked. If you look back to your original post, you'll see it has been tagged with a JIRA ticket number (WERETECH-6590).
  • Ahh, the secret handshake. I'll keep an eye out in future. Ta.