You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
All samples that I've run panic when cpal tries to initialize COM with a multithreaded apartment on a thread that is assigned to a single threaded apartment (done by winit):
Z:\cool\path\bevy>cargo run --example scene
Compiling bevy v0.7.0 (Z:\cool\path\bevy)
Finished dev [unoptimized + debuginfo] target(s) in 4.92s
Running `target\debug\examples\scene.exe`
2022-04-15T18:51:41.537468Z INFO bevy_render::renderer: AdapterInfo { name: "NVIDIA GeForce RTX 2070 SUPER", vendor: 4318, device: 7812, device_type: DiscreteGpu, backend: Vulkan }
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Os { code: -2147417850, kind: Uncategorized, message: "Cannot change thread mode after it is set." }', Z:\cool\pathi\.cargo\registry\src\github.aaakk.us.kg-1ecc6299db9ec823\cpal-0.13.1\src\host\wasapi\com.rs:13:77
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
error: process didn't exit successfully: `target\debug\examples\scene.exe` (exit code: 101)
Additional information
It looks like the drag and drop support in winit initializes COM with a single threaded apartment, and then later cpal on the same thread tries to initialize COM with a different apartment. The UI thread probably should be STA.
The text was updated successfully, but these errors were encountered:
Bevy version
I'm seeing this on 0.7 with commit 83c6ffb
Operating system & version
Windows 10 19043.1645
What you did
I tried a few examples:
What you expected to happen
Sample runs and does not panic.
What actually happened
All samples that I've run panic when cpal tries to initialize COM with a multithreaded apartment on a thread that is assigned to a single threaded apartment (done by winit):
Additional information
It looks like the drag and drop support in winit initializes COM with a single threaded apartment, and then later cpal on the same thread tries to initialize COM with a different apartment. The UI thread probably should be STA.
The text was updated successfully, but these errors were encountered: