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

MakeCode simple parrot programme runs out of memory #375

Closed
microbit-carlos opened this issue Sep 15, 2023 · 4 comments
Closed

MakeCode simple parrot programme runs out of memory #375

microbit-carlos opened this issue Sep 15, 2023 · 4 comments
Assignees
Labels

Comments

@microbit-carlos
Copy link
Collaborator

microbit-carlos commented Sep 15, 2023

This simple MakeCode parrot programme from microsoft/pxt-microbit#5312 runs out of memory consistently after a few recordings:

image
input.onButtonPressed(Button.A, function () {
    record.setSampleRate(11000)
    basic.showString("?")
    record.startRecording(record.BlockingState.Blocking)
    basic.showLeds(`
        . # . . .
        . # # . .
        . # # # .
        . # # . .
        . # . . .
        `)
    record.setSampleRate(18000)
    record.playAudio(record.BlockingState.Blocking)
    basic.clearScreen()
})

It might run out of memory with error 020 after a couple of recordings, or a few more. So far I've always managed to trigger it within 5 attempts.

❌ This can be replicated with MakeCode Live v6.0.18 with CODAL v0.2.57:

❌ I can also be replicated with MakeCode v6.0.17 with the same CODAL v0.2.57:

❌ I can also be replicated with MakeCode v6.0.16 with CODAL v0.2.56:

✅ Going back to version v6.0.15 with CODAL v0.2.55 and I cannot replicate anymore:

So it might have been introduced in v0.2.56:
v0.2.55...v0.2.56

@microbit-carlos
Copy link
Collaborator Author

On Monday we should figure out if we can issue quick hotfix or if we need to ask the MakeCode team to revert back to CODAL v0.2.55.

@JohnVidler
Copy link
Collaborator

Just a note here to say I'm currently investigating this.

@microbit-carlos microbit-carlos modified the milestones: v0.2.61, v0.2.62 Sep 26, 2023
@microbit-carlos
Copy link
Collaborator Author

Tag v0.2.60 has increased the maximum size for stream recordings, as a temporary workaround to this issue while we continue investigating it: lancaster-university/codal-core@a116354

It's been merged in pxt-microbit and we are hoping to be able to release to MakeCode Live asap:

@JohnVidler
Copy link
Collaborator

JohnVidler commented Nov 1, 2023

With the updated memory configuration in v0.2.61 Makecode seems much happier, and I'm now unable to reproduce the 020 crash.

There seems to be another issue with the sample rate being forgotten on the second run, but I don't believe this is related to this particular issue, so I'm going to close this one as done for now.

image

(Makecode versions for reference)

@microbit-carlos microbit-carlos removed this from the v0.2.63 milestone Nov 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants