Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bugs on "data category tweaks" #396

Closed
WorldLanguages opened this issue Oct 3, 2020 · 8 comments
Closed

Bugs on "data category tweaks" #396

WorldLanguages opened this issue Oct 3, 2020 · 8 comments
Labels
source: feedback From the feedback page (https://scratchaddons.com/feedback) or the Discord server type: bug A bug in the addon loader, or in a specific addon

Comments

@WorldLanguages
Copy link
Member

Sometimes, a list got duplicated with the same name, and the exact same content. When i deletes the real list, the "ghost list" still exist, but the list section is empty.. I reloaded but its still the same. The next day, I found out that the ghost list suddenly changed from a global list to a local list, plus its now showing in the for this sprite only list section...

Sorting "this sprite only" variables is broken.

The separation for lists and local variables do not work properly after programming.

For the variables and list ( for this sprite and all sprite ), sometimes it works, sometimes it shows the previous version and the separated version, so basically 2 variables group.

@WorldLanguages WorldLanguages added type: bug A bug in the addon loader, or in a specific addon source: feedback From the feedback page (https://scratchaddons.com/feedback) or the Discord server labels Oct 3, 2020
@Explosion-Scratch
Copy link
Contributor

@towerofnix ^^^

@Hans5958 Hans5958 changed the title User feedback: bugs on "data category tweaks" Bugs on "data category tweaks" Oct 5, 2020
@RokCoder
Copy link

I'm encountering this issue frequently. I haven't noticed the list reappearing as local though. This is particularly gnarly as I tend to notice it when a list is being displayed. When the bug occurs there's no way to hide the list (other than to manually attack the json) but a duplicate list can be toggled on and off.

@mxmou
Copy link
Member

mxmou commented Oct 14, 2020

I've actually seen posts in Scratch's Bugs and Glitches forum about this, so I think it's a serious problem.

https://scratch.mit.edu/discuss/topic/444244/
https://scratch.mit.edu/discuss/topic/445060/

@WorldLanguages
Copy link
Member Author

Oh wow, this got into the Bugs and Glitches forum

@WorldLanguages WorldLanguages added this to the v1.2 milestone Oct 14, 2020
@towerofnix
Copy link
Contributor

Just putting some notes here so they're public (and in case I can't figure out where to go from here) - I'm working on this ATM:

Sometimes, a list got duplicated with the same name, and the exact same content. When i deletes the real list, the "ghost list" still exist, but the list section is empty.. I reloaded but its still the same. The next day, I found out that the ghost list suddenly changed from a global list to a local list, plus its now showing in the for this sprite only list section...

(Terminology note: list "monitors" and "variables" are different. A list variable is the internally stored VM/Blockly object which contains the items in the list, its name, ID, etc. A list monitor is the on-screen display for that list. It references a list variable by name (not ID), and there is normally exactly one monitor for every list variable.)

@WorldLanguages and I found a few things while investigating this project (which includes a few cases of the bug):

On list behavior:

  1. The "ghost list" is actually a duplicate list monitor. It references the same list as the original monitor. When attempting to interact with the monitors for a list variable (e.g. with the toggle next to the list block in the palette), Scratch will always target the original monitor, since it only expects there to be one monitor extant per list variable. As such:
  2. The checkbox reflects the original monitor. If you click it, you'll only hide or show the original monitor. The duplicate ("ghost") monitor cannot be hidden (there is no way to interact with it to hide it).
  3. Deleting the list variable altogether will delete the original monitor, but not the ghost monitor. (The contents of the ghost monitor are still emptied though, hence When i deletes the real list, the "ghost list" still exist, but the list section is empty.)
  4. Refreshing the block palette will reveal the list variable is restored. I believe this is because it is still referenced by the remaining ghost monitor (Scratch automatically creates a new local monitor when a list is referenced but doesn't yet exist, or has been deleted). This is also the reason behind The next day, I found out that the ghost list suddenly changed from a global list to a local list, plus its now showing in the for this sprite only list section....
  5. (Side-note: a ghost list can be permanently deleted & removed from the editor by deleting it thrice (delete, switch to other sprite, switch back to original sprite, repeat). I don't really know why this is, but it doesn't appear again after the third time. I think it has to do with only removing the final monitor ref after the third time, but I'm not sure. Probably not relevant to fixing this bug though.)

On project data: (See project_truncated.json for a truncated version of the project.json, with only 10 items per list. The actual project.json contains several thousand items in each list.)

  1. As mentioned, we're dealing with a duplicate list monitor. There is no actual new list, see targets[0].lists. (We noticed that, at least for "Red X", the (typically redundant) value saved in the duplicate monitor is not the same as in the original monitor, but this is a red herring and probably just a side effect of the way monitors are saved. The two monitors still reference the same list variable ({params: {LIST: "Red X"}}) and accordingly reflect changes to that list identically, when shown.)
  2. There's a duplicate monitor for every list, not just one.
  3. The duplicate monitors are all visible. The monitors which are newly created alongside a referenced monitor are not made visible by default, so I don't think that's how the duplicate monitors are coming about.
  4. I'm not sure how else the duplicate monitors are originally being created though.

Figuring out that last mystery point is how we can fix this problem. (With knowledge of where the duplicate monitors are coming from, we could move on to figure out a fix.)

I'm guessing it has to do with the way that the list palette is cached and then recreated, but am not sure. I don't yet have a solid repro case for creating "ghost lists" as the original quote describes them - hence why I've been working with this existing project. Finding a reliable repro case would make probably debugging the problem considerably easier.

@WorldLanguages
Copy link
Member Author

More feedback:

The data category tweaks is glitching... and now after I made a list, it just disappears.... and the entire list section too...

Sadly it looks like this addon has too many side effects that are difficult to reproduce

@WorldLanguages
Copy link
Member Author

I'll be removing this addon from the next release, even if a solution is found. Sadly this is still frequently happening to users and it keeps appearing in the bugs and glitches forum. If we do find a solution let's first test it ourselves for a while, then release as beta, then wait some time to mark it as stable.

@GrahamSH-LLK
Copy link
Member

This addon has been gone for 20 days. I'm closing this issue.

@Hans5958 Hans5958 added status: duplicate Issue or PR already exists and removed status: duplicate Issue or PR already exists labels Dec 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
source: feedback From the feedback page (https://scratchaddons.com/feedback) or the Discord server type: bug A bug in the addon loader, or in a specific addon
Projects
None yet
Development

No branches or pull requests

7 participants