Out of memory bug running 4.22.X on linux with Vulkan

When I run UE4Editor on linux I get a lot of errors that show: LogVulkanRHI: Warning: Failed to allocate Device Memory, Requested=262144.00Kb MemTypeIndex=7 and then crashes with a large output. If I run vkcube first and then run UE4Editor the errors go away and UE starts completely. There seems to be something that UE is not initializing correctly that vkcube does.

I’m running openSUSE tumbleweed (20190512) with nvidia driver version 418.56 on xorg.

Full error output:

[2019.05.15-19.23.57:616][  0]LogVulkanRHI: Error: VulkanRHI::vkCreateSwapchainKHR(Device.GetInstanceHandle(), &SwapChainInfo, VULKAN_CPU_ALLOCATOR, &SwapChain) failed, VkResult=-3
 at /home/cesar/src/external/UnrealEngine/Engine/Source/Runtime/VulkanRHI/Private/VulkanSwapChain.cpp:432 
 with error VK_ERROR_INITIALIZATION_FAILED
[2019.05.15-19.23.57:616][  0]LogOutputDevice: Warning: 

Script Stack (0 frames):

Fatal error: [File:/home/cesar/src/external/UnrealEngine/Engine/Source/Runtime/VulkanRHI/Private/VulkanUtil.cpp] [Line: 678] 
VulkanRHI::vkCreateSwapchainKHR(Device.GetInstanceHandle(), &SwapChainInfo, VULKAN_CPU_ALLOCATOR, &SwapChain) failed, VkResult=-3
 at /home/cesar/src/external/UnrealEngine/Engine/Source/Runtime/VulkanRHI/Private/VulkanSwapChain.cpp:432 
 with error VK_ERROR_INITIALIZATION_FAILED
[2019.05.15-19.23.57:624][  0]LogCore: Error: appError called: Assertion failed:  [File:/home/cesar/src/external/UnrealEngine/Engine/Source/Runtime/VulkanRHI/Private/VulkanUtil.cpp] [Line: 67
8] 
VulkanRHI::vkCreateSwapchainKHR(Device.GetInstanceHandle(), &SwapChainInfo, VULKAN_CPU_ALLOCATOR, &SwapChain) failed, VkResult=-3
 at /home/cesar/src/external/UnrealEngine/Engine/Source/Runtime/VulkanRHI/Private/VulkanSwapChain.cpp:432 
 with error VK_ERROR_INITIALIZATION_FAILED

Signal 11 caught.
Malloc Size=65538 LargeMemoryPoolOffset=65554 

Attached crash.txt

Interesting. Unfortunately the output you attached in the .txt file is from CrashReportClient but I was able to find the actual engine log in the crash report you submitted (thank you!). Answers to the following questions would help:

  • do you need to keep vkcube running in order for the engine to not crash?
  • do you need to run vkcube once after the reboot?
  • apart of vkcube, is there a difference in used GPU memory between the runs? (you can use nvidia-smi utility to check the amount of memory available)
  • could you attach the log from a non-crashed run (can be found in your projects Saved/Logs directory)?

Thank you in advance!

-RCL

Thanks for your answer. I updated the nvidia driver from version 418 to version 430 and I don’t have that error anymore, so it might have been a driver’s bug.

Just for completeness I needed to run and close vkcube one after booting the computer. After that UE would open normally.

If I get this error again, I’ll try to do what you suggest to get more information.

Thanks again!

updating v460 drivers (still to v460 but just updated by system update), seems to be working on ubuntu 20.04, no new crashes for more than 1h after updating and editing some assets, thx!