Page 1 of 4

Out of VRAM freeze

Posted: Fri Aug 02, 2019 1:17 pm
by Major Cooke
EDIT: Formerly titled "Lockups occasionally occurring when rendering new things"

Vulkan sometimes locks up when a new actor spawns and it attempts to display the sprite -- mainly in bigger mods like AEons of Death. I wish I could make this easier somehow to investigate but replicating this is going to be very difficult by itself. Currently working on a sample to do so, but no luck so far.

This doesn't happen in OpenGL.

Re: Lockups occasionally occurring when rendering new things

Posted: Fri Aug 02, 2019 1:24 pm
by dpJudas
I'm afraid without a test that can reliably reproduce the issue there's little there can be done.

Re: Lockups occasionally occurring when rendering new things

Posted: Fri Aug 02, 2019 2:06 pm
by Major Cooke
I am aware. I'll get one as soon as I can.

Re: Lockups occasionally occurring when rendering new things

Posted: Sat Aug 03, 2019 8:06 am
by _mental_
Try to reproduce it in windowed mode using a configuration with debugging symbols under Visual Studio.
When it freezes, switch to VS, hit Pause button in Debug toolbar (or select Debug -> Break All menu item, or press Ctrl+Alt+Break), and post a callstack of the main thread.
This may give us some hints.

Re: Lockups occasionally occurring when rendering new things

Posted: Sat Aug 03, 2019 10:27 am
by Major Cooke
Using full Debug mode or is RelWithDebInfo enough?

Re: Lockups occasionally occurring when rendering new things

Posted: Sat Aug 03, 2019 10:41 am
by _mental_
For getting initial callstack an optimized build is enough.

Re: Lockups occasionally occurring when rendering new things

Posted: Mon Aug 05, 2019 11:47 am
by Major Cooke
I'll start working on this when I get a chance. i'm out of town so it could be as far as next week when I start.

Re: Lockups occasionally occurring when rendering new things

Posted: Thu Aug 08, 2019 8:11 am
by Major Cooke
Okay. This is with Vulkan Device ID set to 0 and High Dynamic Range set to off.

Code: Select all

 	[External Code]	
>	gzdoom.exe!VulkanDevice::ReleaseResources() Line 504	C++
 	gzdoom.exe!VulkanDevice::~VulkanDevice() Line 97	C++
 	gzdoom.exe!Win32VulkanVideo::Shutdown() Line 33	C++
 	gzdoom.exe!SystemBaseFrameBuffer::~SystemBaseFrameBuffer() Line 379	C++
 	[External Code]	
 	gzdoom.exe!I_ShutdownGraphics() Line 103	C++
 	gzdoom.exe!`DoMain'::`1'::catch$11() Line 1019	C++
 	[External Code]	
 	gzdoom.exe!DoMain(HINSTANCE__ * hInstance) Line 991	C++
 	gzdoom.exe!wWinMain(HINSTANCE__ * hInstance, HINSTANCE__ * nothing, wchar_t * cmdline, int nCmdShow) Line 1323	C++
 	[External Code]	
Though honestly, I don't think this is going to help much but... This is what the debugger stack is saying but this seems a bit strange. Note: I'm not actually receiving a VM abort of any kind when running OpenGL. Again, this is merely just freezing occurring when playing.

Re: Lockups occasionally occurring when rendering new things

Posted: Thu Aug 08, 2019 8:35 am
by phantombeta
VM aborts aren't the only exception type that exists. You can see from how it's shutting down graphics that it isn't a VM abort, too. Most likely, it's getting an exception from either external code or from somewhere in GZDoom itself that failed to do something, and needs GZDoom to shut down.

Re: Lockups occasionally occurring when rendering new things

Posted: Thu Aug 08, 2019 8:39 am
by Major Cooke
I figured as much. But still... This makes me wonder, do I need to run it in full debug mode? I don't mind doing that, it's just that if it's caused by external code, I'm curious if full debug mode will display more.

Re: Lockups occasionally occurring when rendering new things

Posted: Thu Aug 08, 2019 8:57 am
by dpJudas
During development of the vulkan backend I have seen situations that hang at that location. It usually happens when the device is lost and then the display driver (Nvidia in my case) violates the vulkan spec by hanging in vkDeviceWaitIdle, which it isn't allowed to do after a device lost. I haven't seen this in a long time though - your drivers are recent I assume.

In general, this error indicates a vulkan API misuse situation - you may have to enable vk_debug while playing. Only problem with that is that you have to install the Vulkan SDK and it runs poorly while doing API validations.

Re: Lockups occasionally occurring when rendering new things

Posted: Thu Aug 08, 2019 9:15 am
by Major Cooke
Yes, my driver is of the latest.

Questions for you:
  • When you say it handles it poorly while doing API validations, do you mean it just runs slower or the debugging is poor?
  • Any particular version of the SDK I should use?
  • By vk_debug, that's just -vk_debug in the launch parameters too, right?
  • Is this at all fixable then? Or are you saying the only way to not lock up is to run it with vk_debug mode completely?
