You are reading a single comment by @ChristianW and its replies. Click here to read the full conversation.
  • I had some similar issues here http://forum.espruino.com/conversations/­297205/

    Have looked at it again and have a 100% reproduction procedure:

    1. Setup WebIDE:

    • Reset before send [x] enabled
    • Save on send [yes, even after reset]

    2. copy into code pane (RHS) and click [^Send]

    setInterval(()=>{
      digitalPulse(LED1, 1, 100);
    }, 500 );
    

    Left console shows:

    [LOGO]
    1v90.5 Copyright 2016 G.Williams
    >Erasing Flash.....
    Writing...
    Compressed 32000 bytes to 66
    Checking...
    Done!
    =undefined
    Loading 66 bytes from flash...
    

    Result: red LED is flashing, dump shows this:

    >dump()
    setInterval(function (undefined) {digitalPulse(LED1, 1, 100);}, 500);
    // Code saved with E.setBootCode
    setInterval(()=>{
      digitalPulse(LED1, 1, 100);
    }, 500 );
    =undefined
    

    3. try reset(), but no effect: code is still there, LED is flashing

    >reset()
    =undefined
    [LOGO]
     1v90.5 Copyright 2016 G.Williams
    >dump()
    setInterval(function (undefined) {digitalPulse(LED1, 1, 100);}, 500);
    digitalWrite(D5, 1);
    // Code saved with E.setBootCode
    setInterval(()=>{
      digitalPulse(LED1, 1, 100);
    }, 500 );
    =undefined
    

    4. change code on the RHS pane to something trivial and click [^Send] again

    var x;
    

    Result some death-loop with corrupt data:

    >Erasing Flash.....
    Writing...
    Compressed 32000 bytes to 15
    Checking...
    Done!
    Loading 15 bytes from flash...
    Uncaught SyntaxError: Got ?[255] expected EOF
     at line 1 col 1
    ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
    ^
    in function called from system
    >
    =undefined
    Uncaught SyntaxError: Got ?[255] expected EOF
     at line 1 col 1
    ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
    

    (tried on two different pucks now)
    Maybe someone else can test and confirm this.

About

Avatar for ChristianW @ChristianW started