What kind of device are you using?: iPad Air 4th gen, iOS 15.1
1 sentence description of the problem:
I exited my project and reentered it and one of my Create a clone blocks was deleted
Steps that the Hopscotch team can take to reproduce my problem every time:
I have been unable to reproduce this in other projects, but it happens every time I close and reopen one of my drafts. It is also deleted whenevery hopscotch crashes.
I expected this to happen:
The block to be kept between opening and closing the draft.
But instead this happened:
The block was deleted each time the draft was opened.
Hereās a sweet screenshot:
For reference the block create a clone is deleted within this code:
When game starts {
repeat times 5 {
create a clone <-----
}
set variable to 0
I couldnāt find a similar bug report when I looked, but if someone else sees one, let me know :)
Hopscotch Team note ā reproducible steps from a new project here:
Hmm strange. I tested this on a new draft and inserted a bunch of code inside a repeat times 1 container, then exited the draft while the play button was still shaking. Every single block in the container was deleted, including the container itself. When I did it a second time, it didnāt delete the code within. So Iām guessing it happens randomly, or every time the app crashes.
Device Details:
2021 M1 12.9" iPad Pro (iPad13,8)
Software Version: iPadOS 15.2
Hopscotch Version: 3.48.2
Player Version: 1.5.20
Of course, now it doesnāt delete on me anymoreā¦
Just to check, if anyone who experienced this issue can remember ā
When the block was being deleted, was it among the most recently added blocks? Or does it also happen with blocks that have already been present in the project for a while?
it was always a block that had been present for a while. It ended up happening with the same 2 blocks. They would always delete every time I would exit and reenter the project or app.
yeah, for sure! It was my latest project, Burger Joint. It uses seeds, so Iām not sure if youāll be able to see the code.
I do know my sister had the same bug (@Manis do u still have that draft with the deleting block?)
Hers was with a custom block and mine was with 2 create a clone blocks that were in different objects.
No worries at all, thanks a lot for the information ā it helps to clarify things.
Sorry for the extra questions but Iād appreciate if you have time to go through them, to try and dig and see whatās going on with this issue. (No rush, just whenever you can get to them, if you are alright with doing that.)
Yeah in that context, because they got deleted, Iām guessing you would have been adding them back into the project again each time. Were those particular blocks among the most recently added blocks also, because you were adding them back into the project again?
And when you re-added them, were there any other blocks added in other parts of the code that were lost?
(Iām trying to work out if it might be related to some recent changes not saving in the project, or if itās something else like a particular sequence of blocks that is consistently deleting)
Thanks a lot, yeah I have access to projects in admin but I guess itās a bit hard to exit and re-enter projects from there. Is it the grill object that was having the issue? (If so, is it still happening and which rule is it?)
If itās happening with a bug in your sisterās project, could I ask permission to check it in admin as well? Though it would be easier if the project could be published so that I can save it as a draft to see (Maybe everything else in the project could be deleted except the object that is having the issue)
I guess you could say that. When I would reopen the project Iād have to add them back in every time. Iād probably work on the project for an hour or so (while I was working, things would be fine) and then go out of it. When I would come back, those specific blocks would be gone. (does that answer your question?)
Nope
Yes, the grill was having the issue, as well as the toppings.
In the grill:
When game starts {
repeat times 6 {
create a clone <-------
}
}
In the toppings:
When game starts {
repeat times 8 {
create a clone <-------
}
}
It actually appears to still be doing it to me!! Hopefully it isnāt like this for other people! When I play the project and tap on the ābuildā button at the top, none of the toppings are appearing on the left hand side. This is new for me in the published project. Is it this way for you? The grill is working, but the toppings donāt appear because they are missing the ācreate a cloneā block.
I was able to download the project to Drafts now to start testing it
And yes unfortunately this was what happens for me when I play the published project too ā none of the toppings appear :(
I did see the Create a Clone block missing in the Toppings code in that rule.
Edit: ok I can confirm that the block keeps getting deleted when I exit the project and re-open it ā it is really strange. Iāll share the steps with the team with this project.
@SwimGirlStudios A temporary workaround that seems to work is to delete the āWhen game startsā rule, and then re-add the Repeat 8, Create a Clone block. Then it doesnāt delete when I exit the project and re-open it.
ahh! I just went in and fixed that!!
its not a super fun game if you canāt actually play it /j
(@Yuanyuan - when you come back online could you take it out of the filter?)
hmm interesting⦠I wonder if maybe I copied and pasted the rule when I made it, like @/Awesome_E suggested (although idk why I would have since itās just like 2 blocks haha but sometimes Iām lazy when Iām coding /j)
edit: it is possible that I duplicated the object thoughā¦
I also found that when I add other blocks to that Repeat container (e.g. Move Forward, flip), it also deletes them when I exit and re-open the project. Same when I add multiple blocks.
Thatās interesting and really helpful to know, to try and reproduce the issue^^
I can approve it from the filter for you too ā Iāll do that now.
The controlScript details what code goes inside the Repeat container, and the abilityID for that is empty. So I think whatever code was being put in the editor, it wouldnāt be saved because the abilityID is empty.
(The abilityID would link to another list of blocks.) But Iām not sure how the empty abilityID may have been created in the first place.
It might be related to duplication or pasting, like in this other topic too Code Randomly disappearing when adding it. Weād need those steps to make the problem happen consistently, to be able to fix it.
So far Iāve been testing duplicating containers and objects, and editing the code inside but no luck in making the problem happen.
i have two projects having this issue too - both Copy of The Unstable Greenhouse (latest player) and The Unstable Greenhouse (not the latest player). Hopscotch username is as always Tri-Angle Studios.
You donāt need the wait zero to wait 20 frames, actually. However, you should be able to add another repeat block and put stuff into it. Hope that helps while we wait for a fix.
@t1_hopscotch suggestion for behavior in treating empty Ability IDs: If the ability doesnāt exist, it should be added with the block being put into the container. Donāt know if that behavior was changed, but I thought it used to do that too.