ValveSoftware / SteamVR-for-Linux

Issue tracker for the Linux port of SteamVR
916 stars 45 forks source link

Unity 2017.3f01 SIGABRT with SteamVR plugin demo scene #85

Open ChristophHaag opened 6 years ago

ChristophHaag commented 6 years ago

So I tried the 2017.3.0f1 version "3c89f8d277f5" from this post https://forum.unity.com/threads/unity-on-linux-release-notes-and-known-issues.350256/page-2#post-3313793

Made a new project, imported the SteamVR plugin from the asset store, set the renderer to Vulkan and exported a build with the demo scene from the plugin. Here it is: https://haagch.frickel.club/files/unity-2017.3f1-vrtest.tar.xz

The preview in the Unity editor works, but running the exported build does not work. It shows the splash screen and then aborts.

The same procedure worked in their latest 2017.2 version.

./vrtest.x86_64 -show-screen-selector
Set current directory to /home/chris/oldhome/unityprojects/vrtest20173/build
Found path: /home/chris/oldhome/unityprojects/vrtest20173/build/vrtest.x86_64
Mono path[0] = '/home/chris/oldhome/unityprojects/vrtest20173/build/vrtest_Data/Managed'
Mono config path = '/home/chris/oldhome/unityprojects/vrtest20173/build/vrtest_Data/Mono/etc'
Preloaded 'ScreenSelector.so'
Preloaded 'libopenvr_api.so'
Logging to /home/chris/.config/unity3d/DefaultCompany/vrtest20173/Player.log
WARNING: radv is not a conformant vulkan implementation, testing use only.
WARNING: radv is not a conformant vulkan implementation, testing use only.
mesa: for the -simplifycfg-sink-common option: may only occur zero or one times!
Stacktrace:

  at (wrapper managed-to-native) object.wrapper_native_0x7fd2882eaf70 (ulong,Valve.VR.Texture_t&) <0x00064>
  at (wrapper managed-to-native) object.wrapper_native_0x7fd2882eaf70 (ulong,Valve.VR.Texture_t&) <0x00064>
  at Valve.VR.CVROverlay.SetOverlayTexture (ulong,Valve.VR.Texture_t&) <0x00037>
  at SteamVR_Overlay.UpdateOverlay () <0x001b6>
  at SteamVR_Render/<RenderLoop>c__Iterator0.MoveNext () <0x0010e>
  at UnityEngine.SetupCoroutine.InvokeMoveNext (System.Collections.IEnumerator,intptr) <0x0005e>
  at (wrapper runtime-invoke) <Module>.runtime_invoke_void_object_intptr (object,intptr,intptr,intptr) <0x00065>

Native stacktrace:

        /home/chris/oldhome/unityprojects/vrtest20173/build/vrtest_Data/Mono/x86_64/libmono.so(+0x9847a) [0x7fd2da37f47a]
        /usr/lib/libpthread.so.0(+0x11d9f) [0x7fd2fea3ad9f]
        /usr/lib/libc.so.6(gsignal+0x110) [0x7fd2fdbb3860]
        /usr/lib/libc.so.6(abort+0x1c8) [0x7fd2fdbb4ec8]
        ./vrtest.x86_64() [0x9dfc8b]
        /home/chris/oldhome/unityprojects/vrtest20173/build/vrtest_Data/Mono/x86_64/libmono.so(+0xd8cb0) [0x7fd2da3bfcb0]
        /home/chris/oldhome/unityprojects/vrtest20173/build/vrtest_Data/Mono/x86_64/libmono.so(+0x3717e) [0x7fd2da31e17e]
        /usr/lib/libpthread.so.0(+0x11d9f) [0x7fd2fea3ad9f]
        /usr/lib/libvulkan.so.1(+0x26b57) [0x7fd2b70bab57]
        /usr/lib/libvulkan.so.1(vkGetInstanceProcAddr+0xd1) [0x7fd2b70be9a1]
        /home/chris/.local/share/Steam/SteamApps/common/SteamVR/bin/linux64/vrclient.so(+0xde398) [0x7fd288351398]
        /home/chris/.local/share/Steam/SteamApps/common/SteamVR/bin/linux64/vrclient.so(+0xdfb38) [0x7fd288352b38]
        /home/chris/.local/share/Steam/SteamApps/common/SteamVR/bin/linux64/vrclient.so(+0xf1927) [0x7fd288364927]
        [0x41b7fba3]
        /home/chris/oldhome/unityprojects/vrtest20173/build/vrtest_Data/Mono/x86_64/libmono.so(+0x3b2d6) [0x7fd2da3222d6]
        /home/chris/oldhome/unityprojects/vrtest20173/build/vrtest_Data/Mono/x86_64/libmono.so(mono_runtime_invoke+0x67) [0x7fd2da423ea8]
        ./vrtest.x86_64() [0x9a13d3]
        ./vrtest.x86_64() [0xa04574]
        ./vrtest.x86_64() [0x9d5a39]
        ./vrtest.x86_64() [0x9d60c1]
        ./vrtest.x86_64() [0x5f7cd4]
        ./vrtest.x86_64() [0x8181fd]
        ./vrtest.x86_64() [0x80185c]
        ./vrtest.x86_64() [0x4607b8]
        /usr/lib/libc.so.6(__libc_start_main+0xe9) [0x7fd2fdb9ff49]
        ./vrtest.x86_64() [0x46df68]

