nicoco007 / DynamicOpenVR

Collection of Unity scripts that allow dynamic creation of OpenVR actions at runtime.
GNU Affero General Public License v3.0
82 stars 7 forks source link

Can't find steamapps.vrmanifest on Linux #10

Open copygirl opened 4 years ago

copygirl commented 4 years ago

Running Beat Saber using Steam Play on my Arch Linux machine, trying to update from 1.5 to 1.6. I've used QBeat to patch the game and install some mods, which seem to appear fine in the game's start screen.

List of mods (as reported in the logs) Name | Version -- | -- BS_Utils | 1.4.0 BeatSaberMarkupLanguage | 1.1.1 SongCore | 2.7.4 BeatSaverSharp | 0.4.2 ScoreSaberSharp | 0.1.0 BeatSaver Downloader | 5.0.2 Beat Saber IPA | 3.13.4 Custom Avatars | 5.0.0-beta.4 CameraPlus | 3.6.1 Custom Sabers | 3.5.1 INI Parser | 2.5.5 CustomCampaignLeaderboardLibrary | 1.1.0 Custom Campaigns | 2.5.1 Stream Core | 2.2.4 Song Request Manager | 2.2.0 YUR Fit Calorie Tracker | 2.0.10 MappingExtensions | 1.3.5 CustomNotes | 1.3.1 NoteCutMinimizer | 1.1.1 NoFailCheck | 1.1.0 ChromaLite | 1.0.4 PauseMenuRotationFix | 1.0.0 BeatSaverVoting | 1.0.0 DynamicOpenVR.BeatSaber | 0.1.0-beta.4

Unfortunately, there appear to be some issues here:

[DEBUG @ 19:34:52 | DynamicOpenVR.BeatSaber] Found Steam at C:\windows\system32
[ERROR @ 19:34:52 | UnityEngine] Failed to configure manifest
[ERROR @ 19:34:52 | UnityEngine] System.IO.FileNotFoundException: Could not find file C:\windows\system32\config\steamapps.vrmanifest
[ERROR @ 19:34:52 | UnityEngine]   at DynamicOpenVR.BeatSaber.Plugin.ReadBeatSaberManifest (System.String globalManifestPath) [0x00013] in <faea1a6c5e694acab301629588424c89>:0 
[ERROR @ 19:34:52 | UnityEngine]   at DynamicOpenVR.BeatSaber.Plugin.AddManifestToSteamConfig () [0x00059] in <faea1a6c5e694acab301629588424c89>:0 
[ERROR @ 19:34:52 | UnityEngine]   at DynamicOpenVR.BeatSaber.Plugin.Init (IPA.Logging.Logger logger) [0x000f3] in <faea1a6c5e694acab301629588424c89>:0 

Obviously, Steam is not in system32. I found the file in ~/.steam/steam/config which is exposed to by Proton as Z:\home\copygirl\.local\share\Steam\config\steamapps.vrmanifest.

As a result, I assume, I do not get any sort of tracking for the controllers and the avatar is stuck in a reference pose. Here's some followup errors:

[CRITICAL @ 19:34:56 | UnityEngine] NullReferenceException: Object reference not set to an instance of an object
[CRITICAL @ 19:34:56 | UnityEngine] DynamicOpenVR.OpenVRWrapper.SetActionManifestPath (System.String manifestPath) (at <81f2b030ebe24584bb39465dcbbb92d0>:0)
[CRITICAL @ 19:34:56 | UnityEngine] DynamicOpenVR.OpenVRActionManager.Start () (at <81f2b030ebe24584bb39465dcbbb92d0>:0)
[...later...]

