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

Examples panic when Nvidia driver is enabled #345

Closed
rikvdkleij opened this issue Dec 15, 2020 · 12 comments Β· Fixed by #487 Β· May be fixed by #356
Closed

Examples panic when Nvidia driver is enabled #345

rikvdkleij opened this issue Dec 15, 2020 · 12 comments Β· Fixed by #487 Β· May be fixed by #356

Comments

@rikvdkleij
Copy link

On Ubuntu 20.10 the examples panics with error:

thread 'main' panicked at 'Instance creation error: VkError(ERROR_LAYER_NOT_PRESENT)', examples/src/lib.rs:237:18

Backtrace:

``` πŸ”‹100% βœ— RUST_BACKTRACE=full cargo run --bin triangle Finished dev [unoptimized + debuginfo] target(s) in 0.03s Running `/home/rik/graphics/ash/target/debug/triangle` thread 'main' panicked at 'Instance creation error: VkError(ERROR_LAYER_NOT_PRESENT)', examples/src/lib.rs:237:18 stack backtrace: 0: 0x563708687bd0 - std::backtrace_rs::backtrace::libunwind::trace::h72c2fb8038f1bbee at /rustc/7eac88abb2e57e752f3302f02be5f3ce3d7adfb4/library/std/src/../../backtrace/src/backtrace/libunwind.rs:96 1: 0x563708687bd0 - std::backtrace_rs::backtrace::trace_unsynchronized::h1e3b084883f1e78c at /rustc/7eac88abb2e57e752f3302f02be5f3ce3d7adfb4/library/std/src/../../backtrace/src/backtrace/mod.rs:66 2: 0x563708687bd0 - std::sys_common::backtrace::_print_fmt::h3bf6a7ebf7f0394a at /rustc/7eac88abb2e57e752f3302f02be5f3ce3d7adfb4/library/std/src/sys_common/backtrace.rs:79 3: 0x563708687bd0 - ::fmt::h2e8cb764b7fe02e7 at /rustc/7eac88abb2e57e752f3302f02be5f3ce3d7adfb4/library/std/src/sys_common/backtrace.rs:58 4: 0x5637086a812c - core::fmt::write::h7a1184eaee6a8644 at /rustc/7eac88abb2e57e752f3302f02be5f3ce3d7adfb4/library/core/src/fmt/mod.rs:1080 5: 0x563708684b92 - std::io::Write::write_fmt::haeeb374d93a67eac at /rustc/7eac88abb2e57e752f3302f02be5f3ce3d7adfb4/library/std/src/io/mod.rs:1516 6: 0x563708689f5d - std::sys_common::backtrace::_print::h1d14a7f6ad632dc8 at /rustc/7eac88abb2e57e752f3302f02be5f3ce3d7adfb4/library/std/src/sys_common/backtrace.rs:61 7: 0x563708689f5d - std::sys_common::backtrace::print::h301abac8bb2e3e81 at /rustc/7eac88abb2e57e752f3302f02be5f3ce3d7adfb4/library/std/src/sys_common/backtrace.rs:48 8: 0x563708689f5d - std::panicking::default_hook::{{closure}}::hde0cb80358a6920a at /rustc/7eac88abb2e57e752f3302f02be5f3ce3d7adfb4/library/std/src/panicking.rs:208 9: 0x563708689c08 - std::panicking::default_hook::h9b1a691049a0ec8f at /rustc/7eac88abb2e57e752f3302f02be5f3ce3d7adfb4/library/std/src/panicking.rs:227 10: 0x56370868a641 - std::panicking::rust_panic_with_hook::h2bdec87b60580584 at /rustc/7eac88abb2e57e752f3302f02be5f3ce3d7adfb4/library/std/src/panicking.rs:577 11: 0x56370868a1e9 - std::panicking::begin_panic_handler::{{closure}}::h101ca09d9df5db47 at /rustc/7eac88abb2e57e752f3302f02be5f3ce3d7adfb4/library/std/src/panicking.rs:484 12: 0x56370868803c - std::sys_common::backtrace::__rust_end_short_backtrace::h3bb85654c20113ca at /rustc/7eac88abb2e57e752f3302f02be5f3ce3d7adfb4/library/std/src/sys_common/backtrace.rs:153 13: 0x56370868a1a9 - rust_begin_unwind at /rustc/7eac88abb2e57e752f3302f02be5f3ce3d7adfb4/library/std/src/panicking.rs:483 14: 0x5637086a6a01 - core::panicking::panic_fmt::h48c31e1e3d550146 at /rustc/7eac88abb2e57e752f3302f02be5f3ce3d7adfb4/library/core/src/panicking.rs:85 15: 0x5637086a6823 - core::option::expect_none_failed::h6154dc750ae47ade at /rustc/7eac88abb2e57e752f3302f02be5f3ce3d7adfb4/library/core/src/option.rs:1234 16: 0x56370836f030 - core::result::Result::expect::he0952449e7c9e040 at /home/rik/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/result.rs:933 17: 0x5637083714ef - examples::ExampleBase::new::h1c81b39b07150899 at /home/rik/graphics/ash/examples/src/lib.rs:235 18: 0x563708364835 - triangle::main::he0555801ca357519 at /home/rik/graphics/ash/examples/src/bin/triangle.rs:18 19: 0x563708367c5b - core::ops::function::FnOnce::call_once::h4e175047d62338fd at /home/rik/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ops/function.rs:227 20: 0x56370836473e - std::sys_common::backtrace::__rust_begin_short_backtrace::h37bf97adc06a26dd at /home/rik/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/sys_common/backtrace.rs:137 21: 0x563708352631 - std::rt::lang_start::{{closure}}::h05da0d84ff6009df at /home/rik/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/rt.rs:66 22: 0x56370868aa67 - core::ops::function::impls:: for &F>::call_once::he179d32a5d10d957 at /rustc/7eac88abb2e57e752f3302f02be5f3ce3d7adfb4/library/core/src/ops/function.rs:259 23: 0x56370868aa67 - std::panicking::try::do_call::hcb3d5e7be089b2b4 at /rustc/7eac88abb2e57e752f3302f02be5f3ce3d7adfb4/library/std/src/panicking.rs:381 24: 0x56370868aa67 - std::panicking::try::h7ac93b0cd56fb701 at /rustc/7eac88abb2e57e752f3302f02be5f3ce3d7adfb4/library/std/src/panicking.rs:345 25: 0x56370868aa67 - std::panic::catch_unwind::h7b40e396c93a4fcd at /rustc/7eac88abb2e57e752f3302f02be5f3ce3d7adfb4/library/std/src/panic.rs:382 26: 0x56370868aa67 - std::rt::lang_start_internal::h142b9cc66267fea1 at /rustc/7eac88abb2e57e752f3302f02be5f3ce3d7adfb4/library/std/src/rt.rs:51 27: 0x563708352607 - std::rt::lang_start::hb0217ad538c3dd9c at /home/rik/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/rt.rs:65 28: 0x56370836721a - main 29: 0x7fb018161cb2 - __libc_start_main 30: 0x5637083490ce - _start 31: 0x0 - ```

