microsoft / pxt-microbit

A Blocks / JavaScript code editor for the micro:bit built on Microsoft MakeCode
https://makecode.microbit.org
Other
710 stars 589 forks source link

Beta Editor (5.1.32): Bluetooth causes a fault (071) on v2 micro:bits #5185

Closed bsiever closed 1 year ago

bsiever commented 1 year ago

Describe the bug

Adding the Bluetooth extension in the current beta editor (5.1.32) causes faults on v2.21 micro:bits with fault code 071 (MICROBIT_PANIC_APP_MEMACC). No fault occurred when using a v1.5 micro:bit.

It looks like a call to app_error_fault_handler() is happening for some reason with a NRF_FAULT_ID_APP_MEMACC. Nordic docs point toward something trying to access SoftDevice memory space: https://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.s132.api.v6.0.0%2Fgroup___n_r_f___f_a_u_l_t___i_d_s.html .

To Reproduce

Steps to reproduce the behavior:

  1. Open the beta editor (5.1.32)
  2. Create a new project
  3. Add the Bluetooth extension (nothing else is needed, not even any blocks)
  4. Download it to a v2 micro:bit (my tests were a 2.21)
  5. Observe the 017 error

Expected behavior

Bluetooth alone should not result in a fault.

micro:bit version:

v2.21 was tested. (No fault when using a v1.5)

martinwork commented 1 year ago

Related to this CODAL issue: https://github.com/lancaster-university/codal-microbit-v2/issues/331

JohnVidler commented 1 year ago

This looks to have been fixed in https://github.com/lancaster-university/codal-microbit-v2/pull/334 and will be included in the next tag.

Ardumine commented 1 year ago

I'm also getting the same error! I have the micro:bit V2 and by just using the Bluetooth extension my micro:bit gives me the error 071! It works with the makecode editor online version, but it doesn't work with pxt core!

abchatra commented 1 year ago

Fixed in /beta