Report errors!
If you ever see an error within the range of 800 - 909, please report an issue at GitHub or on the support page.
Your micro:bit may encounter a situation that prevents it from running your code. When this happens, a frowny face will appear on your micro:bit screen (see picture) followed by an error number. These are called panic codes.
basic.forever(function() {
basic.showLeds(`
# . . . #
# # . # #
. . . . .
. # # # .
# . . . #
`)
basic.pause(1000)
basic.clearScreen()
basic.showString("020")
})
The micro:bit system errors range between 01 - 99. For a full list of these codes, what they mean and what you can do to resolve them, visit the micro:bit guide to error codes.
MICROBIT_I2C_LOCKUP): the micro:bit’s I2C bus is not workingMICROBIT_OOM): there is no free memory on the micro:bitMICROBIT_HEAP_ERROR): a problem in the heap spaceMICROBIT_NULL_DEREFERENCE): there was a NULL dereference, the micro:bit tried to manage a invalid object pointerMICROBIT_SYSTEM_ERROR): there’s an error condition in the micro:bit system softwareMICROBIT_NO_RADIO): the micro:bit can’t enable the radioMICROBIT_HARDWARE_UNAVAILABLE_ACC): an error occurred with the micro:bit’s accelerometer componentMICROBIT_HARDWARE_UNAVAILABLE_MAG): an error occurred with the micro:bit’s magnetometer componentMICROBIT_HARDWARE_CONFIGURATION_ERROR): actual board hardware doesn’t match the configuration descriptionMICROBIT_ASSERTION_FAILED): assertion failed, the condition in an assert was falseMemory error codes range from 800 - 909.
Error codes generated from the garbage collector.
PANIC_INVALID_BINARY_HEADER): the type header for the object is not validPANIC_OUT_OF_BOUNDS): the object data portion is greater than the length defined for itPANIC_REF_DELETED): an object reference was deleted and the object is no longer validPANIC_SIZE): the object size doesn’t match the size defined for the typePANIC_INVALID_VTABLE): an object vtable is invalid or not initializedPANIC_INTERNAL_ERROR): an internal resource errorPANIC_NO_SUCH_CONFIG): the specified device resource is not presentPANIC_INVALID_ARGUMENT): the argument value is out of range or the type or format is invalidPANIC_VARIANT_NOT_SUPPORTED): using a v2 feature on a v1 boardMICROBIT_LOG_FULL): The micro:bit failed to write to datalogger as the log was fullWhen the static type of x is a class C, the dynamic type of x isn’t C, and you try to access a field on x or call a method on x, you will get one of the following codes, depending on dynamic type of x.
PANIC_CAST_FROM_UNDEFINED): when value of x is undefinedPANIC_CAST_FROM_BOOLEAN): when value of x is true or falsePANIC_CAST_FROM_NUMBER): when x is a numberPANIC_CAST_FROM_STRING): when x is a stringPANIC_CAST_FROM_OBJECT): when x is object of some typePANIC_CAST_FROM_FUNCTION): when x is a functionPANIC_CAST_FROM_NULL): when x is null