• I'm more and more running into strange problems sending code to Espruino.
    Main part of my app is a module for TFT Display and Charting.
    Problems I found are strange errormesssages or even stop/crashes.
    2 easy to follow examples are, problems seem to appear in large sources(900 block used) only.

    • in a module 2 similiar command crash the execution

      x = Math.round(x); //works fine
      
      x = Math.round(x);  //crashes with strange errormessage
      y = Math.round(y);  // replacing this by a 2nd x =Math.round(x) also crashed
      
    • 2nd problem is a simple definition of an object which stops everything if writing in 2 lines

      wnds = [{left:50,top:100,right:150,bottom:200},­{left:0,top:200,right:239,bottom:319}]; //this works
      
      wnds = [{left:50,top:100,right:150,bottom:200},­
            {left:0,top:200,right:239,bottom:319}]; // this one stops without any message
      

    Other strange behaviour could not be located (yet), I got errors on commented code to give an example. Uncommenting these lines moved the error message to another line, etc. etc.

    I've been out of business due to a surgery for some weeks now, so I cannot give more information for when problems started.

  • Hi. Have you tried the latest version of the Web IDE?

    The issue may be if you have a very big function, every new line causes Espruino to scan over the whole function to date in order to see if it should execute the line or should just continue reading - that causes a delay, and sometimes causes the PC to 'give up' sending data to Espruino.

    A change around 1-2 weeks ago in the Web IDE made the Web IDE do the execution check for each newline, and so takes some of the load off of Espruino itself.

  • Just tried actual IDE from GitHub.
    Problems changed to other behaviour, thats it.
    Same source, I sent succesful with previous version now chrashes.
    Does not respond to anything now, even Ctrl-c is ignored.
    I have to disconnect, reconnect to get connected.
    Sometimes I get an errormessage which seems to show code is missing.
    Looks like start of a function and next something from middle of another function.
    Tested with and without throttle mode.
    BTW, still have the starting problem where board recognition sometimes does not work.

  • Can you send me a full file that actually exhibits this problem?

    My guess is, as with the problems before, the echo(1) is getting lost. Try:

    [Ctrl+C] echo(1) [Enter]

    and it will probably bring it back.

  • I just found an interesting problem - the parsing of long strings (like those found in large modules) was taking a huge amount of time. I've just fixed this - build 3a24a29d4f118388cb34ddda78eeec0cb160db82­ (when it's done).

    Can you give it a try? I think this might solve your problems!

  • Great, I will check this weekend.

  • Weekend came sooner than expected ;-)
    Just tested with new build and it works fine !!!
    Great job, thanks a lot and have a nice weekend.

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview
About

strange errors/behaviours on "send to Espruino"

Posted by Avatar for JumJum @JumJum

Actions