nvidia-smi:

Tue Dec 15 09:18:43 2020       
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 455.38       Driver Version: 455.38       CUDA Version: 11.1     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|                               |                      |               MIG M. |
|===============================+======================+======================|
|   0  GeForce GTX 1060    Off  | 00000000:01:00.0 Off |                  N/A |
| N/A   57C    P0    28W /  N/A |    609MiB /  6078MiB |      2%      Default |
|                               |                      |                  N/A |
+-------------------------------+----------------------+----------------------+
                                                                               
+-----------------------------------------------------------------------------+
| Processes:                                                                  |
|  GPU   GI   CI        PID   Type   Process name                  GPU Memory |
|        ID   ID                                                   Usage      |
|=============================================================================|
|    0   N/A  N/A      1811      G   /usr/lib/xorg/Xorg                367MiB |
|    0   N/A  N/A      1997      G   /usr/bin/gnome-shell              103MiB |
|    0   N/A  N/A      2278      G   ...AAAAAAAAA= --shared-files        2MiB |
|    0   N/A  N/A     15782      G   ...AAAAAAAA== --shared-files      131MiB |
+-----------------------------------------------------------------------------+

vkcube works.

Let me know if more info is needed.

@filnet
Copy link
Contributor

filnet commented Dec 15, 2020

Looks like the example enables the VK_LAYER_KHRONOS_validation layer.
Do you have it installed ? If not you can get it from here https://vulkan.lunarg.com/sdk/home.

@rikvdkleij
Copy link
Author

rikvdkleij commented Dec 15, 2020

@filnet Thanks, that helps but after seeing the triangle image for a moment, the program panics:

``` NFO: GENERAL [Loader Message (0)] : Inserted device layer VK_LAYER_KHRONOS_validation (libVkLayer_khronos_validation.so)

INFO:
GENERAL [Loader Message (0)] : Failed to find vkGetDeviceProcAddr in layer libVkLayer_MESA_device_select.so

thread 'main' panicked at 'attempted to leave type platform::platform::x11::util::input::PointerState uninitialized, which is invalid', /home/rik/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/mem/mod.rs:658:9
stack backtrace:
0: 0x55e6dcf83bd0 - std::backtrace_rs::backtrace::libunwind::trace::h72c2fb8038f1bbee
at /rustc/7eac88abb2e57e752f3302f02be5f3ce3d7adfb4/library/std/src/../../backtrace/src/backtrace/libunwind.rs:96
1: 0x55e6dcf83bd0 - std::backtrace_rs::backtrace::trace_unsynchronized::h1e3b084883f1e78c
at /rustc/7eac88abb2e57e752f3302f02be5f3ce3d7adfb4/library/std/src/../../backtrace/src/backtrace/mod.rs:66
2: 0x55e6dcf83bd0 - std::sys_common::backtrace::_print_fmt::h3bf6a7ebf7f0394a
at /rustc/7eac88abb2e57e752f3302f02be5f3ce3d7adfb4/library/std/src/sys_common/backtrace.rs:79
3: 0x55e6dcf83bd0 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h2e8cb764b7fe02e7
at /rustc/7eac88abb2e57e752f3302f02be5f3ce3d7adfb4/library/std/src/sys_common/backtrace.rs:58
4: 0x55e6dcfa412c - core::fmt::write::h7a1184eaee6a8644
at /rustc/7eac88abb2e57e752f3302f02be5f3ce3d7adfb4/library/core/src/fmt/mod.rs:1080
5: 0x55e6dcf80b92 - std::io::Write::write_fmt::haeeb374d93a67eac
at /rustc/7eac88abb2e57e752f3302f02be5f3ce3d7adfb4/library/std/src/io/mod.rs:1516
6: 0x55e6dcf85f5d - std::sys_common::backtrace::_print::h1d14a7f6ad632dc8
at /rustc/7eac88abb2e57e752f3302f02be5f3ce3d7adfb4/library/std/src/sys_common/backtrace.rs:61
7: 0x55e6dcf85f5d - std::sys_common::backtrace::print::h301abac8bb2e3e81
at /rustc/7eac88abb2e57e752f3302f02be5f3ce3d7adfb4/library/std/src/sys_common/backtrace.rs:48
8: 0x55e6dcf85f5d - std::panicking::default_hook::{{closure}}::hde0cb80358a6920a
at /rustc/7eac88abb2e57e752f3302f02be5f3ce3d7adfb4/library/std/src/panicking.rs:208
9: 0x55e6dcf85c08 - std::panicking::default_hook::h9b1a691049a0ec8f
at /rustc/7eac88abb2e57e752f3302f02be5f3ce3d7adfb4/library/std/src/panicking.rs:227
10: 0x55e6dcf86641 - std::panicking::rust_panic_with_hook::h2bdec87b60580584
at /rustc/7eac88abb2e57e752f3302f02be5f3ce3d7adfb4/library/std/src/panicking.rs:577
11: 0x55e6dcf861e9 - std::panicking::begin_panic_handler::{{closure}}::h101ca09d9df5db47
at /rustc/7eac88abb2e57e752f3302f02be5f3ce3d7adfb4/library/std/src/panicking.rs:484
12: 0x55e6dcf8403c - std::sys_common::backtrace::__rust_end_short_backtrace::h3bb85654c20113ca
at /rustc/7eac88abb2e57e752f3302f02be5f3ce3d7adfb4/library/std/src/sys_common/backtrace.rs:153
13: 0x55e6dcf861a9 - rust_begin_unwind
at /rustc/7eac88abb2e57e752f3302f02be5f3ce3d7adfb4/library/std/src/panicking.rs:483
14: 0x55e6dcfa2a01 - core::panicking::panic_fmt::h48c31e1e3d550146
at /rustc/7eac88abb2e57e752f3302f02be5f3ce3d7adfb4/library/core/src/panicking.rs:85
15: 0x55e6dcfa294d - core::panicking::panic::h184ede6dd822ffb4
at /rustc/7eac88abb2e57e752f3302f02be5f3ce3d7adfb4/library/core/src/panicking.rs:50
16: 0x55e6dcd09b51 - core::mem::uninitialized::h9340e45ded11ff6c
at /home/rik/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/mem/mod.rs:658
17: 0x55e6dcd09b51 - winit::platform::platform::x11::util::input::::query_pointer::hfa5d92a86f942bcc
at /home/rik/.cargo/registry/src/github.com-1ecc6299db9ec823/winit-0.19.5/src/platform/linux/x11/util/input.rs:94
18: 0x55e6dcc5bbcd - winit::platform::platform::x11::EventsLoop::process_event::hc59f59a33a9c3e62
at /home/rik/.cargo/registry/src/github.com-1ecc6299db9ec823/winit-0.19.5/src/platform/linux/x11/mod.rs:956
19: 0x55e6dcc55aaa - winit::platform::platform::x11::EventsLoop::run_forever::h3b30def978495801
at /home/rik/.cargo/registry/src/github.com-1ecc6299db9ec823/winit-0.19.5/src/platform/linux/x11/mod.rs:297
20: 0x55e6dcc4d07d - winit::platform::platform::EventsLoop::run_forever::hd8d2a58eba91fd2e
at /home/rik/.cargo/registry/src/github.com-1ecc6299db9ec823/winit-0.19.5/src/platform/linux/mod.rs:531
21: 0x55e6dcc4a563 - winit::EventsLoop::run_forever::h2be558bae2d8c1c6
at /home/rik/.cargo/registry/src/github.com-1ecc6299db9ec823/winit-0.19.5/src/lib.rs:292
22: 0x55e6dcc53bcc - examples::ExampleBase::render_loop::hfc2ad9605f380ef0
at /home/rik/graphics/ash/examples/src/lib.rs:177
23: 0x55e6dcc62c4b - triangle::main::he0555801ca357519
at /home/rik/graphics/ash/examples/src/bin/triangle.rs:361
24: 0x55e6dcc63c5b - core::ops::function::FnOnce::call_once::h4e175047d62338fd
at /home/rik/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ops/function.rs:227
25: 0x55e6dcc6073e - std::sys_common::backtrace::__rust_begin_short_backtrace::h37bf97adc06a26dd
at /home/rik/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/sys_common/backtrace.rs:137
26: 0x55e6dcc4e631 - std::rt::lang_start::{{closure}}::h05da0d84ff6009df
at /home/rik/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/rt.rs:66
27: 0x55e6dcf86a67 - core::ops::function::impls::<impl core::ops::function::FnOnce for &F>::call_once::he179d32a5d10d957
at /rustc/7eac88abb2e57e752f3302f02be5f3ce3d7adfb4/library/core/src/ops/function.rs:259
28: 0x55e6dcf86a67 - std::panicking::try::do_call::hcb3d5e7be089b2b4
at /rustc/7eac88abb2e57e752f3302f02be5f3ce3d7adfb4/library/std/src/panicking.rs:381
29: 0x55e6dcf86a67 - std::panicking::try::h7ac93b0cd56fb701
at /rustc/7eac88abb2e57e752f3302f02be5f3ce3d7adfb4/library/std/src/panicking.rs:345
30: 0x55e6dcf86a67 - std::panic::catch_unwind::h7b40e396c93a4fcd
at /rustc/7eac88abb2e57e752f3302f02be5f3ce3d7adfb4/library/std/src/panic.rs:382
31: 0x55e6dcf86a67 - std::rt::lang_start_internal::h142b9cc66267fea1
at /rustc/7eac88abb2e57e752f3302f02be5f3ce3d7adfb4/library/std/src/rt.rs:51
32: 0x55e6dcc4e607 - std::rt::lang_start::hb0217ad538c3dd9c
at /home/rik/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/rt.rs:65
33: 0x55e6dcc6321a - main
34: 0x7f3560415cb2 - __libc_start_main
35: 0x55e6dcc450ce - _start
36: 0x0 -
ERROR:
VALIDATION [VUID-vkDestroyDevice-device-00378 (1901072314)] : Validation Error: [ VUID-vkDestroyDevice-device-00378 ] Object 0: handle = 0x55e6dee11698, type = VK_OBJECT_TYPE_DEVICE; Object 1: handle = 0x170000000017, type = VK_OBJECT_TYPE_DEVICE_MEMORY; | MessageID = 0x71500fba | OBJ ERROR : For VkDevice 0x55e6dee11698[], VkDeviceMemory 0x170000000017[] has not been destroyed. The Vulkan spec states: All child objects created on device must have been destroyed prior to destroying device (https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VUID-vkDestroyDevice-device-00378)

ERROR:
VALIDATION [VUID-vkDestroyDevice-device-00378 (1901072314)] : Validation Error: [ VUID-vkDestroyDevice-device-00378 ] Object 0: handle = 0x55e6dee11698, type = VK_OBJECT_TYPE_DEVICE; Object 1: handle = 0x190000000019, type = VK_OBJECT_TYPE_DEVICE_MEMORY; | MessageID = 0x71500fba | OBJ ERROR : For VkDevice 0x55e6dee11698[], VkDeviceMemory 0x190000000019[] has not been destroyed. The Vulkan spec states: All child objects created on device must have been destroyed prior to destroying device (https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VUID-vkDestroyDevice-device-00378)

ERROR:
VALIDATION [VUID-vkDestroyDevice-device-00378 (1901072314)] : Validation Error: [ VUID-vkDestroyDevice-device-00378 ] Object 0: handle = 0x55e6dee11698, type = VK_OBJECT_TYPE_DEVICE; Object 1: handle = 0x160000000016, type = VK_OBJECT_TYPE_BUFFER; | MessageID = 0x71500fba | OBJ ERROR : For VkDevice 0x55e6dee11698[], VkBuffer 0x160000000016[] has not been destroyed. The Vulkan spec states: All child objects created on device must have been destroyed prior to destroying device (https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VUID-vkDestroyDevice-device-00378)

ERROR:
VALIDATION [VUID-vkDestroyDevice-device-00378 (1901072314)] : Validation Error: [ VUID-vkDestroyDevice-device-00378 ] Object 0: handle = 0x55e6dee11698, type = VK_OBJECT_TYPE_DEVICE; Object 1: handle = 0x180000000018, type = VK_OBJECT_TYPE_BUFFER; | MessageID = 0x71500fba | OBJ ERROR : For VkDevice 0x55e6dee11698[], VkBuffer 0x180000000018[] has not been destroyed. The Vulkan spec states: All child objects created on device must have been destroyed prior to destroying device (https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VUID-vkDestroyDevice-device-00378)

ERROR:
VALIDATION [VUID-vkDestroyDevice-device-00378 (1901072314)] : Validation Error: [ VUID-vkDestroyDevice-device-00378 ] Object 0: handle = 0x55e6dee11698, type = VK_OBJECT_TYPE_DEVICE; Object 1: handle = 0x1a000000001a, type = VK_OBJECT_TYPE_SHADER_MODULE; | MessageID = 0x71500fba | OBJ ERROR : For VkDevice 0x55e6dee11698[], VkShaderModule 0x1a000000001a[] has not been destroyed. The Vulkan spec states: All child objects created on device must have been destroyed prior to destroying device (https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VUID-vkDestroyDevice-device-00378)

ERROR:
VALIDATION [VUID-vkDestroyDevice-device-00378 (1901072314)] : Validation Error: [ VUID-vkDestroyDevice-device-00378 ] Object 0: handle = 0x55e6dee11698, type = VK_OBJECT_TYPE_DEVICE; Object 1: handle = 0x1b000000001b, type = VK_OBJECT_TYPE_SHADER_MODULE; | MessageID = 0x71500fba | OBJ ERROR : For VkDevice 0x55e6dee11698[], VkShaderModule 0x1b000000001b[] has not been destroyed. The Vulkan spec states: All child objects created on device must have been destroyed prior to destroying device (https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VUID-vkDestroyDevice-device-00378)

ERROR:
VALIDATION [VUID-vkDestroyDevice-device-00378 (1901072314)] : Validation Error: [ VUID-vkDestroyDevice-device-00378 ] Object 0: handle = 0x55e6dee11698, type = VK_OBJECT_TYPE_DEVICE; Object 1: handle = 0x1c000000001c, type = VK_OBJECT_TYPE_PIPELINE_LAYOUT; | MessageID = 0x71500fba | OBJ ERROR : For VkDevice 0x55e6dee11698[], VkPipelineLayout 0x1c000000001c[] has not been destroyed. The Vulkan spec states: All child objects created on device must have been destroyed prior to destroying device (https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VUID-vkDestroyDevice-device-00378)

ERROR:
VALIDATION [VUID-vkDestroyDevice-device-00378 (1901072314)] : Validation Error: [ VUID-vkDestroyDevice-device-00378 ] Object 0: handle = 0x55e6dee11698, type = VK_OBJECT_TYPE_DEVICE; Object 1: handle = 0x120000000012, type = VK_OBJECT_TYPE_RENDER_PASS; | MessageID = 0x71500fba | OBJ ERROR : For VkDevice 0x55e6dee11698[], VkRenderPass 0x120000000012[] has not been destroyed. The Vulkan spec states: All child objects created on device must have been destroyed prior to destroying device (https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VUID-vkDestroyDevice-device-00378)

ERROR:
VALIDATION [VUID-vkDestroyDevice-device-00378 (1901072314)] : Validation Error: [ VUID-vkDestroyDevice-device-00378 ] Object 0: handle = 0x55e6dee11698, type = VK_OBJECT_TYPE_DEVICE; Object 1: handle = 0x1d000000001d, type = VK_OBJECT_TYPE_PIPELINE; | MessageID = 0x71500fba | OBJ ERROR : For VkDevice 0x55e6dee11698[], VkPipeline 0x1d000000001d[] has not been destroyed. The Vulkan spec states: All child objects created on device must have been destroyed prior to destroying device (https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VUID-vkDestroyDevice-device-00378)

ERROR:
VALIDATION [VUID-vkDestroyDevice-device-00378 (1901072314)] : Validation Error: [ VUID-vkDestroyDevice-device-00378 ] Object 0: handle = 0x55e6dee11698, type = VK_OBJECT_TYPE_DEVICE; Object 1: handle = 0x150000000015, type = VK_OBJECT_TYPE_FRAMEBUFFER; | MessageID = 0x71500fba | OBJ ERROR : For VkDevice 0x55e6dee11698[], VkFramebuffer 0x150000000015[] has not been destroyed. The Vulkan spec states: All child objects created on device must have been destroyed prior to destroying device (https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VUID-vkDestroyDevice-device-00378)

ERROR:
VALIDATION [VUID-vkDestroyDevice-device-00378 (1901072314)] : Validation Error: [ VUID-vkDestroyDevice-device-00378 ] Object 0: handle = 0x55e6dee11698, type = VK_OBJECT_TYPE_DEVICE; Object 1: handle = 0x140000000014, type = VK_OBJECT_TYPE_FRAMEBUFFER; | MessageID = 0x71500fba | OBJ ERROR : For VkDevice 0x55e6dee11698[], VkFramebuffer 0x140000000014[] has not been destroyed. The Vulkan spec states: All child objects created on device must have been destroyed prior to destroying device (https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VUID-vkDestroyDevice-device-00378)

ERROR:
VALIDATION [VUID-vkDestroyDevice-device-00378 (1901072314)] : Validation Error: [ VUID-vkDestroyDevice-device-00378 ] Object 0: handle = 0x55e6dee11698, type = VK_OBJECT_TYPE_DEVICE; Object 1: handle = 0x130000000013, type = VK_OBJECT_TYPE_FRAMEBUFFER; | MessageID = 0x71500fba | OBJ ERROR : For VkDevice 0x55e6dee11698[], VkFramebuffer 0x130000000013[] has not been destroyed. The Vulkan spec states: All child objects created on device must have been destroyed prior to destroying device (https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VUID-vkDestroyDevice-device-00378)

</details>

@rikvdkleij
Copy link
Author

The texture example works without problems.

@filnet
Copy link
Contributor

filnet commented Dec 15, 2020

Looks like a winit issue.

@MaikKlein
Copy link
Member

We probably just have to update winit, I recently ran into the same error in ggez.

@imavlr
Copy link

imavlr commented Dec 19, 2020

Yes this is a Rust 1.48 and winit issue, can confirm updating winit fixes it in other projects.
Downgrading Rust to < 1.48 is another option if you just want to get it to run and play around with it for now.

texture shouldn't work without problems though, that sounds weird, it should crash as soon as you move your cursor over it as well.

@rikvdkleij
Copy link
Author

I can confirm that it works with updating winit. I have tried to make PR but I don't get the example code in a proper shape because the semantics of the winit's event loop run is changed. It now wants to own all the code which in the current structure makes it impossible to run the code which does the cleanup. That said as a Rust beginner πŸ˜„

@majkcramer
Copy link

majkcramer commented Dec 31, 2020

I can confirm that too. Examples updating winit to 0.24.0 and fixing winit namespacing references in lib.rs went just easy.
But renaming

pub events_loop: RefCell<winit::EventsLoop>,

to

pub events_loop: RefCell<winit::event_loop::EventLoop>,

leads inevitably to the folling error:

`error[E0107]: wrong number of type arguments: expected 1, found 0
--> examples\src\lib.rs:152:30
|
143 | pub events_loop: RefCellwinit::event_loop::EventLoop, // Original: pub events_loop: RefCellwinit::EventsLoop,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected 1 type argument

error: aborting due to previous error; 1 warning emitted`

Edit: lib.rs attached
lib.zip

@MarijnS95
Copy link
Collaborator

@majkcramer EventLoop supports custom (user) events, the type of which is passed as generic argument to EventLoop. Since these examples don't use/need that, use a void (()) type here.

I've performed the full conversion of both the examples and ash-window example here:
https://github.com/Traverse-Research/ash/compare/examples-winit-24
I'll submit a PR for this after resolving cleanup. The new event loop fn run never returns (-> !) and has all Vulkan resources moved into it. You'll see a linter warning complaining about device_wait_idle (and consequent _destroy calls not being reachable.

@hgallagher1993
Copy link

We probably just have to update winit, I recently ran into the same error in ggez.

Just as an FYI, I've already updated winit and rewritten the triangle example so it works with the new event loop as part of #190, just have to do the texture now

@MarijnS95
Copy link
Collaborator

@hgallagher1993 Do you think you can update and submit that soon or should I submit aforementioned branch as interim solution till then? That's probably going to generate a bunch of conflicts on your side though.

@hgallagher1993
Copy link

@MarijnS95 shouldn't be too long before I have a merge request, couple of days at most πŸ‘

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
7 participants