Here's an extended callstack if needed.

Code: Select all

 	nvoglv64.dll!0000000057b26456()	Unknown
 	nvoglv64.dll!0000000057b2b434()	Unknown
 	nvoglv64.dll!0000000057ab1d84()	Unknown
 	nvoglv64.dll!0000000057d62856()	Unknown
 	nvoglv64.dll!0000000057d5d423()	Unknown
>	gzdoom.exe!VulkanDevice::ReleaseResources() Line 504	C++
 	gzdoom.exe!VulkanDevice::~VulkanDevice() Line 97	C++
 	gzdoom.exe!Win32VulkanVideo::Shutdown() Line 33	C++
 	gzdoom.exe!SystemBaseFrameBuffer::~SystemBaseFrameBuffer() Line 379	C++
 	gzdoom.exe!VulkanFrameBuffer::`scalar deleting destructor'(unsigned int)	C++
 	gzdoom.exe!I_ShutdownGraphics() Line 103	C++
 	gzdoom.exe!`DoMain'::`1'::catch$11() Line 1019	C++
 	gzdoom.exe!_CallSettingFrame() Line 50	Unknown
 	gzdoom.exe!__FrameHandler3::CxxCallCatchBlock(_EXCEPTION_RECORD * pExcept) Line 1528	C++
 	ntdll.dll!00007ff89a1d3bf6()	Unknown
 	gzdoom.exe!DoMain(HINSTANCE__ * hInstance) Line 991	C++
 	gzdoom.exe!wWinMain(HINSTANCE__ * hInstance, HINSTANCE__ * nothing, wchar_t * cmdline, int nCmdShow) Line 1323	C++
 	[Inline Frame] gzdoom.exe!invoke_main() Line 118	C++
 	gzdoom.exe!__scrt_common_main_seh() Line 288	C++
 	kernel32.dll!00007ff8980981f4()	Unknown
 	ntdll.dll!00007ff89a19a271()	Unknown

Re: Lockups occasionally occurring when rendering new things

