You are reading a single comment by @jtq and its replies. Click here to read the full conversation.
  • Hi @Gordon - thanks for your pointers.

    To answer your questions:

    1. Both my Picos are running v1.91 of the firmware (I believe the latest version as of posting)
    2. Pressing Ctrl-C does not break out of the unresponsive state, and even clicking to disconnect the Web IDE doesn't work (or at least, takes so long to respond that it appears to be unresponsive). The only thing I've found that works is power-cycling the Pico, at which point the Web IDE auto-disconnects. When the Pico is unresponsive the right hand side of the web IDE works as normal, but the left hand side doesn't register any keypresses, and obviously flashing the chip/clicking disconnect does nothing.

    I took on board what you said about implicit redeclarations/copies of variables (dammit - too long writing JS and too many years since I wrote any C...), so I tried replacing the single concatenation-plus-print line with two separate prints instead... and suddenly the sending Pico seems to be pretty consistently completing the transfer without crashing, so perhaps my problem was indeed a memory issue caused by marshalling the data in memory, rather than a problem punting the data through USART as I suspected (now my receiving Pico's crashing instead, but I suspect it's probably a similar RAM-based problem on that end, too - needs further investigating).

    I didn't see any OOM error messages anywhere and the issue definitely wasn't handled "gracefully" in the REPL/Web IDE, so I'll keep investigating with my old (crashy) code, and I'll see if I can produce a minimal test-case for you in the IDE that reliably crashes the Pico, even if it does just turn out to be an OOM problem.

    Thanks for the pointer about E.getErrorFlags() - that and E.getSizeOf() look like a couple of amazingly useful additions to my debugging toolbox, so thanks again for pointing them out to me!

    I'll keep investigating given what you've told me, and I'll report back anything of interest I find in this thread. Thanks again!

About

Avatar for jtq @jtq started