Open Azercoco opened 3 months ago
Are you able to run with MinimalPlugins
? The next step is to try and dissect what plugins are causing this: my guess is either rendering or perhaps even the gathering of the system info itself.
No issue with MinimalPlugins
. The issue really seems to come from the Window.
This happens to me as well, since I switched to Wayland.
After trying it out multiple times I managed to get a panic with a backtrace once, and a few times it seemed to start fine... I will try to look into this some more...
I'm pretty sure this is either an issue with Wayland or with the 555 nvidia driver - I didn't really make any other changes to my system since it worked.
Edit: I quickly reverted back to X11 using the 555 driver - no problems there, so it really seems to be a Wayland issue
I just noticed, the app doesn't immediately crash. It starts up just fine and even does stuff and is interactive - sometimes it runs for up to 3 seconds - then segfaults
Especially this part is interesting:
#4 0x0000555559681b04 in ash::device::Device::wait_for_fences (self=0x55555bb43c90, fences=..., wait_all=true, timeout=18446744073709551615)
at /home/nionidh/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ash-0.37.3+1.3.251/src/device.rs:2399
#5 0x000055555958c57e in wgpu_hal::vulkan::instance::{impl#6}::acquire_texture (self=0x7fffd0003860, timeout=...) at src/vulkan/instance.rs:967
#6 0x0000555559189a4e in wgpu_core::global::Global<wgpu_core::identity::IdentityManagerFactory>::surface_get_current_texture<wgpu_core::identity::IdentityManagerFactory, wgpu_hal::vulkan::Api> (self=0x55555b71c320, surface_id=...,
texture_id_in=()) at /home/nionidh/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wgpu-core-0.19.3/src/present.rs:167
#7 0x00005555592f93b4 in wgpu::backend::wgpu_core::{impl#7}::surface_get_current_texture (self=0x55555b71c320, surface=0x7ffff656eac0, surface_data=0x7fffd0003680) at src/backend/wgpu_core.rs:744
#8 0x0000555559313f12 in wgpu::context::{impl#5}::surface_get_current_texture<wgpu::backend::wgpu_core::ContextWgpuCore> (self=0x55555b71c320, surface=0x7fffd011cce8, surface_data=...) at src/context.rs:2140
#9 0x000055555932518d in wgpu::Surface::get_current_texture (self=0x7fffd011ccb8) at src/lib.rs:4841
#10 0x0000555558dc3eaf in bevy_render::view::window::prepare_windows (windows=..., window_surfaces=..., render_device=..., render_adapter=..., screenshot_pipeline=..., pipeline_cache=..., pipelines=..., msaa=..., render_instance=...)
at src/view/window/mod.rs:336
Oh my god...
Well, for me at least adding the "wayland" feature to bevy fixed the crash.
I suspect without it bevy was run with xwayland and then weirdness ensued... I will investigate further tho until I am 100% sure.
Edit: Yup!
without having features = ["wayland"]
the app silently runs under xwayland and crashes after a few seconds.
When adding features = ["wayland"]
the app runs natively on wayland and works just fine.
So i guess the real bug here is that bevy crashes on xwayland - otherwise everything works as expected. I wonder if we should detect whether or not we are running in wayland and then print a warning if the app was built without the wayland feature
So this issue is really just #8788 with added segfault spicyness
And when #10792 is merged this shouldn't be a big problem anymore...
without having
features = ["wayland"]
the app silently runs under xwayland and crashes after a few seconds. When addingfeatures = ["wayland"]
the app runs natively on wayland and works just fine.
This also fixed the problem for me. Thanks.
Bevy version
bevy = "0.13.2"
[Optional] Relevant system information
AdapterInfo { name: "NVIDIA GeForce RTX 4070", vendor: 4318, device: 10118, device_type: DiscreteGpu, driver: "NVIDIA", driver_info: "555.42.02", backend: Vulkan }
What you did
I did try to launch the default app :
using the nix shell
What went wrong
The application compiles without issue but when I launches it, the window open for a couple of second before encountering a segfault. I am not sure if the issue is Nix-OS related or NVIDIA related. The lack of useful log or similar issues make it very hard to troubleshoot.
Additional information
Logs :