Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

alxr-client-uwp crashes on startup #100

Open
3 of 5 tasks
DerGernTod opened this issue Oct 3, 2023 · 3 comments
Open
3 of 5 tasks

alxr-client-uwp crashes on startup #100

DerGernTod opened this issue Oct 3, 2023 · 3 comments

Comments

@DerGernTod
Copy link

DerGernTod commented Oct 3, 2023

Description

I installed alxr-client-uwp on my steam deck on Windows 11. When I try to launch it, I get a white screen with a gray X in a gray rectangle for a split second, then it crashes without an error message. I tried a few other alxr-client-uwp versions but all seem to have the same problem.

Apart from that, I had to circumvent the certificate block using this guide because Windows asked me to provide a private key password in order to install the release certificate. I doubt that this is related, though.

I also didn't find a way to retrieve any kind of logs, not sure if there's a possibility to get them (not even in the Event Viewer). I also tried it with the debug package, to no avail.

I tried the windows client too, which successfully connects to my ALVR server, but then crashes because of this error.

Another issue I faced, related to the alxr-client-uwp: it requires windows version 10.0.20348.0 - this Windows SDK has only been released to Windows Server, which means the UWP app can only be installed on Windows Server 2022 or Windows 11, but not Windows 10.

General Troubleshooting

  • I carefully followed the instructions in the README and successfully completed the setup wizard
  • I read the ALVR Wikis here and here

Environment

Hardware

It's a Steam deck running Windows 11 from SD-card.

Installation

ALVR Version: 18.5.0 (on server)
ALXR Version: v0.16.0+nightly.2023.10.02

SteamVR Version: 1.27.5

Install Type:

  • Packaged (exe, deb, rpm, etc) - UWP
  • Portable (zip)
  • Source

OS Name and Version: Windows 11 22621.1702 (22H2)

@korejan
Copy link
Owner

korejan commented Oct 4, 2023

Hi, thanks for the info, if the non-uwp builds are crashing it's probably the same issue for the uwp build, Is the error message you're referring to this one?

VkResult failure [ERROR_DEVICE_LOST]
    Origin: vkQueueSubmit(queue, 1, &submitInfo, execFence)
    Source: /home/runner/work/ALVR/ALVR/alvr/openxr-client/alxr-engine-sys/cpp/ALVR-OpenXR-Engine/src/alxr_engine/graphicsplugin_vulkan.cpp:531
terminate called after throwing an instance of 'std::logic_error'
  what():  VkResult failure [ERROR_DEVICE_LOST]
    Origin: vkQueueSubmit(queue, 1, &submitInfo, execFence)
    Source: /home/runner/work/ALVR/ALVR/alvr/openxr-client/alxr-engine-sys/cpp/ALVR-OpenXR-Engine/src/alxr_engine/graphicsplugin_vulkan.cpp:531

You can try using the other graphics backend options, something I keep forgetting to put in the wiki is that by default Vulkan is typically the choosen backend and the default decoder is D3D11VA which currently this combo doesn't work, only with the decoder options of NVDEC, CUVID and cpu.

I would suggest using the other graphics backend options, -gD3D12 or -gD3D11, you can use --help to get a list of available options.

@DerGernTod
Copy link
Author

DerGernTod commented Oct 4, 2023

For the UWP build, I have no idea how to get logs. Thus, I tried your suggestions with the Windows exe client (no nvidia).

No, I don't get the error you mentioned at all. Either way, no matter which of the arguments you proposed I use (or none of them at all), the log spams:

[hevc @ 0000028c2b0a1ac0] PPS ID out of range: 0
[hevc @ 0000028c2b0a1ac0] Error parsing NAL unit #0.
[Warning] Failed to decode packet, error ID: -1094995529 reason: Invalid data found when processing input.

After hundreds of these logs, there's another log message for when I use no arguments or -gD3D12:

IDR_PARSED sending IDR request
Sending IDR Request!

And then the process exits. If I use -gD3D11, I also get IDR_PARSED sending IDR request, but instead of the Sending IDR Request!, I get this:

Failed setup for format D3D11: HWaccel initialization returned error.
[Error] Failed to get HW surface format.
[hevc @ 0000028c2b0a1ac0] Error parsing NAL unit #3.
[Warning] Failed to decode packet, error ID: -1 reason: Operation not permitted
[hevc @ 0000028c2b0a1ac0] Could not find ref with POC 0
3-planes formats are not supported!
    Origin: (pixfmt != XrPixelFormat::G8_B8_R8_3PLANE_420 && pixfmt != XrPixelFormat::G10X6_B10X6_R10X6_3PLANE_420)
    Source: D:\a\ALXR-nightly\ALXR-nightly\ALVR\openxr-client\alxr-engine-sys\cpp\ALVR-OpenXR-Engine\src\alxr_engine\graphicsplugin_d3d11.cpp:833

And then the process exits.

WMR works perfectly fine on that environment (just to mention that this shouldn't be the issue), and I'm using it as the OpenXR runtime. I tried it with SteamVR, but it can't even open a session, so that doesn't work at all.

It seems that the client connects to the server, though, for a few seconds. I can see it in the server logs. And then it disconnects:

Client disconnected. Cause: At ALVR\sockets\src\control_socket.rs:32

Apart from the logged error with D3D11, there are no obvious errors that would explain why the process shuts down in the other scenarios. It even seems to be a graceful shutdown, considering logs like openxr shutdown and shutting down decoder thread. Right after the process exits, I see the screen flickering and the sound of a device disconnecting and reconnecting. I'm confused 😅.

I assume NVDEC and CUVID are both Nvidia decoders that require cuda cores, at least the logs tell me that doesn't work.
Using VAAPI leaves the process open for longer and doesn't show any warnings and a lot less logs, but then also simply shuts down - this time without graceful shutdown logs.

I had some kind of success with the CPU decoder in combination with D3D11. No arbitrary shutdowns anymore, but the headset just shows a green screen (with shadows of a game library it seems, but I can't really say...)

@DerGernTod
Copy link
Author

Maybe I find some time to set up the dev env and look into that problem. Do you think it's worth it? Where could I start debugging? I guess the most of it is in ALVR-OpenXR-Engine? Since there's not really much code in the openxr-client directory, and all the client seems to do is instantiate the ALXRClientCtx from that lib. All the graphics and decoder stuff also seems to be there, so I think that's where I need to look? Or do you have any other suggestions?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants