FR970 - Watch Face - Undefined symbol ':AlwaysOnDisplay' detected.

Hello.

I try to add FR970 to my Watch Face.

It is working with FR965 Amoled device using same resources-round-454x454 definitions.

But when I try to do a simulation with FR970, I get:

ERROR: fr970: c:\Users\prenard\SynologyDrive\prenard\SynologyDrive\Private\Data\VisualStudioCode\data\Garmin-CIQ\Cristal\bin\gen\006-B4565-00\source\Rez.mcgen:53,12: Undefined symbol ':AlwaysOnDisplay' detected.

Very strange...

Any help would be appreciated...

Thanks

  • Are your SDK versions and the devices up-to-date? What is the actual code in that line?

  • Code is:

    function AlwaysOn(dc as Graphics.Dc) as Array<WatchUi.Drawable> {
    var rez_cmp_local_custom_drawable_AlwaysOnDisplay = new AlwaysOnDisplay({:dataY=>258, :identifier=>"AlwaysOnDisplay", :burnInYOffsets=>[-60, -30, 30, 60], :lineY=>230, :adjustY=>-4, :timeY=>179, :lineWidth=>230, :dataLeft=>105});

    return [rez_cmp_local_custom_drawable_AlwaysOnDisplay] as Array<WatchUi.Drawable>;
    }

  • Which begs the question: what is AlwaysOnDisplay? Looks like it's not defined

  • Not to state the obvious but:

    - Rez.mcgen is obviously code that is auto-generated from the resource xml (even though that's where the error message points to, it's almost certainly not where the actual source of the error is)

    - AlwaysOnDisplay is obviously a custom drawable class

    - you didn't write the code yourself (based on your description of the error, plus the previous 2 points), despite the fact that you describe this as "my" watch face.

    If you had written the code and understood it, you would realize that:

    - "Undefined symbol ':AlwaysOnDisplay'" is not helpful to us at all if we can't see the code. ("AlwaysOnDisplay" is a symbol/class defined in *your* code, it's not a standard CIQ thing)

    - that the relevant code is not just Rez.mcgen, but the associated resource.xml file, the MC file that contains the definition of the AlwaysOnDisplay class, as well as any relevant code in monkey.jungle that possibly controls whether AlwaysOnDisplay is included in a given build.

    I'm guessing the project in question is:

    https://github.com/warmsound/crystal-face/ 

    Ofc it's obvious now that you've given a code snippet, but we could've guessed from the project name in your error message: "Cristal" 

    And the resource xml in question is this:

    https://github.com/warmsound/crystal-face/blob/bcc340484bd2a3a09f13b22a2d0d6dae3b4de9c7/resources-round-454x454/layouts/layout.xml#L66-L77 

    I'm guessing that you cloned the repo and tried to add support for fr970, but it doesn't quite work, right?

    If you are asking if for help, it would be nice to at least provide the minimum information that would be necessary for others to help you. Like being transparent and telling us the true source of the code would've been a great help.

    I was able to easily recreate your problem by cloning the repo and adding the following line to <iq:products> in manifest.xml:

    <iq:product id="fr970"/>

    I can tell you that:

    - The AlwaysOnDisplay class is defined in the alwayson-source/AlwaysOnDisplay.mc source file. This file is conditionally included in the build via monkey.jungle, for devices which...have an always on display (AMOLED)

    - The fix for your problem is to add the following line to monkey.jungle.

    fr970.sourcePath = $(fr970.sourcePath);always-on-source

    If you had been honest and transparent up front, you could've gotten an answer immediately.

    Very strange...

    Strange part is you trying to pass off the work of others - which you don't understand - as your own, then acting shocked when you make changes and it doesn't build. Would've been far more honest to say something like: "I modded this open-source project and it doesn't build. Please help"

    Even if this is your own watch face, clearly you have based it on the code of others, which you obviously do not understand.

    By trying to pretend you wrote the code yourself, it only made it harder for people to help you.

  • Which begs the question: what is AlwaysOnDisplay? Looks like it's not defined

    They don't know because it's not their code

  • What bothers me more is that there are people who don't know how to ask a meaningful question (in general in a computer programming related forum)

    I guess some of them because of what you described (they don't know what they ask about and either didn't even bother to try to understand or didn't try to fix the issue themselves)

    Others clearly know how to code and write their own code but are in some "concentration" mode and think that everyone else reading their post sees, knows, thinks the same they do, so they only post some small part of the code that doesn't give enough context.

    Maybe we should (again) have some pinned thread for newcomers. I'd include netiquet or link to some general "how to ask a question in a forum to increase your chances to get an answer" page. I'd also include links to basic programming 101 for people that have questions that are borderline between new to Monkey C and new to any programming language.

  • What bothers me more is that there are people who don't know how to ask a meaningful question (in general in a computer programming related forum)

    Yes, that bothers me too (I touched on it a bit, above).

    But in this case, simply being honest about the source of the code would've solved the problem.

    In general, I think the "bad questions" thing is a problem, and it's partly caused by people being unaware (or dishonest) about the limits of their own knowledge or competence.

    Therefore if something doesn't work, it's automatically assumed to be a bug in CIQ / Garmin, or it's otherwise unfathomable ("very strange"). In fact it's this very common phenomenon which contributes to the standard assumption that every bug report is automatically user error by default (which is equally annoying when you are the one asking the question).

    Regardless of the reason for a bad question, the outcome is the same: people trying to answer the question have to do a bunch of work to either:

    - coax the details out of of the asker

    - figure out the details for themselves

    Maybe we should (again) have some pinned thread for newcomers. I'd include netiquet or link to some general "how to ask a question in a forum to increase your chances to get an answer" page.

    People have been trying to do this for decades, I think. 

    Good luck with that, on a forum where the user experience is so bad that people often create a new thread when trying to reply to an existing support thread (this includes people who have been posting in the dev forums for years). (The UX issue was reported to Garmin but they only fixed one aspect of it.)