The executing script should have a yellow outline.
The executing script disappears.
We have observed this behavior on iOS and Android for scripts small and large, but in my reproducible case here, this behavior occurs for a very large script in the iOS simulator.
Note: If you remove the last block at the very bottom of the stack and then repeat steps 4 and 5, the script will not disappear, but notice that the glow outside is not yellow but instead is the color of the blocks it surrounds (as you can see if you page down through the stack).
Xcode iOS simulator 9.3 and 10.0 on macOS 10.11.6
Is the system under serious memory pressure when this happens?
@rachel-fenichel No, I don't believe this is a memory issue. For the reproducible steps listed above, the bug can happen even if the simulator was just booted, and my guess is that those steps don't take a lot of memory. Note that if the svg attribute to create the gaussian blur is not applied, then the script does not disappear.
I can reproduce this bug under chrome58, but works fine on chrom63. Looks like browser depends.
Yikes, large stacks cause some seriously strange behaviors


Maybe we need to use a simpler SVG filter for mobile browsers? Unfortunately this only seems to happen on large stacks...
Oh also I can replicate this on desktop Safari 11 on OS 12.6 (Sierra). So strike this being a "mobile browser thing", I'm seeing it as just a "safari" thing. And @xmeow I wasn't able to replicate this on old versions of Chrome on Mac, were you on android? Can you post screenshots?
I work in a electron binding of version 1.7.10 (chrome 58)

And this only happens once custom procedure used.
Try to make a custom procedure block and execute(or apply blocklyStackGlowFilter), and it will disappear.


But everything works fine if I move to chrome63.

So I think I have isolated the root cause of this. It appears that with very tall SVG elements, safari's SVG feGaussianBlur shrinks the source element. You can see this by manually removing everything after the gaussian blur from the stack glow filter.

The stack glow is a composite of multiple filters, and because the blur part is shrunk vertically, it causes the "change" from yellow to block color shadow when you scroll down.
Furthermore, at tall enough heights, the result of the blur disappears entirely, which because of the way the final composite is done, causes nothing to show up at all.
I created a JSfiddle with a simplified filter showing the different behaviors:

https://jsfiddle.net/mc7qpsvw/9/
@xmeow is it possible to try that jsfiddle in the old version of chrome as well, to confirm it is the same issue?
Also pinging @tmickel since it appears you were the original author of these lines, you might find this interesting.
@rachel-fenichel @thisandagain one option would be to not apply the glow filter for stacks above a certain size / for certain browsers. For example, in https://github.com/LLK/scratch-blocks/blob/develop/core/block_svg.js#L226-L232 we could check the BBox height of the svg against some constant we determine through experimentation. We might want to try this approach because gaussian blurs on giant SVG elements can be a huge performance hit, even if they do render correctly.
Another way would be to change the glow to something that doesn't break, or if it isn't the same, provide some kind of graceful fallback in the event of a large stack. However, I tried the other related SVG filters (feMorphology + dilate, for example) and they suffer from the same scaling problem. Anyone have other ideas for implementing that kind of blur?
I wonder if we removed the blur and simply did a "hard" drop shadow on some platforms and/or instances if the performance and rendering issues could be relieved somewhat.
There's a definite trade-off here between how nice things look and how fast they move. I'm personally in favor of going to simpler filters/blurs to improve performance.
If we can find a good heuristic to use, I'm also fine with degrading the appearance on specific platforms.
I don't have numbers on the performance implications of these filters, so that might be a good place to start.
/cc @carljbowman ^^
On the Cozmo project, we found that both large and small stacks would sometimes disappear when executed due to the glow. So from that experience, I think the solution should be to change the effect for all stacks, not just large ones.
@paulkaplan your jsfiddle works fine in electron 1.7.10~

Can recreate in iOS 11 Chrome 63
@paulkaplan With the recent stack glow fixes, I am curious if this issue is fixed? Thanks!
@msintov It should be, but we'll need to do a little more testing on Safari to confirm.
Our team still reproduces this problem, both on iOS 11 iPads as well as on an iOS 10 simulator, with code from tip.
I ran into this today on an iPad Pro with iOS 13. I was in Bouncy Heroes, a relatively large project. I was editing a very long block stack, then switched to full screen stage, ran the project, and exited full screen. The block stack had disappeared.