leetvr / hotham

Hotham is a tool for creating incredible standalone VR games.
Apache License 2.0
393 stars 28 forks source link

[Bug]: Simulator error `ERROR_OUT_OF_DATE_KHR` #412

Closed campbellcole closed 1 year ago

campbellcole commented 1 year ago

What happened?

Attempting to run the device simulator on my linux setup fails every time. My setup is as follows:

OS: Ubuntu 22.04.1
Kernel: 5.15.0-56-generic
WM: i3
Compositor: picom
CPU: 13th Gen Intel i7-13700KF (24) @ 5.300GHz
GPU: NVIDIA GeForce RTX 3070 Ti
Memory: 2370MiB / 31913MiB

I am using the master branch of hotham, whose Cargo.toml files state a version of 0.2.0.

When running the hotham_crab_saber bin, in release mode, the window is created but closes before the first frame renders. The error printed is below.

Version

latest

In which Hotham component are you seeing the problem on?

Simulator

What VR System are you seeing the problem on?

None

What OS are you seeing the problem on?

Linux

Relevant log output

[HOTHAM_POLL_EVENT] State is now IDLE
[HOTHAM_POLL_EVENT] State is now READY
[HOTHAM_SIMULATOR] Beginning session: Session(42)
[HOTHAM_POLL_EVENT] State is now SYNCHRONIZED
[HOTHAM_POLL_EVENT] State is now FOCUSED
[HOTHAM_DRAW_GUI] Updating font texture..
[HOTHAM_VULKAN] Creating staging buffer..
[HOTHAM_VULKAN] Allocated 2097152 bits of buffer memory: 0x5626e5065dd0
[HOTHAM_VULKAN] ..done!
[HOTHAM_VULKAN] Copying buffer to image..
[HOTHAM_VULKAN] ..done! Transitioning image layout..
[HOTHAM_VULKAN] ..done! Freeing staging buffer..
[HOTHAM_VULKAN] ..done!
[HOTHAM_DRAW_GUI] Done!
[HOTHAM_SIMULATOR] !ERROR RENDERING FRAME! ERROR_OUT_OF_DATE_KHR
[HOTHAM_SIMULATOR] Destroy called..
[HOTHAM_SIMULATOR] Closed called!
[HOTHAM_SIMULATOR] Closed called!
[HOTHAM_SIMULATOR] Closed called!
[HOTHAM_SIMULATOR] All things are now destroyed
Error: OpenXRError(ERROR_VALIDATION_FAILURE)
kanerogers commented 1 year ago

Hi, @campbellcole ! I'm sorry that (a) I missed this issue while I was on holiday and (b) that you're having issues with Hotham! Let's get you fixed up.

Looking through the log, something very odd is going on there - ERROR_OUT_OF_DATE_KHR before a frame has even rendered says something strange is going on with the Window. We have seen some issues with OpenXR / Vulkan under Linux, so there may be some oddness there.

What I'd suggest is jumping onto the Discord if you have some time so that we can troubleshoot in a bit more depth. Hopefully it's just something about your environment that we've not encountered before that we can get cleared up for you.

kanerogers commented 1 year ago

Closing due to inactivity. Please re-open if you have more information!

campbellcole commented 1 year ago

Sorry for going dark on this one. I changed distros a few days after making this issue so I can't reproduce it anymore. I was unsure until recently whether or not I'd stay on my current distro and I have decided I will not be going back. I am almost certain this bug was caused by my riced linux install because it was using i3+picom and I barely configured anything so I probably had something set up wrong. I will be trying this tool again relatively soon using gnome, and if any issues come up I will definitely report them and help solve it.

Thanks for your hard work! Very excited to try this again. :smile: