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

Viewport change events causing out of memory error #4916

Closed
BeksOmega opened this issue Jun 15, 2021 · 2 comments
Closed

Viewport change events causing out of memory error #4916

BeksOmega opened this issue Jun 15, 2021 · 2 comments
Assignees
Labels
component: events issue: bug Describes why the code or behaviour is wrong

Comments

@BeksOmega
Copy link
Collaborator

BeksOmega commented Jun 15, 2021

Describe the bug

If you jiggle the workspace too much, it can cause the tab to crash with an out of memory error.

To Reproduce

Steps to reproduce the behavior:

  1. Go to the advanced playground
  2. Open up the console so that the browser will pause before crashing.
  3. Jiggle the workspace around rapidly.
  4. Observe how after a few seconds the browser will pause with a warning that it is about to run out of memory.

Expected behavior

No crashes. Not sure how to achieve that though.

Desktop (please complete the following information):

  • OS: Ubuntu 18.04
  • Browser: Chrome
  • Version: 91

Stack Traces

Here is the stack trace I get when it pauses:

e.getLineFeedCnt (pieceTreeBase.ts:928)
e.createNewPieces (pieceTreeBase.ts:1047)
e.insert (pieceTreeBase.ts:740)
e._doApplyEdits (pieceTreeTextBuffer.ts:412)
e.applyEdits (pieceTreeTextBuffer.ts:275)
o._applyEdits (textModel.ts:1147)
o.applyEdits (textModel.ts:1134)
e.pushEditOperation (editStack.ts:168)
o._pushEditOperations (textModel.ts:1127)
o.pushEditOperations (textModel.ts:1036)
generate (index.js:169)
S (index.js:226)
(anonymous) (index.js:335)
Blockly.Workspace.fireChangeListener (workspace.js:670)
Blockly.Events.fireNow_ (events.js:262)
--- setTimeout (async) ---
Blockly.Events.fire (events.js:244)
Blockly.WorkspaceSvg.maybeFireViewportChangeEvent (workspace_svg.js:1260)
Blockly.WorkspaceSvg.translate (workspace_svg.js:1288)
Blockly.WorkspaceSvg.scroll (workspace_svg.js:2312)
Blockly.WorkspaceDragger.drag (workspace_dragger.js:102)
Blockly.Gesture.handleMove (gesture.js:539)
Blockly.TouchGesture.handleMove (touch_gesture.js:169)
wrapFunc (browser_events.js:64)
@BeksOmega BeksOmega added issue: triage Issues awaiting triage by a Blockly team member issue: bug Describes why the code or behaviour is wrong labels Jun 15, 2021
@moniika moniika added this to the 2021_q2_release milestone Jun 15, 2021
@moniika moniika added component: events and removed issue: triage Issues awaiting triage by a Blockly team member labels Jun 15, 2021
@moniika moniika self-assigned this Jun 15, 2021
@moniika
Copy link
Contributor

moniika commented Jun 16, 2021

Possibly related to google/blockly-samples#750

@moniika
Copy link
Contributor

moniika commented Jun 28, 2021

Closing for now because unable to repro.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: events issue: bug Describes why the code or behaviour is wrong
Projects
None yet
Development

No branches or pull requests

2 participants