microbit-foundation / python-editor-v3

Micro:bit Educational Foundation Python Editor V3
https://python.microbit.org
MIT License
60 stars 37 forks source link

Sim stop vs raised exception problem #1001

Closed microbit-matt-hillsdon closed 2 years ago

microbit-matt-hillsdon commented 2 years ago

image

I was testing the micro:bit classroom integration and stopped the sim at what seemed like the same moment it hit a syntax error. It seemed like it stopped but then started scrolling the error. I could not stop the sim at this point as the stop button was disabled.

Eventually when the syntax error stops scrolling the sim does stop. Thats long enough to write most of this bug report and feel very much out of control of the app.

Something unexpected is going on here. Probably not related to micro:bit classroom.

Code:

# Add your Python code here. E.g.
from microbit import *

while True:
    display.scroll('Hello, World!')
    display.show(Image.HEART)
    display.scroll(Image.ANGRY)
    sleep(2000)
microbit-robert commented 2 years ago

I can reproduce this reliably by running the program, then while "Hello, World!" is being displayed, edit the program in any way (even removing the offending line), and it's like we rush through the program that was there and hit the error.

microbit-matt-hillsdon commented 2 years ago

Raised https://github.com/microbit-foundation/micropython-microbit-v2/issues/134