Skip to content

RP2040 and Mu Editor cause Ctrl-C hang-ups #7183

Open
@Kriechi

Description

@Kriechi

CircuitPython version

Adafruit CircuitPython 7.3.3 on 2022-08-29; Raspberry Pi Pico with rp2040
Board ID:raspberry_pi_pico

Code/REPL

import time
print("Hello World!")

while True:
    print("foobar" * 50)
    time.sleep(1)

Behavior

Code runs and prints messages once per second as expected.

  • open the Mu Editor
  • set it to CircuitPython Mode
  • open the Serial panel
  • wait a few seconds for a few messages to appear
  • click around between the Serial panel and the code editor above
  • try to interrupt code execution by pressing Ctrl-C multiple times
  • observe that nothing happens
  • after pressing 5+ times, the macOS kernel task will eat up 100% CPU.

Interrupting the code execution is not possible in this state. I have to reset the board to bring it back. Even a soft-reload via auto-reload on USB file saving does not fix the input problem: it does reload and restart executing, but Ctrl-C is still not recognized.

Description

It is 100% reproducible for me with the Mu Editor only.

Mu Editor logs:

Starting Mu 1.1.1
2022-11-09 11:02:10,230 - root:270(run) INFO: uname_result(system='Darwin', node='147ddaa50b43.ant.amazon.com', release='21.6.0', version='Darwin Kernel Version 21.6.0: Thu Sep 29 20:12:57 PDT 2022; root:xnu-8020.240.7~1/RELEASE_X86_64', machine='x86_64', processor='i386')
2022-11-09 11:02:10,252 - root:271(run) INFO: Platform: macOS-10.16-x86_64-i386-64bit
...
2022-11-09 11:02:12,690 - mu.logic:1549(change_mode) INFO: Workspace directory: /Volumes/CIRCUITPY
2022-11-09 11:02:12,785 - mu.logic:962(restore_session) INFO: Starting with blank file.
2022-11-09 11:02:13,561 - mu.logic:747(check_usb) INFO: circuitpython device connected on port: /dev/cu.usbmodem14301(VID: 0x239A, PID: 0x80F4, manufacturer: 'Raspberry Pi')
2022-11-09 11:02:19,350 - mu.modes.base:112(open) INFO: Connecting to REPL on port: /dev/cu.usbmodem14301
2022-11-09 11:02:19,362 - mu.modes.base:130(open) INFO: Connected to REPL on port: /dev/cu.usbmodem14301
2022-11-09 11:02:19,373 - mu.modes.base:503(add_repl) INFO: Started REPL on port: /dev/cu.usbmodem14301
2022-11-09 11:02:19,374 - mu.modes.base:474(toggle_repl) INFO: Toggle REPL on.
2022-11-09 11:03:25,183 - mu.modes.base:136(close) INFO: Closing connection to REPL on port: /dev/cu.usbmodem14301
2022-11-09 11:03:25,189 - mu.modes.base:471(toggle_repl) INFO: Toggle REPL off.

related bug reports that keep getting closed or pointed to some other component:
mu-editor/mu#1505

and other similar ones:
mu-editor/mu#842
https://forums.adafruit.com/viewtopic.php?f=60&t=151826
micropython#7867
micropython#7996
micropython@5873390

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions