EV3 Crashing on run

I’m testing MakeCode for use in my classroom. Every time I run this program, it crashes the EV3 and I have to pull the battery to restart. I’ve used multiple forever loops before with no problem - there is something in this program that is causing the EV3 to totally lock up every time it is run. Any thoughts? I’d love to be able to understand why this is happening - is it a bug or is it my program?

The robot is a typical rover base with the medium motor opening and closing a pincher attachment. The goal is for the pinchers to continue opening and closing while the robot moves around and is contained within a black ring.

My “On Start” lines are to prevent the program from running the robot off the desk on download.

Thank you!

forever(function () {
    if (sensors.color3.color() == ColorSensorColor.Black) {
        motors.largeBC.steer(0, -100, 1, MoveUnit.Rotations)
        motors.largeBC.steer(200, -100, 1, MoveUnit.Rotations)
    } else {
        motors.largeBC.steer(0, 100)
forever(function () {
    motors.mediumA.run(100, 1, MoveUnit.Rotations)
    motors.mediumA.run(-100, 1, MoveUnit.Rotations)

which version of the editor are you running? it’s in the about dialog

My about dialog says

EV3 version: 1.2.22
MakeCode version: 4.0.11

Any help would be appreciated!