-
Notifications
You must be signed in to change notification settings - Fork 90
Open
Description
The bug also happens with lists instead of variables
Expected Behavior
Switching sprites doesn't make variables that aren't used by the code in the sprite
Actual Behavior
New variables are created in the third sprite for each variable in the second sprite - even if a variable with the same name already exists in that sprite! (this can be seen by downloading the sprite and looking at the JSON)
Steps to Reproduce
Steps to reproduce the behavior:
- Go to 'https://scratch.mit.edu/projects/1210441091/'
Note: the third sprite doesn't have abvariable but the second sprite does - Select the first sprite
- Turn on the lag (eg. by starting the project, but putting thousands of blocks into the second sprite also works because it makes lag when switching to the second sprite)
- Quickly switch to the second and the third sprite
Note: the variables from the second sprite are now in the third sprite, but they don't show up in the block palette yet - Turn off the lag (optional)
- Switch to the costumes tab and back
=> now thebvariable appears in the third sprite. - Download the sprite and extract the sprite.json
- See that it has two definitions (with different IDs) for the
avariable
System Details
I've tried it out on Windows 10, Chrome 139
keywords: duplicated / duplicating variables, ghost variables
Metadata
Metadata
Assignees
Labels
No labels