question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Engine.update() with a large delta crashes browser tab

See original GitHub issue

I inadvertently passed a big delta to Engine.update and ended up crashing my browser tab with 100% CPU usage.

This code reproduces it for me but I suppose the actual delta value might depend on the hardware.

const crash = () => {
  const { Engine, Bodies, World } = Matter
  const engine = Engine.create()
  const body = Bodies.circle(0, 0, 1)

  World.add(engine.world, body)
  Engine.update(engine, 1000000)
}

This Codepen crashes for me in Safari, Chrome seems OK but with high CPU usage: https://codepen.io/scriptie/pen/MWYXWyW?editors=0011 image

Issue Analytics

  • State:open
  • Created 4 years ago
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
LeotomasMCcommented, Feb 13, 2020

well you see, its trying to run a lot of time in a little bit of time, its like if your playing a game, and you try to run it at 1000x speed, it doesnt work very well trying to do 1000x more things at the same time.

edit: this probably looks sarcastic, but i wasnt trying to be

0reactions
liabrucommented, Mar 6, 2020

Yeah I’d say this is down to the library user to maintain a reasonable delta but I know what you mean. I think this is already implemented in the built in runner, but intentionally not directly in the engine which is considered lower level.

Not sure what is going on specifically to cause this but essentially the lack of accuracy caused by a high delta causes growing instability, so even if any errors were fixed it would definitely still be unusable!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Dropping file crashes browser tab with ... - GitHub
dropping enything to the component on production server causes it to crash browser tab. So i'm absolutly destroyed by this. Dropping on regular ......
Read more >
SAP HANA Troubleshooting and Performance Analysis Guide
Indicator for Large Delta Storage of Column Store Tables. ... For example, click the Components tab in the Memory Analysis app to view...
Read more >
List of Chromium Command Line Switches - Peter Beverloo
List of Chromium Command Line Switches. There are lots of command lines which can be used with the Google Chrome browser. Some change...
Read more >
Unreal Engine 5.1 Release Notes
Unreal Engine 5.1 features a new Import Framework designed to provide users with a high performance, customizable asset pipeline. The framework works in...
Read more >
Air safety incidents for Delta Airlines - AeroInside
If you want to know how many Delta Airlines planes have crashed or if there has been a Delta Airlines plane crash at...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found