[...the following is repeated over and over once the game is loaded...]
[CRITICAL @ 19:34:56 | UnityEngine] NullReferenceException: Object reference not set to an instance of an object
[CRITICAL @ 19:34:56 | UnityEngine] DynamicOpenVR.OpenVRWrapper.GetPoseActionDataForNextFrame (System.UInt64 actionHandle, Valve.VR.ETrackingUniverseOrigin origin) (at <81f2b030ebe24584bb39465dcbbb92d0>:0)
[CRITICAL @ 19:34:56 | UnityEngine] DynamicOpenVR.IO.PoseInput.GetActionData () (at <81f2b030ebe24584bb39465dcbbb92d0>:0)
[CRITICAL @ 19:34:56 | UnityEngine] DynamicOpenVR.IO.PoseInput.get_pose () (at <81f2b030ebe24584bb39465dcbbb92d0>:0)
[CRITICAL @ 19:34:56 | UnityEngine] DynamicOpenVR.BeatSaber.InputTrackingGetNodeStatesPatch.Postfix (System.Collections.Generic.List`1[T] nodeStates) (at <faea1a6c5e694acab301629588424c89>:0)
[CRITICAL @ 19:34:56 | UnityEngine] (wrapper dynamic-method) UnityEngine.XR.InputTracking.GetNodeStates_Patch1(System.Collections.Generic.List`1<UnityEngine.XR.XRNodeState>)
[CRITICAL @ 19:34:56 | UnityEngine] CustomAvatar.Tracking.TrackedDeviceManager.Update () (at <c91ae69be2ef4aee866338936ec8e4f2>:0)
[...]
[CRITICAL @ 19:34:58 | UnityEngine] NullReferenceException: Object reference not set to an instance of an object
[CRITICAL @ 19:34:58 | UnityEngine] Valve.VR.CVRSystem.PollNextEvent (Valve.VR.VREvent_t& pEvent, System.UInt32 uncbVREvent) (at <9309c1794aaa4d3ba47119af69fbd7c1>:0)
[CRITICAL @ 19:34:58 | UnityEngine] OpenVRHelper.Update () (at <16b1999db1184925b0f70d15d6f49c77>:0)
[CRITICAL @ 19:34:58 | UnityEngine] VRPlatformHelper.Update () (at <16b1999db1184925b0f70d15d6f49c77>:0)

Here's the full _latest.log for reference.

copygirl commented 4 years ago

I symlinked Steam/config to system32/config, as it appears steamapps.vrmanifest was not the only file it couldn't find. This makes the "Failed to configure manifest" error disappear.

However, the other 3 errors still occur. Perhaps this has to do with the controller settings. I tried going through the troubleshooting page without luck. Upon clicking "Controller Settings", it does not show the dialog shown, instead it directly opens the "old binding UI". I do not see a "Default Beat Saber Bindings" option anywhere.

This might be because I'm on the linux_temp beta of SteamVR, as the regular beta will just get stuck in a "Loading ..." screen (as reported in ValveSoftware/SteamVR-for-Linux#285).

nicoco007 commented 4 years ago

Thanks for the detailed description! I didn't have Linux support in mind when making this so there's probably a few Windows-specific things in there right now. I'll take a look at this ASAP.

copygirl commented 4 years ago

I just want to point out that in recent versions of SteamVR for Linux, the bindings settings screen looks and works as is explained in the troubleshooting guide so that issue appears to be fixed. No luck with the Beat Saber bindings showing up.

Looking at the code where these exceptions occur, there seems to be a more major issue where OpenVR.Input returns null.

copygirl commented 4 years ago

It looks like there's new errors now that I'm running 1.7.0:

[ERROR @ 05:01:35 | IPA] DynamicOpenVR.BeatSaber: System.NullReferenceException: Object reference not set to an instance of an object
[ERROR @ 05:01:35 | IPA]   at DynamicOpenVR.BeatSaber.Plugin.OnUpdate () [0x00026] in <e74ad007f99141428267ea36f0262285>:0 
[ERROR @ 05:01:35 | IPA]   at IPA.Loader.Composite.CompositeBSPlugin+<>c.<OnUpdate>b__9_0 (IPA.Loader.PluginLoader+PluginInfo plugin) [0x00006] in <561f7537f11b496bb2465f41d54f54b0>:0 
[ERROR @ 05:01:35 | IPA]   at IPA.Loader.Composite.CompositeBSPlugin.Invoke (IPA.Loader.Composite.CompositeBSPlugin+CompositeCall callback) [0x0001d] in <561f7537f11b496bb2465f41d54f54b0>:0
[...]
[CRITICAL @ 05:01:37 | UnityEngine] NullReferenceException: Object reference not set to an instance of an object
[CRITICAL @ 05:01:37 | UnityEngine] DynamicOpenVR.OpenVRWrapper.GetAnalogActionData (System.UInt64 actionHandle) (at <b15383f924cc4a768abc6ceece52202e>:0)
[CRITICAL @ 05:01:37 | UnityEngine] DynamicOpenVR.IO.AnalogInput.UpdateData () (at <b15383f924cc4a768abc6ceece52202e>:0)
[CRITICAL @ 05:01:37 | UnityEngine] DynamicOpenVR.OpenVRActionManager.Update () (at <b15383f924cc4a768abc6ceece52202e>:0)
[...]
[CRITICAL @ 05:01:38 | UnityEngine] NullReferenceException: Object reference not set to an instance of an object
[CRITICAL @ 05:01:38 | UnityEngine] DynamicOpenVR.OpenVRWrapper.GetActionHandle (System.String actionName) (at <b15383f924cc4a768abc6ceece52202e>:0)
[CRITICAL @ 05:01:38 | UnityEngine] DynamicOpenVR.IO.OVRAction.UpdateHandle () (at <b15383f924cc4a768abc6ceece52202e>:0)
[CRITICAL @ 05:01:38 | UnityEngine] DynamicOpenVR.OpenVRActionManager.TryUpdateHandle (DynamicOpenVR.IO.OVRAction action) (at <b15383f924cc4a768abc6ceece52202e>:0)
[CRITICAL @ 05:01:38 | UnityEngine] DynamicOpenVR.OpenVRActionManager.RegisterAction (DynamicOpenVR.IO.OVRAction action) (at <b15383f924cc4a768abc6ceece52202e>:0)
[...]

