blockly-samples icon indicating copy to clipboard operation
blockly-samples copied to clipboard

Advanced playground occasionally crashes with too much scrolling

Open maribethb opened this issue 3 years ago • 2 comments

Category

Plugins

Component

dev-tools

Describe the bug

Chrome occasionally crashes if you scroll too much/fast in the advanced playground.

To Reproduce

  1. Open an advanced playground
  2. Enable the "mousewheel move" option so that using the mousewheel will move the workspace
  3. Drag some blocks onto the workspace, or do an airstrike (I reproduced with only 20 blocks)
  4. Scroll rapidly using the mousewheel
  5. 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.

maribethb avatar Jun 07 '21 21:06 maribethb

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.

BeksOmega avatar Jun 07 '21 21:06 BeksOmega

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.

maribethb avatar Jun 08 '21 00:06 maribethb