blockly-samples
blockly-samples copied to clipboard
Advanced playground occasionally crashes with too much scrolling
Category
Plugins
Component
dev-tools
Describe the bug
Chrome occasionally crashes if you scroll too much/fast in the advanced playground.
To Reproduce
- Open an advanced playground
- Enable the "mousewheel move" option so that using the mousewheel will move the workspace
- Drag some blocks onto the workspace, or do an airstrike (I reproduced with only 20 blocks)
- Scroll rapidly using the mousewheel
- Chrome will eventually crash, probably. If you have the console open, and you're lucky, Chrome will put a breakpoint just before the out-of-memory error.
Additional context
I reproduced this in several different plugins, so I don't believe the issue is with any particular plugin, other than the dev-tools advanced playground itself. I was able to get Chrome to stop once before crashing, and the call stack was somewhere in the generate
method. I think this is being called any time the viewport changes. You can see the text in the generator section flashing as you scroll. But I haven't looked any deeper than this yet.
It sounds like the new events might need to be filtered out before generating, if so it might be a good idea to update the realtime generation docs too.
I think this might be related specifically to the monaco editor (the crash happens deeper in the stack than the function linked above, that wasn't clear, sorry) but I'm not sure at this point.