ERA: What does "Data Field Is Not Running" mean as an error?

I mean, obviously, it means that the data field is not running... but if so why is it trying to evaluate code and so generating an error report?

Does that mean something has crashed at an earlier point?

Any pointers on what that might be and how to find out anything else about it?

Thanks,

Gaius

PS: Lest I'm being too obscure, this is based on an error log I can see in the ERA tool. It gives me an occasional error on specific fields on a line that appears to be calling DataField.getObscurityFlags()!

  • Is your app a data field app (i.e., is the type attribute in manifest.xml set to "datafield")? Is your code calling getObscurityFlags()?

  • Yes, it is a data field, yes it is calling getObscurityFlags() on line 112, just like the error report.

  • I guess the error is coming from the fact that the DataField class is being instantiated and there's some weird check in there..

    I was also getting this error in several of my data fields (never experienced it personally), to work around it I have removed all calls to getObscurityFlags() and now check the height of the dc instead (which works for my use case to check if the data field is in full screen mode) 

  • I know 3 years passed, but it looks like the same bug still happens. I just got an error from fenix5:

    Error Name: Data Field Is Not Running
    Occurrences: 3
    First Occurrence: 2022-10-05
    Last Occurrence: 2022-10-06
    Devices:
    fēnix® 5X Plus: 18.00
    App Versions: 2.0.0
    Languages: rus
    Backtrace:
    ExtHRMField.onUpdate:218

    line 218 is:

    var obscurityFlags = getObscurityFlags();
    and my class extends WatchUI.DataField.

    So how can onUpdate be called if the DF is not running?
  • maybe in 5X getObscurityFlags() runs well, as should,  in on layout :-)

    5X is strange watch and it's very strange problems

  • From the docs: "Use of this method is only valid during the call to onUpdate()."

  • I know but it runs usually. f5X has bug in both.

    but maybe you can call getObscurityFlags() after onTimerStart()

  • This has always been a bogus error and can be ignored.  I suspect a fix never made it into older devices before they stopped getting FW updates.

    As far as getObscurityFlags, the API doc is wrong.

    If you use Garmin's project template for a complex DF, it's called in onLayout.  I just used the 4.1.5 template a few minutes ago:


        function onLayout(dc as Dc) as Void {
            var obscurityFlags = DataField.getObscurityFlags();
    
            // Top left quadrant so we'll use the top left layout
            if (obscurityFlags == (OBSCURE_TOP | OBSCURE_LEFT)) {
                View.setLayout(Rez.Layouts.TopLeftLayout(dc));
    
            // Top right quadrant so we'll use the top right layout
            } else if (obscurityFlags == (OBSCURE_TOP | OBSCURE_RIGHT)) {
                View.setLayout(Rez.Layouts.TopRightLayout(dc));
    
            // Bottom left quadrant so we'll use the bottom left layout
            } else if (obscurityFlags == (OBSCURE_BOTTOM | OBSCURE_LEFT)) {
                View.setLayout(Rez.Layouts.BottomLeftLayout(dc));
            ...
        }

  • But unfortunately I've reported bug in f5X (and v3) when getObscurityFlags is in onLayout (as also put example from template). So if doc is bugged so for f5X/v3 there is the bug in SW.

    https://forums.garmin.com/developer/connect-iq/i/bug-reports/error-name-data-field-is-not-running

  • Error Name: Data Field Is Not Running
    Occurrences: 1
    First Occurrence: 2022-10-25
    Last Occurrence: 2022-10-25
    Devices:
        vívoactive® 4: 7.20
    App Versions: 2.1.0
    Languages: eng
    Backtrace:
        MyDataField.onUpdate:218

    I just got this now.

    according to your experience does it matter whether we use it in onUpdate or onLayout?

    I wanted to use it in onLayout because that would make more sense, the reason I ended up using it in onUpdate is that in the simulator when you have multi-field layouts then they are not really called in a logical order (IMHO).