# Help request - Bug that only occurs on hardware

**URL:** <https://forum.makecode.com/t/help-request-bug-that-only-occurs-on-hardware/1526>\
**Category:** Arcade\
**Created:** [March 28, 2020, 3:36pm UTC](https://forum.makecode.com/t/help-request-bug-that-only-occurs-on-hardware/1526 "2020-03-28T15:36:14Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![3issa](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/3issa/32/591_2.png) [@3issa](https://forum.makecode.com/u/3issa)\
**Post date:** [March 28, 2020, 3:36pm UTC](https://forum.makecode.com/t/help-request-bug-that-only-occurs-on-hardware/1526/1 "2020-03-28T15:36:14Z")

</div>

Hi everyone,

I’m requesting your help for a bug I can’t get rid of in a game of mine.

Here is the game (a very conventional Tetris clone) :

> **[MyTetrisClone](https://arcade.makecode.com/45495-16226-84360-01109)**
>
> Made with ❤️ in Microsoft MakeCode Arcade.

I have no problem when I run the game in Makecode Arcade’s environment in my browser but when I try the game on hardware (STM32F411) I run into a bug.

Actually, every time I loose I get a 021 error as you can see on the following video.

Does anyone have an idea on what’s wrong with my code ?

---

<div class="post-metadata">

**Author:** ![jwunderl](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/jwunderl/32/5308_2.png) [@jwunderl](https://forum.makecode.com/u/jwunderl)\
**Post date:** [March 28, 2020, 9:24pm UTC](https://forum.makecode.com/t/help-request-bug-that-only-occurs-on-hardware/1526/2 "2020-03-28T21:24:03Z")

</div>

021 is the out of memory error: [https://arcade.makecode.com/hardware/errors](https://arcade.makecode.com/hardware/errors)

Most likely what is happening is that the game over screen effect is pushing the game just over the memory limit for that particular device. I’ll have to take a closer look to see if there’s anything that can reduce memory usage in the game - maybe even just clearing a few variables before calling game over would give enough wiggle room ~

Edit: haven’t had a chance to test on hw yet, but clearing the grid array (`grid = undefined`) before calling game over might be enough?

---

<div class="post-metadata">

**Author:** ![3issa](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/3issa/32/591_2.png) [@3issa](https://forum.makecode.com/u/3issa)\
**Post date:** [March 29, 2020, 5:08am UTC](https://forum.makecode.com/t/help-request-bug-that-only-occurs-on-hardware/1526/3 "2020-03-29T05:08:12Z")

</div>

Thank you for your explanation, your time and advice. I really appreciate.

For now, I just get rid of the game.over instruction. I use game.reset instead and it works fine.

But I’ll go further to clear my variables as you suggested.

Thanks.
