kondrak / vkQuake2

id Software's Quake 2 v3.21 with mission packs and Vulkan support (Windows, Linux, macOS, FreeBSD, Raspberry Pi 4)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Alt+tab sporadic crash

dorian-apanel-intel opened this issue · comments

Launching the game in fullscreen mode (exclusive fullscreen might be off) and pressing Alt+tab repeatedly causes sporadic game crash.

Vulkan validation layers print following error just before it:

Objects: 1
        [0] 0x1da867e0030, type: 1, name: NULL
VUID-VkSwapchainCreateInfoKHR-imageExtent-01689(ERROR / SPEC): msgNum: 320081257 - Validation Error: [ VUID-VkSwapchainCreateInfoKHR-imageExtent-01689 ] | MessageID = 0x13140d69 | vkCreateSwapchainKHR(): pCreateInfo->imageExtent = (0, 0) which is illegal. The Vulkan spec states: imageExtent members width and height must both be non-zero (https://vulkan.lunarg.com/doc/view/1.3.261.1/windows/1.3-extensions/vkspec.html#VUID-VkSwapchainCreateInfoKHR-imageExtent-01689)
    Objects: 0
UNASSIGNED-GeneralParameterError-RequiredParameter(ERROR / SPEC): msgNum: -1711571459 - Validation Error: [ UNASSIGNED-GeneralParameterError-RequiredParameter ] | MessageID = 0x99fb7dfd | vkCreateImageView: required parameter pCreateInfo->image specified as VK_NULL_HANDLE
    Objects: 0
VUID-VkImageViewCreateInfo-image-parameter(ERROR / SPEC): msgNum: 315335852 - Validation Error: [ VUID-VkImageViewCreateInfo-image-parameter ] Object 0: handle = 0x1da867e0030, type = VK_OBJECT_TYPE_INSTANCE; | MessageID = 0x12cba4ac | VkImageViewCreateInfo(): Invalid VkImage Object 0x0. The Vulkan spec states: image must be a valid VkImage handle (https://vulkan.lunarg.com/doc/view/1.3.261.1/windows/1.3-extensions/vkspec.html#VUID-VkImageViewCreateInfo-image-parameter)
    Objects: 1
        [0] 0x1da867e0030, type: 1, name: NULL

Looks like Alt+tabbing causes windows to minimize, which reduces window size to 0x0. Game tries to recreate swapchain with that size.

Reproduced on NVidia 1060 and Inel Arc 770 (after 5-10 alt+tabs).

Could not recreate the error with commit 84589fd Linux AppImage version.

Tested with fullscreen yes , alt+enter, alt+tab 20x times
Tested with fullscreen no, alt+tab 20x times.

Nvidia 525.47.35 driver
Vulkan SDK 1.3.224.1

Hi @qurious-pixel. I haven't tested it on Linux. This observation was on Windows.

Thanks for the report! Indeed seems like a Windows-specific issue do to how window management works there, I'll check this out once I find some time.