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

regression from v6 to v7 (current micro:bit release) #6102

Open
tballmsft opened this issue Feb 21, 2025 · 3 comments
Open

regression from v6 to v7 (current micro:bit release) #6102

tballmsft opened this issue Feb 21, 2025 · 3 comments

Comments

@tballmsft
Copy link
Contributor

The release last year regressed the tool pxt-jacdac/tools/microbit-jukebox. In v6 it works fine; in v7 we get error 022 (alloc too large). Repro steps.

  1. clone https://github.com/microsoft/pxt-jacdac
  2. cd to pxt-jacdac/tools/microbit-jukebox
  3. mkc init
  4. mkc -d // deploy to attached microbit (v2)
  5. see 022 error code
  6. edit mkc.json and change targetWebSite to https://makecode.microbit.org/v6
  7. repeat mkc -d and see happy micro:bit (smiley face, no error code
@tballmsft
Copy link
Contributor Author

error is raised in gc.cpp

void *gcAllocate(int numbytes) {
    size_t numwords = BYTES_TO_WORDS(ALIGN_TO_WORD(numbytes));
    // VVLOG("alloc %d bytes %d words", numbytes, numwords);

    if (numbytes > GC_MAX_ALLOC_SIZE)
        soft_panic(PANIC_GC_TOO_BIG_ALLOCATION);

@tballmsft
Copy link
Contributor Author

tballmsft commented Feb 21, 2025

On Jan 2024, bumped UP alloc for v2: 403c417 .

So

  • v6 has GC_MAX_ALLOC_SIZE = 9000 for both microbit v1 and v2

Whereas

  • v7 has GC_MAX_ALLOC_SIZE = 9000 for mbit v1 and GC_MAX_ALLOC_SIZE = 11000 for mbit v2

@tballmsft
Copy link
Contributor Author

tballmsft commented Feb 24, 2025

in the end, this is a code overflow due to use of "settings" by pxt-jacdac, which explains the difference in v6 and v7 (which fixed settings location due to conflict)

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

1 participant