Posted: Thu Aug 08, 2019 10:32 am
by dpJudas
Yes, it just means it runs slower. Any Vulkan SDK from this year should do (note: last I updated myself was ~6 months ago, but afaik there's no breaking changes in the SDK). I'm talking about the vk_debug CVAR, which requires a restart after you change it. You will know its active and working when it writes some warnings out to the console when playing through MAP01.

As for at all fixable, well that depends on whether the source of the error can be tracked down. If you are lucky, the validation layer will write out some error just before it hangs. If you are unlucky the validation layer won't say a thing and we're back to square one.

Re: Lockups occasionally occurring when rendering new things

Posted: Thu Aug 08, 2019 11:48 am
by Major Cooke
Thank god for logfile!

Code: Select all

[vulkan error] Cannot free VkBuffer 0x7e7d[] that is in use by a command buffer. The Vulkan spec states: All submitted commands that refer to buffer, either directly or via a VkBufferView, must have completed execution (https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#VUID-vkDestroyBuffer-buffer-00922)
Called from vkEnumerateInstanceExtensionProperties
Called from vkEnumerateInstanceExtensionProperties
Called from vkEnumerateInstanceExtensionProperties
Called from vkEnumerateInstanceExtensionProperties
Called from vmaDestroyBuffer at c:\games\doom 2\gzsource\src\rendering\vulkan\thirdparty\vk_mem_alloc\vk_mem_alloc.h, line 9283
Called from VKBuffer::ResetAll at c:\games\doom 2\gzsource\src\rendering\vulkan\system\vk_buffers.cpp, line 35
Called from VulkanFrameBuffer::~VulkanFrameBuffer at c:\games\doom 2\gzsource\src\rendering\vulkan\system\vk_framebuffer.cpp, line 107
Called from VulkanFrameBuffer::`scalar deleting destructor'
Called from I_ShutdownGraphics at c:\games\doom 2\gzsource\src\win32\hardware.cpp, line 103
Called from `DoMain'::`1'::catch$11 at c:\games\doom 2\gzsource\src\win32\i_main.cpp, line 1019
Called from _CallSettingFrame at d:\agent\_work\1\s\src\vctools\crt\vcruntime\src\eh\amd64\handlers.asm, line 50
Called from __FrameHandler3::CxxCallCatchBlock at d:\agent\_work\1\s\src\vctools\crt\vcruntime\src\eh\frame.cpp, line 1528
Called from RtlCaptureContext
Called from DoMain at c:\games\doom 2\gzsource\src\win32\i_main.cpp, line 991
Called from wWinMain at c:\games\doom 2\gzsource\src\win32\i_main.cpp, line 1323
Called from __scrt_common_main_seh at d:\agent\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl, line 288
Called from BaseThreadInitThunk
Called from RtlUserThreadStart


[vulkan error] Cannot free VkBuffer 0x7e7b[] that is in use by a command buffer. The Vulkan spec states: All submitted commands that refer to buffer, either directly or via a VkBufferView, must have completed execution (https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#VUID-vkDestroyBuffer-buffer-00922)
Called from vkEnumerateInstanceExtensionProperties
Called from vkEnumerateInstanceExtensionProperties
Called from vkEnumerateInstanceExtensionProperties
Called from vkEnumerateInstanceExtensionProperties
Called from vmaDestroyBuffer at c:\games\doom 2\gzsource\src\rendering\vulkan\thirdparty\vk_mem_alloc\vk_mem_alloc.h, line 9283
Called from VKBuffer::ResetAll at c:\games\doom 2\gzsource\src\rendering\vulkan\system\vk_buffers.cpp, line 35
Called from VulkanFrameBuffer::~VulkanFrameBuffer at c:\games\doom 2\gzsource\src\rendering\vulkan\system\vk_framebuffer.cpp, line 107
Called from VulkanFrameBuffer::`scalar deleting destructor'
Called from I_ShutdownGraphics at c:\games\doom 2\gzsource\src\win32\hardware.cpp, line 103
Called from `DoMain'::`1'::catch$11 at c:\games\doom 2\gzsource\src\win32\i_main.cpp, line 1019
Called from _CallSettingFrame at d:\agent\_work\1\s\src\vctools\crt\vcruntime\src\eh\amd64\handlers.asm, line 50
Called from __FrameHandler3::CxxCallCatchBlock at d:\agent\_work\1\s\src\vctools\crt\vcruntime\src\eh\frame.cpp, line 1528
Called from RtlCaptureContext
Called from DoMain at c:\games\doom 2\gzsource\src\win32\i_main.cpp, line 991
Called from wWinMain at c:\games\doom 2\gzsource\src\win32\i_main.cpp, line 1323
Called from __scrt_common_main_seh at d:\agent\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl, line 288
Called from BaseThreadInitThunk
Called from RtlUserThreadStart


[vulkan error] Cannot free VkBuffer 0x24[] that is in use by a command buffer. The Vulkan spec states: All submitted commands that refer to buffer, either directly or via a VkBufferView, must have completed execution (https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#VUID-vkDestroyBuffer-buffer-00922)
Called from vkEnumerateInstanceExtensionProperties
Called from vkEnumerateInstanceExtensionProperties
Called from vkEnumerateInstanceExtensionProperties
Called from vkEnumerateInstanceExtensionProperties
Called from vmaDestroyBuffer at c:\games\doom 2\gzsource\src\rendering\vulkan\thirdparty\vk_mem_alloc\vk_mem_alloc.h, line 9283
Called from VKBuffer::ResetAll at c:\games\doom 2\gzsource\src\rendering\vulkan\system\vk_buffers.cpp, line 35
Called from VulkanFrameBuffer::~VulkanFrameBuffer at c:\games\doom 2\gzsource\src\rendering\vulkan\system\vk_framebuffer.cpp, line 107
Called from VulkanFrameBuffer::`scalar deleting destructor'
Called from I_ShutdownGraphics at c:\games\doom 2\gzsource\src\win32\hardware.cpp, line 103
Called from `DoMain'::`1'::catch$11 at c:\games\doom 2\gzsource\src\win32\i_main.cpp, line 1019
Called from _CallSettingFrame at d:\agent\_work\1\s\src\vctools\crt\vcruntime\src\eh\amd64\handlers.asm, line 50
Called from __FrameHandler3::CxxCallCatchBlock at d:\agent\_work\1\s\src\vctools\crt\vcruntime\src\eh\frame.cpp, line 1528
Called from RtlCaptureContext
Called from DoMain at c:\games\doom 2\gzsource\src\win32\i_main.cpp, line 991
Called from wWinMain at c:\games\doom 2\gzsource\src\win32\i_main.cpp, line 1323
Called from __scrt_common_main_seh at d:\agent\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl, line 288
Called from BaseThreadInitThunk
Called from RtlUserThreadStart


[vulkan error] Cannot free VkBuffer 0x22[] that is in use by a command buffer. The Vulkan spec states: All submitted commands that refer to buffer, either directly or via a VkBufferView, must have completed execution (https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#VUID-vkDestroyBuffer-buffer-00922)
Called from vkEnumerateInstanceExtensionProperties
Called from vkEnumerateInstanceExtensionProperties
Called from vkEnumerateInstanceExtensionProperties
Called from vkEnumerateInstanceExtensionProperties
Called from vmaDestroyBuffer at c:\games\doom 2\gzsource\src\rendering\vulkan\thirdparty\vk_mem_alloc\vk_mem_alloc.h, line 9283
Called from VKBuffer::ResetAll at c:\games\doom 2\gzsource\src\rendering\vulkan\system\vk_buffers.cpp, line 35
Called from VulkanFrameBuffer::~VulkanFrameBuffer at c:\games\doom 2\gzsource\src\rendering\vulkan\system\vk_framebuffer.cpp, line 107
Called from VulkanFrameBuffer::`scalar deleting destructor'
Called from I_ShutdownGraphics at c:\games\doom 2\gzsource\src\win32\hardware.cpp, line 103
Called from `DoMain'::`1'::catch$11 at c:\games\doom 2\gzsource\src\win32\i_main.cpp, line 1019
Called from _CallSettingFrame at d:\agent\_work\1\s\src\vctools\crt\vcruntime\src\eh\amd64\handlers.asm, line 50
Called from __FrameHandler3::CxxCallCatchBlock at d:\agent\_work\1\s\src\vctools\crt\vcruntime\src\eh\frame.cpp, line 1528
Called from RtlCaptureContext
Called from DoMain at c:\games\doom 2\gzsource\src\win32\i_main.cpp, line 991
Called from wWinMain at c:\games\doom 2\gzsource\src\win32\i_main.cpp, line 1323
Called from __scrt_common_main_seh at d:\agent\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl, line 288
Called from BaseThreadInitThunk
Called from RtlUserThreadStart


[vulkan error] Cannot free VkBuffer 0x1e[] that is in use by a command buffer. The Vulkan spec states: All submitted commands that refer to buffer, either directly or via a VkBufferView, must have completed execution (https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#VUID-vkDestroyBuffer-buffer-00922)
Called from vkEnumerateInstanceExtensionProperties
Called from vkEnumerateInstanceExtensionProperties
Called from vkEnumerateInstanceExtensionProperties
Called from vkEnumerateInstanceExtensionProperties
Called from vmaDestroyBuffer at c:\games\doom 2\gzsource\src\rendering\vulkan\thirdparty\vk_mem_alloc\vk_mem_alloc.h, line 9283
Called from VKBuffer::ResetAll at c:\games\doom 2\gzsource\src\rendering\vulkan\system\vk_buffers.cpp, line 35
Called from VulkanFrameBuffer::~VulkanFrameBuffer at c:\games\doom 2\gzsource\src\rendering\vulkan\system\vk_framebuffer.cpp, line 107
Called from VulkanFrameBuffer::`scalar deleting destructor'
Called from I_ShutdownGraphics at c:\games\doom 2\gzsource\src\win32\hardware.cpp, line 103
Called from `DoMain'::`1'::catch$11 at c:\games\doom 2\gzsource\src\win32\i_main.cpp, line 1019
Called from _CallSettingFrame at d:\agent\_work\1\s\src\vctools\crt\vcruntime\src\eh\amd64\handlers.asm, line 50
Called from __FrameHandler3::CxxCallCatchBlock at d:\agent\_work\1\s\src\vctools\crt\vcruntime\src\eh\frame.cpp, line 1528
Called from RtlCaptureContext
Called from DoMain at c:\games\doom 2\gzsource\src\win32\i_main.cpp, line 991
Called from wWinMain at c:\games\doom 2\gzsource\src\win32\i_main.cpp, line 1323
Called from __scrt_common_main_seh at d:\agent\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl, line 288
Called from BaseThreadInitThunk
Called from RtlUserThreadStart


[vulkan error] Cannot free VkBuffer 0x1c[] that is in use by a command buffer. The Vulkan spec states: All submitted commands that refer to buffer, either directly or via a VkBufferView, must have completed execution (https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#VUID-vkDestroyBuffer-buffer-00922)
Called from vkEnumerateInstanceExtensionProperties
Called from vkEnumerateInstanceExtensionProperties
Called from vkEnumerateInstanceExtensionProperties
Called from vkEnumerateInstanceExtensionProperties
Called from vmaDestroyBuffer at c:\games\doom 2\gzsource\src\rendering\vulkan\thirdparty\vk_mem_alloc\vk_mem_alloc.h, line 9283
Called from VKBuffer::ResetAll at c:\games\doom 2\gzsource\src\rendering\vulkan\system\vk_buffers.cpp, line 35
Called from VulkanFrameBuffer::~VulkanFrameBuffer at c:\games\doom 2\gzsource\src\rendering\vulkan\system\vk_framebuffer.cpp, line 107
Called from VulkanFrameBuffer::`scalar deleting destructor'
Called from I_ShutdownGraphics at c:\games\doom 2\gzsource\src\win32\hardware.cpp, line 103
Called from `DoMain'::`1'::catch$11 at c:\games\doom 2\gzsource\src\win32\i_main.cpp, line 1019
Called from _CallSettingFrame at d:\agent\_work\1\s\src\vctools\crt\vcruntime\src\eh\amd64\handlers.asm, line 50
Called from __FrameHandler3::CxxCallCatchBlock at d:\agent\_work\1\s\src\vctools\crt\vcruntime\src\eh\frame.cpp, line 1528
Called from RtlCaptureContext
Called from DoMain at c:\games\doom 2\gzsource\src\win32\i_main.cpp, line 991
Called from wWinMain at c:\games\doom 2\gzsource\src\win32\i_main.cpp, line 1323
Called from __scrt_common_main_seh at d:\agent\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl, line 288
Called from BaseThreadInitThunk
Called from RtlUserThreadStart


[vulkan error] Cannot free VkBuffer 0x2ad9[] that is in use by a command buffer. The Vulkan spec states: All submitted commands that refer to buffer, either directly or via a VkBufferView, must have completed execution (https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#VUID-vkDestroyBuffer-buffer-00922)
Called from vkEnumerateInstanceExtensionProperties
Called from vkEnumerateInstanceExtensionProperties
Called from vkEnumerateInstanceExtensionProperties
Called from vkEnumerateInstanceExtensionProperties
Called from vmaDestroyBuffer at c:\games\doom 2\gzsource\src\rendering\vulkan\thirdparty\vk_mem_alloc\vk_mem_alloc.h, line 9283
Called from VKBuffer::ResetAll at c:\games\doom 2\gzsource\src\rendering\vulkan\system\vk_buffers.cpp, line 35
Called from VulkanFrameBuffer::~VulkanFrameBuffer at c:\games\doom 2\gzsource\src\rendering\vulkan\system\vk_framebuffer.cpp, line 107
Called from VulkanFrameBuffer::`scalar deleting destructor'
Called from I_ShutdownGraphics at c:\games\doom 2\gzsource\src\win32\hardware.cpp, line 103
Called from `DoMain'::`1'::catch$11 at c:\games\doom 2\gzsource\src\win32\i_main.cpp, line 1019
Called from _CallSettingFrame at d:\agent\_work\1\s\src\vctools\crt\vcruntime\src\eh\amd64\handlers.asm, line 50
Called from __FrameHandler3::CxxCallCatchBlock at d:\agent\_work\1\s\src\vctools\crt\vcruntime\src\eh\frame.cpp, line 1528
Called from RtlCaptureContext
Called from DoMain at c:\games\doom 2\gzsource\src\win32\i_main.cpp, line 991
Called from wWinMain at c:\games\doom 2\gzsource\src\win32\i_main.cpp, line 1323
Called from __scrt_common_main_seh at d:\agent\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl, line 288
Called from BaseThreadInitThunk
Called from RtlUserThreadStart


[vulkan error] Cannot free VkBuffer 0x16[] that is in use by a command buffer. The Vulkan spec states: All submitted commands that refer to buffer, either directly or via a VkBufferView, must have completed execution (https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#VUID-vkDestroyBuffer-buffer-00922)
Called from vkEnumerateInstanceExtensionProperties
Called from vkEnumerateInstanceExtensionProperties
Called from vkEnumerateInstanceExtensionProperties
Called from vkEnumerateInstanceExtensionProperties
Called from vmaDestroyBuffer at c:\games\doom 2\gzsource\src\rendering\vulkan\thirdparty\vk_mem_alloc\vk_mem_alloc.h, line 9283
Called from VKBuffer::ResetAll at c:\games\doom 2\gzsource\src\rendering\vulkan\system\vk_buffers.cpp, line 35
Called from VulkanFrameBuffer::~VulkanFrameBuffer at c:\games\doom 2\gzsource\src\rendering\vulkan\system\vk_framebuffer.cpp, line 107
Called from VulkanFrameBuffer::`scalar deleting destructor'
Called from I_ShutdownGraphics at c:\games\doom 2\gzsource\src\win32\hardware.cpp, line 103
Called from `DoMain'::`1'::catch$11 at c:\games\doom 2\gzsource\src\win32\i_main.cpp, line 1019
Called from _CallSettingFrame at d:\agent\_work\1\s\src\vctools\crt\vcruntime\src\eh\amd64\handlers.asm, line 50
Called from __FrameHandler3::CxxCallCatchBlock at d:\agent\_work\1\s\src\vctools\crt\vcruntime\src\eh\frame.cpp, line 1528
Called from RtlCaptureContext
Called from DoMain at c:\games\doom 2\gzsource\src\win32\i_main.cpp, line 991
Called from wWinMain at c:\games\doom 2\gzsource\src\win32\i_main.cpp, line 1323
Called from __scrt_common_main_seh at d:\agent\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl, line 288
Called from BaseThreadInitThunk
Called from RtlUserThreadStart


[vulkan error] Cannot call vkDestroyImage on VkImage VkHardwareTexture.mImage[VkHardwareTexture.mImage] that is currently in use by a command buffer. The Vulkan spec states: All submitted commands that refer to image, either directly or via a VkImageView, must have completed execution (https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#VUID-vkDestroyImage-image-01000)
Called from vkEnumerateInstanceExtensionProperties
Called from vkEnumerateInstanceExtensionProperties
Called from vkEnumerateInstanceExtensionProperties
Called from vkEnumerateInstanceExtensionProperties
Called from vkEnumerateInstanceExtensionProperties
Called from vmaDestroyImage at c:\games\doom 2\gzsource\src\rendering\vulkan\thirdparty\vk_mem_alloc\vk_mem_alloc.h, line 9359
Called from std::vector<std::unique_ptr<VulkanImage,std::default_delete<VulkanImage> >,std::allocator<std::unique_ptr<VulkanImage,std::defau at c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.16.27023\include\vector, line 1849
Called from VulkanFrameBuffer::DeleteFrameObjects at c:\games\doom 2\gzsource\src\rendering\vulkan\system\vk_framebuffer.cpp, line 209
Called from VulkanFrameBuffer::~VulkanFrameBuffer at c:\games\doom 2\gzsource\src\rendering\vulkan\system\vk_framebuffer.cpp, line 120
Called from VulkanFrameBuffer::`scalar deleting destructor'
Called from I_ShutdownGraphics at c:\games\doom 2\gzsource\src\win32\hardware.cpp, line 103
Called from `DoMain'::`1'::catch$11 at c:\games\doom 2\gzsource\src\win32\i_main.cpp, line 1019
Called from _CallSettingFrame at d:\agent\_work\1\s\src\vctools\crt\vcruntime\src\eh\amd64\handlers.asm, line 50
Called from __FrameHandler3::CxxCallCatchBlock at d:\agent\_work\1\s\src\vctools\crt\vcruntime\src\eh\frame.cpp, line 1528
Called from RtlCaptureContext
Called from DoMain at c:\games\doom 2\gzsource\src\win32\i_main.cpp, line 991
Called from wWinMain at c:\games\doom 2\gzsource\src\win32\i_main.cpp, line 1323
Called from __scrt_common_main_seh at d:\agent\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl, line 288
Called from BaseThreadInitThunk
Called from RtlUserThreadStart


[vulkan error] Cannot call vkDestroyImageView on VkImageView VkHardwareTexture.mImageView[VkHardwareTexture.mImageView] that is currently in use by a command buffer. The Vulkan spec states: All submitted commands that refer to imageView must have completed execution (https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#VUID-vkDestroyImageView-imageView-01026)
Called from vkEnumerateInstanceExtensionProperties
Called from vkEnumerateInstanceExtensionProperties
Called from vkEnumerateInstanceExtensionProperties
Called from vkEnumerateInstanceExtensionProperties
Called from vkEnumerateInstanceExtensionProperties
Called from std::vector<std::unique_ptr<VulkanImageView,std::default_delete<VulkanImageView> >,std::allocator<std::unique_ptr<VulkanImageVie at c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.16.27023\include\vector, line 1849
Called from VulkanFrameBuffer::DeleteFrameObjects at c:\games\doom 2\gzsource\src\rendering\vulkan\system\vk_framebuffer.cpp, line 210
Called from VulkanFrameBuffer::~VulkanFrameBuffer at c:\games\doom 2\gzsource\src\rendering\vulkan\system\vk_framebuffer.cpp, line 120
Called from VulkanFrameBuffer::`scalar deleting destructor'
Called from I_ShutdownGraphics at c:\games\doom 2\gzsource\src\win32\hardware.cpp, line 103
Called from `DoMain'::`1'::catch$11 at c:\games\doom 2\gzsource\src\win32\i_main.cpp, line 1019
Called from _CallSettingFrame at d:\agent\_work\1\s\src\vctools\crt\vcruntime\src\eh\amd64\handlers.asm, line 50
Called from __FrameHandler3::CxxCallCatchBlock at d:\agent\_work\1\s\src\vctools\crt\vcruntime\src\eh\frame.cpp, line 1528
Called from RtlCaptureContext
Called from DoMain at c:\games\doom 2\gzsource\src\win32\i_main.cpp, line 991
Called from wWinMain at c:\games\doom 2\gzsource\src\win32\i_main.cpp, line 1323
Called from __scrt_common_main_seh at d:\agent\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl, line 288
Called from BaseThreadInitThunk
Called from RtlUserThreadStart


[vulkan error] Cannot free VkBuffer VkHardwareTexture.mStagingBuffer[VkHardwareTexture.mStagingBuffer] that is in use by a command buffer. The Vulkan spec states: All submitted commands that refer to buffer, either directly or via a VkBufferView, must have completed execution (https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#VUID-vkDestroyBuffer-buffer-00922)
Called from vkEnumerateInstanceExtensionProperties
Called from vkEnumerateInstanceExtensionProperties
Called from vkEnumerateInstanceExtensionProperties
Called from vkEnumerateInstanceExtensionProperties
Called from vmaDestroyBuffer at c:\games\doom 2\gzsource\src\rendering\vulkan\thirdparty\vk_mem_alloc\vk_mem_alloc.h, line 9283
Called from std::vector<std::unique_ptr<VulkanBuffer,std::default_delete<VulkanBuffer> >,std::allocator<std::unique_ptr<VulkanBuffer,std::de at c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.16.27023\include\vector, line 1849
Called from VulkanFrameBuffer::DeleteFrameObjects at c:\games\doom 2\gzsource\src\rendering\vulkan\system\vk_framebuffer.cpp, line 212
Called from VulkanFrameBuffer::~VulkanFrameBuffer at c:\games\doom 2\gzsource\src\rendering\vulkan\system\vk_framebuffer.cpp, line 120
Called from VulkanFrameBuffer::`scalar deleting destructor'
Called from I_ShutdownGraphics at c:\games\doom 2\gzsource\src\win32\hardware.cpp, line 103
Called from `DoMain'::`1'::catch$11 at c:\games\doom 2\gzsource\src\win32\i_main.cpp, line 1019
Called from _CallSettingFrame at d:\agent\_work\1\s\src\vctools\crt\vcruntime\src\eh\amd64\handlers.asm, line 50
Called from __FrameHandler3::CxxCallCatchBlock at d:\agent\_work\1\s\src\vctools\crt\vcruntime\src\eh\frame.cpp, line 1528
Called from RtlCaptureContext
Called from DoMain at c:\games\doom 2\gzsource\src\win32\i_main.cpp, line 991
Called from wWinMain at c:\games\doom 2\gzsource\src\win32\i_main.cpp, line 1323
Called from __scrt_common_main_seh at d:\agent\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl, line 288
Called from BaseThreadInitThunk
Called from RtlUserThreadStart


[vulkan error] Cannot call vkFreeDescriptorSets() on VkDescriptorSet VkHardwareTexture.mDescriptorSets[VkHardwareTexture.mDescriptorSets] that is in use by a command buffer. The Vulkan spec states: All submitted commands that refer to any element of pDescriptorSets must have completed execution (https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#VUID-vkFreeDescriptorSets-pDescriptorSets-00309)
Called from vkEnumerateInstanceExtensionProperties
Called from vkEnumerateInstanceExtensionProperties
Called from vkEnumerateInstanceExtensionProperties
Called from vkEnumerateInstanceExtensionProperties
Called from vkEnumerateInstanceExtensionProperties
Called from std::vector<std::unique_ptr<VulkanDescriptorSet,std::default_delete<VulkanDescriptorSet> >,std::allocator<std::unique_ptr<Vulkan at c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.16.27023\include\vector, line 1849
Called from VulkanFrameBuffer::DeleteFrameObjects at c:\games\doom 2\gzsource\src\rendering\vulkan\system\vk_framebuffer.cpp, line 213
Called from VulkanFrameBuffer::~VulkanFrameBuffer at c:\games\doom 2\gzsource\src\rendering\vulkan\system\vk_framebuffer.cpp, line 120
Called from VulkanFrameBuffer::`scalar deleting destructor'
Called from I_ShutdownGraphics at c:\games\doom 2\gzsource\src\win32\hardware.cpp, line 103
Called from `DoMain'::`1'::catch$11 at c:\games\doom 2\gzsource\src\win32\i_main.cpp, line 1019
Called from _CallSettingFrame at d:\agent\_work\1\s\src\vctools\crt\vcruntime\src\eh\amd64\handlers.asm, line 50
Called from __FrameHandler3::CxxCallCatchBlock at d:\agent\_work\1\s\src\vctools\crt\vcruntime\src\eh\frame.cpp, line 1528
Called from RtlCaptureContext
Called from DoMain at c:\games\doom 2\gzsource\src\win32\i_main.cpp, line 991
Called from wWinMain at c:\games\doom 2\gzsource\src\win32\i_main.cpp, line 1323
Called from __scrt_common_main_seh at d:\agent\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl, line 288
Called from BaseThreadInitThunk
Called from RtlUserThreadStart


[vulkan error] Attempt to free VkCommandBuffer VulkanFrameBuffer.mDrawCommands[VulkanFrameBuffer.mDrawCommands] which is in use. The Vulkan spec states: All elements of pCommandBuffers must not be in the pending state (https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#VUID-vkFreeCommandBuffers-pCommandBuffers-00047)
Called from vkEnumerateInstanceExtensionProperties
Called from vkEnumerateInstanceExtensionProperties
Called from vkEnumerateInstanceExtensionProperties
Called from vkEnumerateInstanceExtensionProperties
Called from vkEnumerateInstanceExtensionProperties
Called from std::_Destroy_range<std::allocator<std::unique_ptr<VulkanCommandBuffer,std::default_delete<VulkanCommandBuffer> > > > at c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.16.27023\include\xmemory0, line 1158
Called from VulkanFrameBuffer::DeleteFrameObjects at c:\games\doom 2\gzsource\src\rendering\vulkan\system\vk_framebuffer.cpp, line 215
Called from VulkanFrameBuffer::~VulkanFrameBuffer at c:\games\doom 2\gzsource\src\rendering\vulkan\system\vk_framebuffer.cpp, line 120
Called from VulkanFrameBuffer::`scalar deleting destructor'
Called from I_ShutdownGraphics at c:\games\doom 2\gzsource\src\win32\hardware.cpp, line 103
Called from `DoMain'::`1'::catch$11 at c:\games\doom 2\gzsource\src\win32\i_main.cpp, line 1019
Called from _CallSettingFrame at d:\agent\_work\1\s\src\vctools\crt\vcruntime\src\eh\amd64\handlers.asm, line 50
Called from __FrameHandler3::CxxCallCatchBlock at d:\agent\_work\1\s\src\vctools\crt\vcruntime\src\eh\frame.cpp, line 1528
Called from RtlCaptureContext
Called from DoMain at c:\games\doom 2\gzsource\src\win32\i_main.cpp, line 991
Called from wWinMain at c:\games\doom 2\gzsource\src\win32\i_main.cpp, line 1323
Called from __scrt_common_main_seh at d:\agent\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl, line 288
Called from BaseThreadInitThunk
Called from RtlUserThreadStart


[vulkan error] Attempt to free VkCommandBuffer VulkanFrameBuffer.mTransferCommands[VulkanFrameBuffer.mTransferCommands] which is in use. The Vulkan spec states: All elements of pCommandBuffers must not be in the pending state (https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#VUID-vkFreeCommandBuffers-pCommandBuffers-00047)
Called from vkEnumerateInstanceExtensionProperties
Called from vkEnumerateInstanceExtensionProperties
Called from vkEnumerateInstanceExtensionProperties
Called from vkEnumerateInstanceExtensionProperties
Called from vkEnumerateInstanceExtensionProperties
Called from std::_Destroy_range<std::allocator<std::unique_ptr<VulkanCommandBuffer,std::default_delete<VulkanCommandBuffer> > > > at c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.16.27023\include\xmemory0, line 1158
Called from VulkanFrameBuffer::DeleteFrameObjects at c:\games\doom 2\gzsource\src\rendering\vulkan\system\vk_framebuffer.cpp, line 215
Called from VulkanFrameBuffer::~VulkanFrameBuffer at c:\games\doom 2\gzsource\src\rendering\vulkan\system\vk_framebuffer.cpp, line 120
Called from VulkanFrameBuffer::`scalar deleting destructor'
Called from I_ShutdownGraphics at c:\games\doom 2\gzsource\src\win32\hardware.cpp, line 103
Called from `DoMain'::`1'::catch$11 at c:\games\doom 2\gzsource\src\win32\i_main.cpp, line 1019
Called from _CallSettingFrame at d:\agent\_work\1\s\src\vctools\crt\vcruntime\src\eh\amd64\handlers.asm, line 50
Called from __FrameHandler3::CxxCallCatchBlock at d:\agent\_work\1\s\src\vctools\crt\vcruntime\src\eh\frame.cpp, line 1528
Called from RtlCaptureContext
Called from DoMain at c:\games\doom 2\gzsource\src\win32\i_main.cpp, line 991
Called from wWinMain at c:\games\doom 2\gzsource\src\win32\i_main.cpp, line 1323
Called from __scrt_common_main_seh at d:\agent\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl, line 288
Called from BaseThreadInitThunk
Called from RtlUserThreadStart


[vulkan error] VkFence 0xf[] is in use. The Vulkan spec states: All queue submission commands that refer to fence must have completed execution (https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#VUID-vkDestroyFence-fence-01120)
Called from vkEnumerateInstanceExtensionProperties
Called from vkEnumerateInstanceExtensionProperties
Called from vkEnumerateInstanceExtensionProperties
Called from vkEnumerateInstanceExtensionProperties
Called from std::unique_ptr<VulkanFence,std::default_delete<VulkanFence> >::~unique_ptr<VulkanFence,std::default_delete<VulkanFence> > at c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.16.27023\include\memory, line 2296
Called from `eh vector destructor iterator'
Called from VulkanFrameBuffer::~VulkanFrameBuffer at c:\games\doom 2\gzsource\src\rendering\vulkan\system\vk_framebuffer.cpp, line 121
Called from VulkanFrameBuffer::`scalar deleting destructor'
Called from I_ShutdownGraphics at c:\games\doom 2\gzsource\src\win32\hardware.cpp, line 103
Called from `DoMain'::`1'::catch$11 at c:\games\doom 2\gzsource\src\win32\i_main.cpp, line 1019
Called from _CallSettingFrame at d:\agent\_work\1\s\src\vctools\crt\vcruntime\src\eh\amd64\handlers.asm, line 50
Called from __FrameHandler3::CxxCallCatchBlock at d:\agent\_work\1\s\src\vctools\crt\vcruntime\src\eh\frame.cpp, line 1528
Called from RtlCaptureContext
Called from DoMain at c:\games\doom 2\gzsource\src\win32\i_main.cpp, line 991
Called from wWinMain at c:\games\doom 2\gzsource\src\win32\i_main.cpp, line 1323
Called from __scrt_common_main_seh at d:\agent\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl, line 288
Called from BaseThreadInitThunk
Called from RtlUserThreadStart

Re: Lockups occasionally occurring when rendering new things

Posted: Thu Aug 08, 2019 12:45 pm
by dpJudas
Okay, that's interesting. Seems vkDeviceWaitIdle is called too late, after RAII has already started to tear down various objects. Fixing that probably will make it stop hanging and reveal the actual error it is trying to write out.