Skip to content

When code crashes, editor exits erasing the debug window contents - making debuging very difficult #10487

@Hagtronics

Description

@Hagtronics

CircuitPython version and board name

Raspberry Pi Pico, Circuit Python 9.2.8, Mu Editor 1.2

Code/REPL

(See code in description)

Behavior

Editor crashes, erasing the serial window and it's debug messages.

Description

Found that these line of code will work,
import board
import rotaryio
tuning = rotaryio.IncrementalEncoder(board.GP1, board.GP2, divisor=4)

But these line cause everything to crash,
import board
import rotaryio
tuning = rotaryio.IncrementalEncoder(board.GP1, board.GP11, divisor=4)

Fist there are some debug messages which are quickly gone as the serial window closes - it seems this error hard resets the PICO and USB is lost. Then the device / editor is in safe mode that can only be exited by fixing the code.py file on the Pico, exiting the editor, unplugging the pico, then replugging the Pico, then restarting the editor.

It took a long time to finally see the error message 'flash by' before disappearing for me to see the issue. The root cause is the encoder pins must be sequential.....

If possible, it would be really helpful to log the last load messages from the serial window somewhere (I could not find them, if they are kept).

-OR- Other syntax errors seem to just stop the running program and I can fix them, for some reason this particular error crashes the whole shebang. Perhaps the error level/severity can be lowered so the editor does not crash. Perhaps the root cause is in the rotaryio library.

Thanks for your time and effort on the editor.

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy