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

Memory leak in the play tone block with "looping in the background" #5640

Open
microbit-carlos opened this issue Apr 30, 2024 · 1 comment
Open

Comments

@microbit-carlos
Copy link
Collaborator

microbit-carlos commented Apr 30, 2024

Describe the bug
When the play tone block is used with the "looping in the background" option selected, the micro:bit V1 and V2 run out of memory after a few seconds.

To Reproduce
Steps to reproduce the behavior:

  1. Go to makecode.microbit.org
  2. Create a new project
  3. Drop the [play tone] block inside the forever loop
  4. Select the "looping in the background" option
  5. Flash the micro:bit
  6. After a couple of seconds the micro:bit panics with error 020 (out of memory)

https://makecode.microbit.org/_3VXXVo5Pjfgb

image

Expected behavior
To not run out of memory

Screenshots
N/A

micro:bit version (please complete the following information):

Tested with micro:bit V1 and V2.

Desktop (please complete the following information):
N/A

Smartphone (please complete the following information):
N/A

Additional context

makecode.microbit.org version: 6.0.26
Microsoft MakeCode version: 9.0.17
microbit runtime version: v2.2.0-rc6
codal-microbit-v2 runtime version: v0.2.63

@Amerlander
Copy link
Contributor

Amerlander commented May 2, 2024

I think starting background loops in a loop actually should result in out of memory.

But it could already drop a error in MakeCode, like this alternative version of the same a similar programm does:
https://makecode.microbit.org/_UJkX9f9mqEP7
image

But these also does not show error messages:
image
image

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

No branches or pull requests

2 participants