Skip to content

Mac M1+WASM: many_buttons extreme memory usage #18257

Open
@Azorlogh

Description

@Azorlogh

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 :(

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-RenderingDrawing game state to the screenA-UIGraphical user interfaces, styles, layouts, and widgetsC-BugAn unexpected or incorrect behaviorC-Machine-SpecificThis bug is isolated to specific hardware or driver configurationsC-PerformanceA change motivated by improving speed, memory usage or compile timesO-MacOSSpecific to the MacOS (Apple) desktop operating systemO-WebSpecific to web (WASM) buildsO-WebGL2Specific to the WebGL2 render APIS-Needs-DesignThis issue requires design work to think about how it would best be accomplished

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions