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

vkDestroySwapchainKHR: Invalid device [VUID-vkDestroySwapchainKHR-device-parameter] #312

Open
Tomloyo opened this issue Oct 11, 2024 · 3 comments

Comments

@Tomloyo
Copy link

Tomloyo commented Oct 11, 2024

newbie here as i am just doing it by a tutorial vkguide , that exactly same code worked yestreday

[ERROR: Validation]
Validation Error: [ VUID-vkDestroyInstance-instance-00629 ] Object 0: handle = 0x1fcdcc99230, type = VK_OBJECT_TYPE_INSTANCE; | MessageID = 0x8b3d8e18 | vkDestroyInstance():  VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_EXT object VkDevice 0x1fce91d81f0[] has not been destroyed. The Vulkan spec states: All child objects created using instance must have been destroyed prior to destroying instance (https://vulkan.lunarg.com/doc/view/1.3.290.0/windows/1.3-extensions/vkspec.html#VUID-vkDestroyInstance-instance-00629)
[ERROR: Validation]
Validation Error: [ VUID-vkDestroyInstance-instance-00629 ] Object 0: handle = 0x1fcdcc99230, type = VK_OBJECT_TYPE_INSTANCE; | MessageID = 0x8b3d8e18 | vkDestroyInstance():  VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_EXT object VkDevice 0x1fce91d81f0[] has not been destroyed. The Vulkan spec states: All child objects created using instance must have been destroyed prior to destroying instance (https://vulkan.lunarg.com/doc/view/1.3.290.0/windows/1.3-extensions/vkspec.html#VUID-vkDestroyInstance-instance-00629)
[ERROR: Validation]
Validation Error: [ VUID-vkDestroyDevice-device-05137 ] Object 0: handle = 0xead9370000000008, type = VK_OBJECT_TYPE_IMAGE_VIEW; | MessageID = 0x4872eaa0 | vkDestroyInstance():  OBJ ERROR : For VkDevice 0x1fce91d81f0[], VkImageView 0xead9370000000008[] has not been destroyed. The Vulkan spec states: All child objects created on device must have been destroyed prior to destroying device (https://vulkan.lunarg.com/doc/view/1.3.290.0/windows/1.3-extensions/vkspec.html#VUID-vkDestroyDevice-device-05137)
[ERROR: Validation]
Validation Error: [ VUID-vkDestroyDevice-device-05137 ] Object 0: handle = 0xead9370000000008, type = VK_OBJECT_TYPE_IMAGE_VIEW; | MessageID = 0x4872eaa0 | vkDestroyInstance():  OBJ ERROR : For VkDevice 0x1fce91d81f0[], VkImageView 0xead9370000000008[] has not been destroyed. The Vulkan spec states: All child objects created on device must have been destroyed prior to destroying device (https://vulkan.lunarg.com/doc/view/1.3.290.0/windows/1.3-extensions/vkspec.html#VUID-vkDestroyDevice-device-05137)
[ERROR: Validation]
Validation Error: [ VUID-vkDestroyDevice-device-05137 ] Object 0: handle = 0xcb3ee80000000007, type = VK_OBJECT_TYPE_IMAGE_VIEW; | MessageID = 0x4872eaa0 | vkDestroyInstance():  OBJ ERROR : For VkDevice 0x1fce91d81f0[], VkImageView 0xcb3ee80000000007[] has not been destroyed. The Vulkan spec states: All child objects created on device must have been destroyed prior to destroying device (https://vulkan.lunarg.com/doc/view/1.3.290.0/windows/1.3-extensions/vkspec.html#VUID-vkDestroyDevice-device-05137)
[ERROR: Validation]
Validation Error: [ VUID-vkDestroyDevice-device-05137 ] Object 0: handle = 0xcb3ee80000000007, type = VK_OBJECT_TYPE_IMAGE_VIEW; | MessageID = 0x4872eaa0 | vkDestroyInstance():  OBJ ERROR : For VkDevice 0x1fce91d81f0[], VkImageView 0xcb3ee80000000007[] has not been destroyed. The Vulkan spec states: All child objects created on device must have been destroyed prior to destroying device (https://vulkan.lunarg.com/doc/view/1.3.290.0/windows/1.3-extensions/vkspec.html#VUID-vkDestroyDevice-device-05137)
[ERROR: Validation]
Validation Error: [ VUID-vkDestroyDevice-device-05137 ] Object 0: handle = 0xee647e0000000009, type = VK_OBJECT_TYPE_IMAGE_VIEW; | MessageID = 0x4872eaa0 | vkDestroyInstance():  OBJ ERROR : For VkDevice 0x1fce91d81f0[], VkImageView 0xee647e0000000009[] has not been destroyed. The Vulkan spec states: All child objects created on device must have been destroyed prior to destroying device (https://vulkan.lunarg.com/doc/view/1.3.290.0/windows/1.3-extensions/vkspec.html#VUID-vkDestroyDevice-device-05137)
[ERROR: Validation]
Validation Error: [ VUID-vkDestroyDevice-device-05137 ] Object 0: handle = 0xee647e0000000009, type = VK_OBJECT_TYPE_IMAGE_VIEW; | MessageID = 0x4872eaa0 | vkDestroyInstance():  OBJ ERROR : For VkDevice 0x1fce91d81f0[], VkImageView 0xee647e0000000009[] has not been destroyed. The Vulkan spec states: All child objects created on device must have been destroyed prior to destroying device (https://vulkan.lunarg.com/doc/view/1.3.290.0/windows/1.3-extensions/vkspec.html#VUID-vkDestroyDevice-device-05137)
[ERROR: Validation]
Validation Error: [ VUID-vkDestroyDevice-device-05137 ] Object 0: handle = 0xfa21a40000000003, type = VK_OBJECT_TYPE_SWAPCHAIN_KHR; | MessageID = 0x4872eaa0 | vkDestroyInstance():  OBJ ERROR : For VkDevice 0x1fce91d81f0[], VkSwapchainKHR 0xfa21a40000000003[] has not been destroyed. The Vulkan spec states: All child objects created on device must have been destroyed prior to destroying device (https://vulkan.lunarg.com/doc/view/1.3.290.0/windows/1.3-extensions/vkspec.html#VUID-vkDestroyDevice-device-05137)
[ERROR: Validation]
Validation Error: [ VUID-vkDestroyDevice-device-05137 ] Object 0: handle = 0xfa21a40000000003, type = VK_OBJECT_TYPE_SWAPCHAIN_KHR; | MessageID = 0x4872eaa0 | vkDestroyInstance():  OBJ ERROR : For VkDevice 0x1fce91d81f0[], VkSwapchainKHR 0xfa21a40000000003[] has not been destroyed. The Vulkan spec states: All child objects created on device must have been destroyed prior to destroying device (https://vulkan.lunarg.com/doc/view/1.3.290.0/windows/1.3-extensions/vkspec.html#VUID-vkDestroyDevice-device-05137)
[ERROR: Validation]
Validation Error: [ VUID-vkDestroyInstance-instance-00629 ] Object 0: handle = 0x1fcdcc99230, type = VK_OBJECT_TYPE_INSTANCE; Object 1: handle = 0xfab64d0000000002, type = VK_OBJECT_TYPE_SURFACE_KHR; | MessageID = 0x8b3d8e18 
| vkDestroyInstance():  OBJ ERROR : For VkInstance 0x1fcdcc99230[], VkSurfaceKHR 0xfab64d0000000002[] has not been destroyed. The Vulkan spec states: All child objects created using instance must have been destroyed prior to 
destroying instance (https://vulkan.lunarg.com/doc/view/1.3.290.0/windows/1.3-extensions/vkspec.html#VUID-vkDestroyInstance-instance-00629)
[ERROR: Validation]
Validation Error: [ VUID-vkDestroyInstance-instance-00629 ] Object 0: handle = 0x1fcdcc99230, type = VK_OBJECT_TYPE_INSTANCE; Object 1: handle = 0xfab64d0000000002, type = VK_OBJECT_TYPE_SURFACE_KHR; | MessageID = 0x8b3d8e18 
| vkDestroyInstance():  OBJ ERROR : For VkInstance 0x1fcdcc99230[], VkSurfaceKHR 0xfab64d0000000002[] has not been destroyed. The Vulkan spec states: All child objects created using instance must have been destroyed prior to 
destroying instance (https://vulkan.lunarg.com/doc/view/1.3.290.0/windows/1.3-extensions/vkspec.html#VUID-vkDestroyInstance-instance-00629)
[ERROR: Validation]
Validation Error: [ VUID-vkDestroyInstance-instance-00629 ] Object 0: handle = 0x1fcdcc99230, type = VK_OBJECT_TYPE_INSTANCE; Object 1: handle = 0xfd5b260000000001, type = VK_OBJECT_TYPE_DEBUG_UTILS_MESSENGER_EXT; | MessageID = 0x8b3d8e18 | vkDestroyInstance():  OBJ ERROR : For VkInstance 0x1fcdcc99230[], VkDebugUtilsMessengerEXT 0xfd5b260000000001[] has not been destroyed. The Vulkan spec states: All child objects created using instance must have been destroyed prior to destroying instance (https://vulkan.lunarg.com/doc/view/1.3.290.0/windows/1.3-extensions/vkspec.html#VUID-vkDestroyInstance-instance-00629)
[ERROR: Validation]
Validation Error: [ VUID-vkDestroyInstance-instance-00629 ] Object 0: handle = 0x1fcdcc99230, type = VK_OBJECT_TYPE_INSTANCE; Object 1: handle = 0xfd5b260000000001, type = VK_OBJECT_TYPE_DEBUG_UTILS_MESSENGER_EXT; | MessageID = 0x8b3d8e18 | vkDestroyInstance():  OBJ ERROR : For VkInstance 0x1fcdcc99230[], VkDebugUtilsMessengerEXT 0xfd5b260000000001[] has not been destroyed. The Vulkan spec states: All child objects created using instance must have been destroyed prior to destroying instance (https://vulkan.lunarg.com/doc/view/1.3.290.0/windows/1.3-extensions/vkspec.html#VUID-vkDestroyInstance-instance-00629)
ERROR:             vkDestroySwapchainKHR: Invalid device [VUID-vkDestroySwapchainKHR-device-parameter]
The program '[8936] kefir.exe' has exited with code 0 (0x0).
@charles-lunarg
Copy link
Owner

Hard to know what is causing the error without more information.

Did you accidentally destroy the swapchain before? You can use the API dump layer to print out all of the commands called.

Is there an implicit layer on the system causing the issue? You can open up vkconfig and set all of the implicit layers to be "off" to check. Alternatively, you can set VK_LOADER_LAYERS_DISABLE=~all~ as well to achieve the same result.

@Tomloyo
Copy link
Author

Tomloyo commented Oct 19, 2024

i enabled validation layers (i forgot to do that) updated the log, i just copied the repo from github and it still doesn't work

@charles-lunarg
Copy link
Owner

Can you set the environment variable VK_LOADER_LAYERS_DISABLE=~implicit~ to rule out the cause being from a bad implicit layer?

The validation errors shown here indicate that various vulkan objects are not being destroyed before shutdown, or possibly that they are being shutdown in the wrong order. If you destroy a VkDevice then destroy a VkSwapchainKHR, the crash would be due to the device being "destroyed" but you are still trying to use it, which is invalid Vulkan code and thus undefined behavior (hence the crash).

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

No branches or pull requests

2 participants