Engine.update() with a large delta crashes browser tab
See original GitHub issueI 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
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (1 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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
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!