• Sun 2019.11.10

    Hello @user104751

    While I don't have a definitive response just yet, I did notice in L#13 that variable 'a' doesn't appear to be defined. What is that line supposed to do? (EDIT: see edit pp below)

    ref: https://www.w3schools.com/jsref/jsref_ma­p.asp
    'Note: map() does not execute the function for array elements without values.'

    https://developer.mozilla.org/en-US/docs­/Web/JavaScript/Reference/Functions/Arro­w_functions
    https://codeburst.io/javascript-arrow-fu­nctions-for-beginners-926947fc0cdc

    Is it possible that 'a' is defined in a separate module?

    EDIT:
    After re-reading the definition for map() it's argument *is* the arrow function defined there. So it isn't necessary to define 'a' using the 'var' keyword
    but, . . . if the contents passed to the map() function are undefined or null still might be throwing an error as indicated in the note above just below the ref link

    If 'a' becomes undefined might be a possible reason. One could wrap the guts of the setInterval function with a try/catch block to see if any errors could be trapped that are just bubbling up and missed.

    Is L#17 setInterval() intended to execute five times a second?

    Has process.memory() been run and how much free memory does remain. Is it possible the above snippet is using and not freeing all available memory?



    Just found this-Another user had the same error recently using setWatch(). See end of post:

    http://forum.espruino.com/comments/14882­864/

    Let's start with the basics, what is the result of process.env? Please post for flashed version verification.

About

Avatar for Robin @Robin started