and the unity log file says

Desktop is 1920 x 1080 @ 60 Hz
[Vulkan init] extensions: count=10
[Vulkan init] extensions: name=VK_KHR_external_fence_capabilities, enabled=0
[Vulkan init] extensions: name=VK_KHR_external_memory_capabilities, enabled=0
[Vulkan init] extensions: name=VK_KHR_external_semaphore_capabilities, enabled=0
[Vulkan init] extensions: name=VK_KHR_get_physical_device_properties2, enabled=0
[Vulkan init] extensions: name=VK_KHR_get_surface_capabilities2, enabled=0
[Vulkan init] extensions: name=VK_KHR_surface, enabled=1
[Vulkan init] extensions: name=VK_KHR_wayland_surface, enabled=1
[Vulkan init] extensions: name=VK_KHR_xcb_surface, enabled=0
[Vulkan init] extensions: name=VK_KHR_xlib_surface, enabled=1
[Vulkan init] extensions: name=VK_EXT_debug_report, enabled=0
Vulkan detection: 2
Initialize engine version: 2017.3.0f1 (3c89f8d277f5)
GfxDevice: creating device client; threaded=1
[Vulkan init] extensions: count=10
[Vulkan init] extensions: name=VK_KHR_external_fence_capabilities, enabled=0
[Vulkan init] extensions: name=VK_KHR_external_memory_capabilities, enabled=1
[Vulkan init] extensions: name=VK_KHR_external_semaphore_capabilities, enabled=1
[Vulkan init] extensions: name=VK_KHR_get_physical_device_properties2, enabled=1
[Vulkan init] extensions: name=VK_KHR_get_surface_capabilities2, enabled=0
[Vulkan init] extensions: name=VK_KHR_surface, enabled=1
[Vulkan init] extensions: name=VK_KHR_wayland_surface, enabled=1
[Vulkan init] extensions: name=VK_KHR_xcb_surface, enabled=0
[Vulkan init] extensions: name=VK_KHR_xlib_surface, enabled=1
[Vulkan init] extensions: name=VK_EXT_debug_report, enabled=0
[Vulkan init] extensions: count=27
[Vulkan init] extensions: name=VK_KHR_bind_memory2, enabled=0
[Vulkan init] extensions: name=VK_KHR_dedicated_allocation, enabled=1
[Vulkan init] extensions: name=VK_KHR_descriptor_update_template, enabled=0
[Vulkan init] extensions: name=VK_KHR_external_fence, enabled=0
[Vulkan init] extensions: name=VK_KHR_external_fence_fd, enabled=0
[Vulkan init] extensions: name=VK_KHR_external_memory, enabled=1
[Vulkan init] extensions: name=VK_KHR_external_memory_fd, enabled=1
[Vulkan init] extensions: name=VK_KHR_external_semaphore, enabled=1
[Vulkan init] extensions: name=VK_KHR_external_semaphore_fd, enabled=1
[Vulkan init] extensions: name=VK_KHR_get_memory_requirements2, enabled=1
[Vulkan init] extensions: name=VK_KHR_image_format_list, enabled=0
[Vulkan init] extensions: name=VK_KHR_incremental_present, enabled=0
[Vulkan init] extensions: name=VK_KHR_maintenance1, enabled=0
[Vulkan init] extensions: name=VK_KHR_maintenance2, enabled=0
[Vulkan init] extensions: name=VK_KHR_push_descriptor, enabled=0
[Vulkan init] extensions: name=VK_KHR_relaxed_block_layout, enabled=0
[Vulkan init] extensions: name=VK_KHR_sampler_mirror_clamp_to_edge, enabled=1
[Vulkan init] extensions: name=VK_KHR_shader_draw_parameters, enabled=0
[Vulkan init] extensions: name=VK_KHR_storage_buffer_storage_class, enabled=0
[Vulkan init] extensions: name=VK_KHR_swapchain, enabled=1
[Vulkan init] extensions: name=VK_KHR_variable_pointers, enabled=0
[Vulkan init] extensions: name=VK_KHX_multiview, enabled=0
[Vulkan init] extensions: name=VK_EXT_external_memory_dma_buf, enabled=0
[Vulkan init] extensions: name=VK_EXT_global_priority, enabled=0
[Vulkan init] extensions: name=VK_AMD_draw_indirect_count, enabled=0
[Vulkan init] extensions: name=VK_AMD_rasterization_order, enabled=0
[Vulkan init] extensions: name=VK_AMD_shader_info, enabled=0
Vulkan API version 1.0.57
Vulkan vendor=[ATI] id=[1002]
Vulkan renderer=[AMD RADV POLARIS10 (LLVM 6.0.0)] id=[67df]
Vulkan device type 2
Vulkan driverversion=[0x04403063] uint=[71315555]
Vulkan: default RenderTexture HDR format: 11 (109)
Vulkan PSO: cache data not found [path=/home/chris/.cache/unity3d/DefaultCompany/vrtest20173/vulkan_pso_cache.bin]
AudioManager: Using PulseAudio: Default Output Device
Begin MonoManager ReloadAssembly
- Completed reload, in  0.270 seconds
requesting resize 1024 x 768
resizing window to 1024 x 768
Desktop is 1920 x 1080 @ 60 Hz
InitializeOrResetSwapChain 1024x768 samples=1
OpenVR initialized!

(Filename:  Line: 672)

If your machine has multiple graphics adapters, Unity may have created a WindowContext on the wrong adapter. If you experience a black screen when playing, please restart the Editor.

(Filename:  Line: 224)

Setting up 6 worker threads for Enlighten.
  Thread -> id: 7fd1e2ffd700 -> priority: 1 
  Thread -> id: 7fd1e37fe700 -> priority: 1 
  Thread -> id: 7fd1e3fff700 -> priority: 1 
  Thread -> id: 7fd218e32700 -> priority: 1 
  Thread -> id: 7fd1fbfff700 -> priority: 1 
  Thread -> id: 7fd1fb7fe700 -> priority: 1 
UnloadTime: 1.053000 ms
Connected to lighthouse:LHR-FE5281CF

(Filename: /home/builduser/buildslave/unity/build/artifacts/generated/common/runtime/DebugBindings.gen.cpp Line: 51)

Receiving unhandled NULL exception
#0  0x007fffd4160080 in funlockfile
#1  0x007fffd4160638 in _init
#2  0x007fffd4160640 in vkGetInstanceProcAddr
#3  0x007fffd4160670 in CVRCompositorSharedTextures::GetVulkanDeviceData(vr::VRVulkanTextureData_t const*)
#4  0x007fffd4160cf0 in CVRCompositorSharedTextures::UpdateTextureSet(CVRCompositorSharedTextures::Params const*, VRCompositorState_TextureSet_t*)
#5  0x007fffd4160f50 in CVROverlayLatest::SetOverlayTexture(unsigned long, vr::Texture_t const*)
#6  0x007fffd41610b0 in (Unknown)
#7  0x007fffd41610c0 in mono_set_defaults
#8  0x007fffd41614d0 in mono_runtime_invoke
#9  0x007fffd4161500 in operator delete(void*, std::nothrow_t const&)
#10 0x007fffd4161530 in operator delete(void*, std::nothrow_t const&)
#11 0x007fffd4161550 in operator delete(void*, std::nothrow_t const&)
#12 0x007fffd41616b0 in operator delete(void*, std::nothrow_t const&)
#13 0x007fffd4161700 in operator delete(void*, std::nothrow_t const&)
#14 0x007fffd4161770 in operator delete(void*, std::nothrow_t const&)
#15 0x007fffd4161780 in operator delete(void*, std::nothrow_t const&)
#16 0x007fffd41617a0 in zcfree
#17 0x007fffd4161de0 in __libc_start_main
#18 0x007fffd4161ea0 in zcfree
yaomtc commented 6 years ago

I figure this wasn't responded to because Unity development is currently not supported, according to the readme. Hopefully that changes soon, since there's so much Unity VR development going on.

ChristophHaag commented 6 years ago

Good question. In Unity 2017.2 they started enabling their XR support on Linux again but I think it still had a bug where it didn't work with some multisampling settings.

With 2017.3 it seems to work decently for the few things I tried. Here's an example: https://www.youtube.com/watch?v=CN_Ut4yiN3o. I changed the title of this issue to reflect it only seems to be happening with the sample scene from the SteamVR plugin, which worked in 2017.2. In 2018b01 it's still broken btw.

But since neither Valve nor Unity has actually announced that Unity is supporting VR on Linux again it's a good question whether there is actually official support.