iced-rs / iced

A cross-platform GUI library for Rust, inspired by Elm
https://iced.rs
MIT License
22.96k stars 1.06k forks source link

Integration example panics with wgpu validation error on macOS #2413

Closed dmbfm closed 1 week ago

dmbfm commented 2 weeks ago

Is there an existing issue for this?

Is this issue related to iced?

What happened?

When running cargo run --package integration I get a crash at startup due to a wgpu validation error:

Error in Queue::submit: Validation Error

Caused by:
    Buffer Id(4,1,mtl) is still mapped

What is the expected behavior?

The example should run

Version

master

Operating System

macOS

Do you have any log output?

Finished dev [unoptimized + debuginfo] target(s) in 0.30s
     Running `target/debug/integration`
2024-04-30T14:17:06.090227Z  INFO wgpu_core::instance: Adapter Metal AdapterInfo { name: "Apple M1 Pro", vendor: 0, device: 0, device_type: IntegratedGpu, driver: "", driver_info: "", backend: Metal }
2024-04-30T14:17:06.392699Z  INFO cosmic_text::font::system: Parsed 1276 font faces in 268ms.
thread 'main' panicked at /Users/df/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wgpu-0.19.4/src/backend/wgpu_core.rs:2225:30:
Error in Queue::submit: Validation Error

Caused by:
    Buffer Id(4,1,mtl) is still mapped

note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
2024-04-30T14:17:06.435102Z ERROR wgpu_hal::metal::device: No active command buffers for fence value 1
thread 'main' panicked at /Users/df/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wgpu-0.19.4/src/backend/wgpu_core.rs:1374:34:
Error in Device::drop: Validation Error

Caused by:
    Parent device is lost

2024-04-30T14:17:06.435418Z ERROR wgpu_hal::metal::device: No active command buffers for fence value 1
2024-04-30T14:17:06.435425Z ERROR wgpu_core::device::resource: failed to wait for the device: Device is lost
hecrj commented 1 week ago

This was fixed by #2427.