Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New program runs over the last one after reset #90

Closed
JoshuaLowe1002 opened this issue Nov 1, 2022 · 4 comments
Closed

New program runs over the last one after reset #90

JoshuaLowe1002 opened this issue Nov 1, 2022 · 4 comments

Comments

@JoshuaLowe1002
Copy link

When a reset event is sent to the simulator, it seems a new program is running over the last one from before the reset. Can be seen best when a message is scrolling on the display, my best guess is that this is related to the changes made in #88.

Example from the Python Editor:

Screen.Recording.2022-11-01.at.16.13.21.mov
@microbit-matt-hillsdon
Copy link
Contributor

Thanks. Really easily seen with a program like this:

from microbit import *
import random

r = random.randrange(0, 100)
while True:
    print(r)
    sleep(1000)

I'll look at this soon. We might temporarily revert #88 if it looks non-trivial to fix.

@microbit-matt-hillsdon
Copy link
Contributor

microbit-matt-hillsdon commented Nov 1, 2022

There are two places where we await stop since #88 but this isn't safe as we're really only waiting for stop to be requested. I'll revert #88 for the moment and try to rework this later.

@microbit-matt-hillsdon
Copy link
Contributor

I've reverted #88 and released it as 0.1.7. Confirmed fixed in the micro:bit Python Editor V3 with the program in my comment above. I'll look again at #86 soon.

Thanks for reporting @JoshuaLowe1002

@microbit-matt-hillsdon
Copy link
Contributor

For info, there's a new attempt at fixing #86 without introducing this issue on #91 that we'll be testing today.

You can try it out at
https://review-python-editor-v3.microbit.org/user-stop-wins/ and
https://review-python-simulator.usermbit.org/user-stop-wins/demo.html

microbit-matt-hillsdon added a commit that referenced this issue Nov 2, 2022
This reverts commit 9d7c834 with an additional changes to avoid introducing #90.

Closes #86
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants