Bug when "menu" pressed: "Dereferencing null/undefined value."

It seems that arcade games in block code are not paused properly when the “menu” button is pressed during the “on start” event.

For demonstration, I implemented the following test program. After entering the “menu” during “on start”, the game will freeze after exiting the “menu”. Error message in debug mode: “Program Error: Dereferencing null/undefined value.

Is this a known issue, and how can it be avoided?

I didn’t receive any errors. In fact, I could open and close the menu multiple times, before the screen started changing color, not a problem. After restarting I left the menu open, and after the 5 second pause, the screen started changing colors.

I can reproduce the problem in my Chrome and Edge browsers as well as on the GameGo.

When you press “menu” on the yellow start screen, you will notice that the background of the menu screen will start changing colors after a few seconds. Now the program will crash/freeze if you exit the menu again.

I am still not able to see an error. What I do notice, while viewing the menu and the colors change, that after closing the menu, the screen remains yellow, the sprite says ‘No bug now’ and the screen does not change color anymore.

I have to admit that my test program is a little misleading with this respect. But if the colors stop changing then you are experiencing the freeze of the program which requires a restart.

I observed the same behaviour in several other projects, e.g., in my game Oort Cloud Odyssey.