SteamVR-for-Linux icon indicating copy to clipboard operation
SteamVR-for-Linux copied to clipboard

[BUG] UE4 crashes when using SteamVR, Vulkan error

Open tapla opened this issue 5 years ago • 5 comments

I'm trying to run SteamVr with UE4 but Vulkan seems to crash every single time beside the error below it also gives the warning lavapipe is not a conformant vulkan implementation I'm not sure what that means and what to do about it. It seems to be more of a vulkan issue caused by steam. without steamvr running ue4 starts fine. i can open it with opengl though perfomance is pretty bad. maybe somebody knows how to fix this or at least what causes it thanks

=== Critical error: === Unhandled Exception: SIGSEGV: invalid attempt to write memory at address 0x0000000000000003

Fatal error: [File:/home/eim/UnrealEngine_4.24/Engine/Source/Runtime/VulkanRHI/Private/VulkanUtil.cpp] [Line: 772] Result failed, VkResult=-7 at /home/eim/UnrealEngine_4.24/Engine/Source/Runtime/VulkanRHI/Private/VulkanDevice.cpp:319 with error VK_ERROR_EXTENSION_NOT_PRESENT 0x00007f7d6deed945 libUE4Editor-VulkanRHI.so!FVulkanDevice::CreateDevice() [/home/eim/UnrealEngine_4.24/Engine/Source/Runtime/VulkanRHI/Private/VulkanDevice.cpp:319] 0x00007f7d6def2c03 libUE4Editor-VulkanRHI.so!FVulkanDevice::InitGPU(int) [/home/eim/UnrealEngine_4.24/Engine/Source/Runtime/VulkanRHI/Private/VulkanDevice.cpp:861] 0x00007f7d6deb4567 libUE4Editor-VulkanRHI.so!FVulkanDynamicRHI::SelectAndInitDevice() [/home/eim/UnrealEngine_4.24/Engine/Source/Runtime/VulkanRHI/Private/VulkanRHI.cpp:615] 0x00007f7d6deb1dc3 libUE4Editor-VulkanRHI.so!FVulkanDynamicRHI::InitInstance() [/home/eim/UnrealEngine_4.24/Engine/Source/Runtime/VulkanRHI/Private/VulkanRHI.cpp:657] 0x00007f7d6deb195e libUE4Editor-VulkanRHI.so!FVulkanDynamicRHI::Init() [/home/eim/UnrealEngine_4.24/Engine/Source/Runtime/VulkanRHI/Private/VulkanRHI.cpp:215] 0x00007f7da2cf85e3 libUE4Editor-RHI.so!RHIInit(bool) [/home/eim/UnrealEngine_4.24/Engine/Source/Runtime/RHI/Private/DynamicRHI.cpp:212] 0x0000000000245c3e UE4Editor!FEngineLoop::PreInitPreStartupScreen(char16_t const*) [/home/eim/UnrealEngine_4.24/Engine/Source/Runtime/Launch/Private/LaunchEngineLoop.cpp:2273] 0x000000000023e2ec UE4Editor!GuardedMain(char16_t const*) [/home/eim/UnrealEngine_4.24/Engine/Source/Runtime/Launch/Private/Launch.cpp:131] 0x00007f7da8574191 libUE4Editor-UnixCommonStartup.so

tapla avatar Nov 04 '20 11:11 tapla

Hi there, I'd just like to add that I've been having a similar problem with UE4 and VR-mode. Running Pop!_OS (20.10, GTX 1070 @ Nvidia 455.28) and trying out the Carla simulator in VR-preview crashes every time. I have to resort to using OpenGL backend but its much worse in quality. Typically the error looked something like: Error: Ensure condition failed: Layout == VK_IMAGE_LAYOUT_SHARED_PRESENT_KHR || Layout == VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL || Layout == VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL || Layout == VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL || Layout == VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL || Layout == VK_IMAGE_LAYOUT_GENERAL [File:Runtime/VulkanRHI/Private/VulkanDescriptorSets.h] [Line: 1103]

I can also try again a few more times and get more logs if interested. Happy to help!

GustavoSilvera avatar Nov 05 '20 06:11 GustavoSilvera

Hello, I am experiencing the same crash. NVidia GeForce 1070 GTX, driver version 470.63.01, elementaryOS distro, Linux kernel version 5.11.0-37-generic. Engine Version: 4.27.1-0+++UE4+Release-4.27

Limeth avatar Oct 08 '21 18:10 Limeth

I am also seeing the exact same issue, any suggestions? Cannot start UE4Editor or my project Editor with SteamVR running.

  • Ubuntu 20.04.2 - Linux 5.11.0-40-generic
  • NVIDIA Titan RTX - 495.44 / CUDA 11.5
  • Engine Version: 4.27.1

also posted on UE4 Forums https://forums.unrealengine.com/t/4-27-1-editor-crash-on-start-with-steamvr/263504

wurrego avatar Nov 30 '21 22:11 wurrego

Some progress. With a hack to Engine/Source/Runtime/VulkanRHI::VulkanDevice to load specific VK Extensions, instead of what UE4 is determining.... I am able to load UE4 Editor w/ the SteamVR plugin enabled while running SteamVR.

Unfortunetly...while in the editor, if i launch VR preview... UE4 still crashes. So i do not have a solution yet.

More details in my ue4 forums post link above

wurrego avatar Dec 01 '21 19:12 wurrego

I have resolved the issue for my target system and project. It required bypassing the UE4 methods for getting the required device extensions, and passing it a static list of VK Extensions i specified.

Specifically:

  • VK_KHR_get_physical_device_properties2
  • VK_KHR_surface
  • VK_KHR_xcb_surface
  • VK_KHR_display
  • VK_EXT_direct_mode_display
  • VK_EXT_acquire_xlib_display
  • VK_EXT_display_surface_counter
  • VK_KHR_external_memory_capabilities
  • VK_KHR_external_semaphore_capabilities
  • VK_KHR_get_physical_device_properties2
  • VK_KHR_swapchain
  • VK_KHR_maintenance1
  • VK_KHR_dedicated_allocation
  • VK_KHR_get_memory_requirements2
  • VK_KHR_external_memory
  • VK_KHR_external_semaphore
  • VK_EXT_display_control
  • VK_KHR_external_memory_fd
  • VK_KHR_external_semaphore_fd
  • VK_EXT_global_priority

wurrego avatar Dec 01 '21 23:12 wurrego