bevyengine / bevyengine/bevy

Mac M1+WASM: `many_buttons` extreme memory usage

Open
#18,257 4 comments 1 reaction 0 assignees View on GitHub
A-Rendering A-UI C-Bug C-Machine-Specific C-Performance O-MacOS O-Web O-WebGL2 S-Needs-Design
Dominant language
Rust
Stars
48.2k
Forks
4.8k
Avg merge
3d 22h
Merged PRs (30d)
161

Description

## Bevy version

Tested on master `4f6241178fa75263fb1fa961874f843684dd7b9a`, as well as `0.15.3`, and `0.14.2`, `0.13.2`, `0.12.1`. (it does *not* occur on `0.11.3`)

## Relevant system information

- Mac mini M1 w/ Sequoia 15.2.
- MacBook Pro M1 w/ Sequoia 15.3.1
- Chrome 134.0.6998.89, Safari 18.2 [20620.1.16.11.8]

```
AdapterInfo { name: "ANGLE (Apple, ANGLE Metal Renderer: Apple M1, Unspecified Version)", vendor: 4203, device: 0, device_type: IntegratedGpu, driver: "", driver_info: "WebGL 2.0 (OpenGL ES 3.0 Chromium)", backend: Gl }
```

## What you did

Run the many_buttons example on chrome or safari: https://bevyengine.org/examples/stress-tests/many-buttons/

## What went wrong

The memory usage of the `Google Chrome Helper (GPU)` shoots up to 10GB and webgl2 crashes for the entire browser, until the browser is restarted.

On Linux+x11+nvidia, it only took 260MiB VRAM and and 1GB RAM.

## Additional information

- Disabling text by setting `args.no_text = true;` fixes it.
- Wgpu throws an error after a couple seconds:
```
wgpu error: Validation error

Caused by:
In `Queue::submit`
Not enough memory left.
```
- I found this because a very similar issue is now naturally happening in my app after updating to bevy 0.15 :(

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.