# Micro:Bit crashing 020 (Bluetooth + Text + Event)

**URL:** <https://forum.makecode.com/t/micro-bit-crashing-020-bluetooth-text-event/6446>\
**Category:** micro:bit\
**Created:** [March 1, 2021, 4:43pm UTC](https://forum.makecode.com/t/micro-bit-crashing-020-bluetooth-text-event/6446 "2021-03-01T16:43:54Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Amerlander](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/amerlander/32/2799_2.png) [@Amerlander](https://forum.makecode.com/u/Amerlander)\
**Post date:** [March 1, 2021, 4:43pm UTC](https://forum.makecode.com/t/micro-bit-crashing-020-bluetooth-text-event/6446/1 "2021-03-01T16:43:54Z")

</div>

Hello,  
I have an Issue receiving an out of memory issue with a pretty simple code:

- Display Some Text on the screen
- Have something in the forever loop
- Create a listener for `bluetooth.onUartDataReceived`
- Create a listener for `Button A`

If now the Buton Event is called while the test is scrolling the microbit will crash after it finished with it. The Button event won’t be called at all.

That having said the pretty old /v1 Editor works quite perfect and can cache a lot of Events and will then delete the events on line instead of crashing after like 10 events in line.

Here is the complete Code for testing:

> **[Crash](https://makecode.microbit.org/30754-39226-32129-64190)**
>
> Erstellt mit ❤️ in Microsoft MakeCode for micro:bit.

This wasn’t easy to figure out, because at first I had much bigger code basis and thought that might be the reason. But I feel like a memory issue in such a short code could be a bug.

Does anyone have the same problem? Maybe there is just a little bug to fix somewhere?

Thank you for reading  
Juri

---

<div class="post-metadata">

**Author:** ![Amerlander](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/amerlander/32/2799_2.png) [@Amerlander](https://forum.makecode.com/u/Amerlander)\
**Post date:** [March 2, 2021, 4:46pm UTC](https://forum.makecode.com/t/micro-bit-crashing-020-bluetooth-text-event/6446/2 "2021-03-02T16:46:21Z")

</div>

It seem to depend on the start block somehow:

> **[Crash](https://makecode.microbit.org/81487-36230-60853-09845)**
>
> Erstellt mit ❤️ in Microsoft MakeCode for micro:bit.

---

<div class="post-metadata">

**Author:** ![MKleinSB](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/mkleinsb/32/593_2.png) [@MKleinSB](https://forum.makecode.com/u/MKleinSB)\
**Post date:** [March 2, 2021, 6:28pm UTC](https://forum.makecode.com/t/micro-bit-crashing-020-bluetooth-text-event/6446/3 "2021-03-02T18:28:36Z")

</div>

Perhaps you should better open an issue at github.
