Very strange error: "body.blockSequence is not a function"

I found a very strange bug. Here's how to replicate:

  1. Make this code:
    untitled script pic (18)

  2. Run the script

  3. Right-click the "repeat" block (not the "forever" block) then choose the "relabel" option.

  4. In the relabel menu, choose the forever block.

  5. You'll get this error:
    weird forever thing

Very strange. What is causing this and can you fix this?

I am unable to reproduce this error.
With the added step of keeping the script running, I can reproduce the error.

same.
@ten_6044 do you have any user scripts or extensions that might be causing this error?

I forgot :expressionless:

You should relabel the block while the script is running to get the error.

I can reproduce the error!

Here is something somewhat related: put a for each (item) block inside a control C-script and relabel it to a control block.

The reason the message is so cryptic is that if Snap! has an error that we're not anticipating, you get the JavaScript error message, which isn't often related to what the user is trying to do.

Jens is proud of Snap!'s ability to let you modify a program while it's running. So he might decide to fix this expeditiously. I'm more inclined to say "Just don't relabel Control blocks while the program is running!" :~)

I just came across another bug while testing this--relabeling a FOR EACH inside a FOREVER to a FOREVER gives you this:
untitled script pic(10)

I also found that bug. The reason I didn't report it is because that's a minor visual bug that goes away very easily.