This could mean that OpenVR.System also returns null, and something is going completely wrong with OpenVR or its initialization.

nicoco007 commented 4 years ago

Looks like the person who opened #17 is having the same issue. I'm looking into this. You can also try running this version of DynamicOpenVR to see if it helps (it might also fix the original problem you had, but I'm not sure).

copygirl commented 4 years ago

I removed the system32/config symlink and that seems to work now. Woo! So now the game looks to be theoretically playable, although the custom avatar appears to just be T-posing behind me. There also appears to be exceptions, still:

[ERROR @ 07:55:40 | DynamicOpenVR.BeatSaber] Failed to initialize DynamicOpenVR.BeatSaber.
[ERROR @ 07:55:40 | DynamicOpenVR.BeatSaber] DynamicOpenVR.OpenVRInitException: OpenVR.Init returned null
[ERROR @ 07:55:40 | DynamicOpenVR.BeatSaber]   at DynamicOpenVR.OpenVRStatus.Init () [0x00025] in <a2f6e15e5ca745d79b385da0e02e3cc5>:0 
[ERROR @ 07:55:40 | DynamicOpenVR.BeatSaber]   at DynamicOpenVR.BeatSaber.Plugin.OnApplicationStart () [0x00045] in <9a862b9daa3e4bb68d6f71c29a3d0c93>:0 

Later on the log is spammed with the following entry:

[CRITICAL @ 08:10:02 | UnityEngine] NullReferenceException: Object reference not set to an instance of an object
[CRITICAL @ 08:10:02 | UnityEngine] Valve.VR.CVRSystem.PollNextEvent (Valve.VR.VREvent_t& pEvent, System.UInt32 uncbVREvent) (at <64b54777bdd340f899af2e18319f2626>:0)
[CRITICAL @ 08:10:02 | UnityEngine] OpenVRHelper.Update () (at <54967e81cdcb4c85b65a687e2431d0d9>:0)
[CRITICAL @ 08:10:02 | UnityEngine] VRPlatformHelper.Update () (at <54967e81cdcb4c85b65a687e2431d0d9>:0)
nicoco007 commented 4 years ago

What version of SteamVR are you running? The first error seems to indicate that it is indeed able to communicate with SteamVR but still breaks for some reason. I'm not sure why the 2nd error is still popping up since that code shouldn't even be running if there's an error during initialization.

copygirl commented 4 years ago

Unfortunately I can't say for sure which SteamVR version I was running at the time. I tried to update to see if the issue still occurs but my display currently freezes right after. I will have to try and figure out what's going on.

Perhaps a little late, but I completely missed this exception from the log from last time:

[CRITICAL @ 08:27:14 | UnityEngine] NullReferenceException: Object reference not set to an instance of an object
[CRITICAL @ 08:27:14 | UnityEngine] CustomAvatar.Tracking.OpenVRWrapper.GetStringTrackedDeviceProperty (System.UInt32 deviceIndex, Valve.VR.ETrackedDeviceProperty property) (at <188cebeb854849c69ce6915b863c46b1>:0)
[CRITICAL @ 08:27:14 | UnityEngine] CustomAvatar.Tracking.OpenVRWrapper.GetTrackedDeviceSerialNumbers () (at <188cebeb854849c69ce6915b863c46b1>:0)
[CRITICAL @ 08:27:14 | UnityEngine] CustomAvatar.Tracking.TrackedDeviceManager.UpdateNodes () (at <188cebeb854849c69ce6915b863c46b1>:0)
[CRITICAL @ 08:27:14 | UnityEngine] CustomAvatar.Tracking.TrackedDeviceManager.Start () (at <188cebeb854849c69ce6915b863c46b1>:0)
nicoco007 commented 4 years ago

I'll be releasing a new version of Custom Avatars in the next few days that'll make DynamicOpenVR optional for anyone who doesn't need finger tracking. I'll still try to fix this issue, but at least for the time being you'll be able to use Custom Avatars without all the problems that come from DynamicOpenVR.

copygirl commented 4 years ago

Due to the display freezing issue I haven't felt like picking VR up for some time, but that has been resolved by now. I'd love to get back to playing Beat Saber. The custom avatars and sharing the game with my viewers are kind of an essential part of my enjoyment. So I'm looking forward to the workaround (of sorts)!

Thank you for your work! :green_heart: