openvr icon indicating copy to clipboard operation
openvr copied to clipboard

OpenVR seems to forget to destroy a Vulkan semaphore on exit

Open elmar-k opened this issue 3 years ago • 0 comments

Dear all,

I'm using the latest OpenVR that comes with SteamVR on a CentOS 8 Linux box with AMD Radeon RX 6900 XT, and VIVE Pro.

.local/share/Steam/steamapps/common/SteamVR/bin/version.txt is 1647034158 md5sum of .local/share/Steam/steamapps/common/SteamVR/bin/linux64/libopenvr_api.so is 4ad6f3654d43a7135e3c89b8f7adb437

If my app only calls VR_InitInternal, tracks the VR controllers but doesn't submit anything to the compositor, and then exits with VR_ShutdownInternal, everything is fine.

But if my app additionally uses the headset, the Vulkan validation layer stops with this error upon exit (when I destroy the Vulkan device after having called VR_ShutdownInternal).

Vulkan Validation layer reported error 0 (Validation Error: [ VUID-vkDestroyDevice-device-00378 ] Object 0: handle = 0x35394440, type = VK_OBJECT_TYPE_DEVICE; Object 1: handle = 0x30c000000030c, type = VK_OBJECT_TYPE_SEMAPHORE; | MessageID = 0x71500fba | OBJ ERROR : For VkDevice 0x35394440[], VkSemaphore 0x30c000000030c[] 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.2.141.0/linux/1.2-extensions/ vkspec.html#VUID-vkDestroyDevice-device-00378)).

Of course, it was not my app that created this semaphore with ID 0x30c000000030c: Can you please check the OpenVR code for forgotten Vulkan semaphores?

Many thanks, Elmar

elmar-k avatar Apr 07 '22 06:04 elmar-k