Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vulkan panic during swap chain creation (on a certain device) #1482

Closed
Imberflur opened this issue Jun 7, 2021 · 3 comments
Closed

Vulkan panic during swap chain creation (on a certain device) #1482

Imberflur opened this issue Jun 7, 2021 · 3 comments
Labels
external: upstream Issues happening in lower level APIs or platforms help required We need community help to make this happen. type: bug Something isn't working

Comments

@Imberflur
Copy link
Contributor

Description
When creating the adapter the following is logged:

[2mJun 06 07:30:13.981[0m [32m INFO[0m gfx_backend_vulkan:
GENERAL [Loader Message (0x0)] : Failed to find vkGetDeviceProcAddr in layer libVkLayer_MESA_device_select.so
object info: (type: INSTANCE, hndl: 0x556924e8ed20)

the following swap chain creation then panics with:

PanicInfo: panicked at 'Unable to query surface formats ERROR_INITIALIZATION_FAILED', /root/.cargo/git/checkouts/gfx-e86e7f3ebdbc4218/27a1dae/src/backend/vulkan/src/window.rs:346:27

Backtrace:

0: veloren_voxygen::main::{{closure}}
1: std::panicking::rust_panic_with_hook
at /rustc/3e99439f4dacc8ba0d2ca48d221694362d587927/library/std/src/panicking.rs:629:17
2: std::panicking::begin_panic_handler::{{closure}}
at /rustc/3e99439f4dacc8ba0d2ca48d221694362d587927/library/std/src/panicking.rs:519:13
3: std::sys_common::backtrace::__rust_end_short_backtrace
at /rustc/3e99439f4dacc8ba0d2ca48d221694362d587927/library/std/src/sys_common/backtrace.rs:141:18
4: rust_begin_unwind
at /rustc/3e99439f4dacc8ba0d2ca48d221694362d587927/library/std/src/panicking.rs:515:5
5: std::panicking::begin_panic_fmt
at /rustc/3e99439f4dacc8ba0d2ca48d221694362d587927/library/std/src/panicking.rs:457:5
6: wgpu_core::device::<impl wgpu_core::hub::Global>::device_create_swap_chain
7: wgpu::Device::create_swap_chain
8: veloren_voxygen::render::renderer::Renderer::new
9: veloren_voxygen::window::Window::new
10: veloren_voxygen::main
11: std::sys_common::backtrace::__rust_begin_short_backtrace
12: main
13: __libc_start_main
14: _start

Repro steps
Run veloren on a certain setup

Expected vs observed behavior
Success creating swap chain or an error passed to the error callback vs panic

Extra materials
Full logs here: https://gitlab.com/veloren/veloren/-/issues/1171

Platform
Adapter Vulkan AdapterInfo { name: "GeForce MX150", vendor: 4318, device: 7440, device_type: DiscreteGpu }
wgpu-rs 7486bdad64bb5d17b709ecccb41e063469efff88
wgpu-core 53eab74
gfx 27a1dae3796d33d23812f2bb8c7e3b5aea18b521

@kvark kvark added external: upstream Issues happening in lower level APIs or platforms help required We need community help to make this happen. type: bug Something isn't working labels Jun 9, 2021
@kvark
Copy link
Member

kvark commented Jun 9, 2021

I wonder what has failed initialization, exactly.
Regardless, gfx-backend-vulkan needs to handle this gracefully, not panic.

@kvark
Copy link
Member

kvark commented Jun 9, 2021

This may need to be revised if/when #1471 lands.

@cwfitzgerald
Copy link
Member

This shouldnt panic anymore

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
external: upstream Issues happening in lower level APIs or platforms help required We need community help to make this happen. type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants