Scratch-vm: Any block with branch(es) will loop depending on the last block in the branch

Created on 18 Feb 2017  Â·  4Comments  Â·  Source: LLK/scratch-vm

Expected Behavior

Block execution behaves as normal.

Actual Behavior

In a block formation such as this, the "play sound" block will loop over on itself:

Demo 1

In this script, the "play drum" block loops:

Demo 2

In this script, no blocks loop – it behaves as you'd expect (play sound, wait 0.25 seconds, end):

Demo 3

In this script, however, the two blocks do loop:

Demo 4

Note that the parent block (i.e., the one with branches) is looping. This script will play a single meow and then constantly run the "play drum" block:

Demo 5

A few other blocks I noticed that caused these issues when put at the end of a branch – "rest for beats", "say"/"think", but not "wait 1 secs". I imagine this is probably an issue in how a block is marked as "finished running"..?

Steps to Reproduce

Create scripts as described in "actual behavior" and run them.

Operating System and Browser

macOS 10.12, Chrome 56

bug help wanted

Most helpful comment

Hi @liam4. I believe that this may be a dupe of https://github.com/LLK/scratch-vm/issues/464, but the screenshots and additional tests are most appreciated. I'm going to keep this open for now, but may close should we decide that this is a duplicate.

All 4 comments

Hi @liam4. I believe that this may be a dupe of https://github.com/LLK/scratch-vm/issues/464, but the screenshots and additional tests are most appreciated. I'm going to keep this open for now, but may close should we decide that this is a duplicate.

I think this issue is fixed in PR #472

Should be closed?

I believe so, yes; the issue isn't happening anymore. Thanks for reminding!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

griffpatch picture griffpatch  Â·  6Comments

LiFaytheGoblin picture LiFaytheGoblin  Â·  5Comments

thisandagain picture thisandagain  Â·  5Comments

ericrosenbaum picture ericrosenbaum  Â·  3Comments

cwillisf picture cwillisf  Â·  4Comments