PSA: Oculus Software can crash your machine


Attention! For once I have something important to say 😆

I made an interesting discovery yesterday (thanks to the lovely people on the Discord server, you’re the best! 😚) and thought it deserves a bit of exposure. You may or may not know that Oculus uses and redistributes their own copy of the ViGEmBus (and hides this fact incredibly well 🙄) titled Oculus Virtual Gamepad Emulation Bus:

Now if we assume that they keep consistent with my versioning scheme we can match the version number to the approximate release date which in case of version 1.5.8.0 would be the 6th of April 2017. That was over a year ago. A lot of fixes and enhancements have found their way into ViGEm since then, some of them crucial to system stability. Turns out this version is bugged in case you try to spawn a virtual DualShock 4 device which reliably triggers a Bug Check (more commonly known as the Blue Screen Of Death 😵) and thus crashing the entire system. Not cool.

But why doesn’t this happen more frequently you might ask. Simple; the Oculus Software apparently only spawns a virtual X360 device, which is fine. But if you happen to run other tools interacting with ViGEm who request a virtual DS4, they pick up the Oculus Bus (because the geniuses copying it didn’t change the interface GUID 😠), request it to spawn a DS4 and boom, there goes your unsaved work.

Workaround

Fortunately we immediately discovered an easy workaround you can apply even without rebooting. Fire up the Services Console, locate the service named Oculus VR Runtime Service and stop it:

This is required to “disconnect” it from the bus which can’t be disabled or uninstalled as long as it has open handles. Now fire up Windows Device Manager, expand the System devices node and search for the Oculus Virtual Gamepad Emulation Bus device, right-click on it and choose Disable device:

Confirm the dialog:

Now the icon next to the device should change accordingly:

 

Now your software emulating the DS4 should be able to automatically pick up the other bus instance and spawn the virtual DS4 without crashes 😃

Epilogue

I’m both proud and annoyed to be honest. Not by the fact that they apparently found my project useful and integrated it without any trace of credits. Well, a tiny bit maybe 😏 No, it’s more about the fact that they redistribute a stone-old version, didn’t change the interface GUID so software using my “official” client library can get mixed up attaching to their build of the bus and call it a day. I wasn’t contacted once by them in case you’re wondering; we’ve figured this out by sheer coincidence through a crash report of one of our users. Once again, not cool. But what else to expect from Facebook I guess 😇

Liked it? Take a second to support nefarius on Patreon!