Serious issue with released build: Crashes with Win 10-64 bit while searching for Oculus plugin

I have two customers reporting this error after an update yesterday with a build on 5.3.5p2 running on Windows 10-64 bit:

Initialize engine version: 5.3.5p2 (3103edb99077)
Failed to load 'D:/Spill/SteamLibrary/steamapps/common/Design it Drive it  Speedboats/DIDIBoats_Data/Plugins/OVRPlugin.dll' with error 'Den angitte modulen ble ikke funnet.
'.

(Filename:  Line: 117)

VR: Oculus could not be loaded: Failed to load symbol ovrp_PreInitialize.

(Filename:  Line: 107)

VR: Oculus could not be loaded: Failed to load symbol ovrp_GetInitialized.

(Filename:  Line: 107)

VR: Oculus could not be loaded: Failed to load symbol ovrp_Initialize.

(Filename:  Line: 107)

VR: Oculus could not be loaded: Failed to load symbol ovrp_Shutdown.

(Filename:  Line: 107)

VR: Oculus could not be loaded: Failed to load symbol ovrp_GetVersion.

Etc..

For some reason it’s not able to load OVRPlugin.dll. This customer does not have an Oculus Rift or the software installed. While looking for a solution I found this:

Same problem so I sent one of the customers the version of the OVRPlugin.dll referenced here which didn’t work (not surprising as Oculus says it’s only for a specific, slightly older version of Unity).

Anyone have any idea what to do here? What version of OVRPlugin.dll should I be giving him as a replacement and where can I get it? Has this type of thing been fixed in any of the 5.4 versions (I’m building with 5.3.5p2 now)? I have a couple of hundred customers that are yet to update who could potentially have this problem and am at this point expecting to to get hit by this from every single one of them running Windows 10 - 64 bit. These people aren’t even using the Rift.

I posted this in the support area and received no replies. Does anyone know a build of Unity that doesn’t have this problem? Is anyone running Rift builds on Windows 10 - 64 bit successfully on any version of Unity?

Hey @Todd-Wasson , Have you tried the latest versions of 5.3? 5.3.7p2 should be coming out this week and will contain the latest Oculus update, but 5.3.7p1 is already out and is stable.

I’m assuming that your game supports rift as well as non-vr content? In which of the two modes does it start? (Again I’m assuming VR, but just want to confirm)

You shouldn’t see a crash due to missing symbols/failing to load the plugin. So I think there is something additional that is causing the crash. Have you been able to repro it locally? Any chance you could send a development build to us through a bug report or send the project itself?

Thank you for the reply, Ed. I will try the 5.3 version you mentioned and report back, would rather avoid a major update to 5.4.x.

This game supports both Rift and non-VR, the people with the problem are all non-VR users. It starts up in VR mode if a Rift is plugged in and detected, otherwise it starts in non-VR. That’s just Unity’s default stuff there.

Local repro: No unfortunately, I can’t reproduce it. I’ve asked a lot of users about this and so far it’s only a small percentage of people having the problem, all of them on Windows 10 (both 32 and 64 bit). Most users running those OSs don’t have the problem though.

It’s a really weird one. For two of the 64 bit users I’ve contacted, it was fixed with a 64 bit build. For one of the 64 bit users it was fixed with changes to the dll settings on the 32 bit build too, but that same 32 bit build doesn’t work for the other 64 bit user. Then there’s another 32 bit user I’m working with where nothing works at all. So it’s a mess and seems all over the place with the only pattern being that it’s always on Windows 10. Thankfully it’s not being reported very often and my refund rate at this point doesn’t appear to have been affected yet.

I could send you guys a Steam key if you want a development build. Project is too big to upload anywhere unfortunately. Think it’s around 35 GB now. Not sure if that helps but I’d be happy to send you one.

My email: salesATspeedboatsim.com

@Ed_unity , I won’t be 100% sure until I get these tested on the bad machines, but it looks like the problem might be solved. I asked over here:

One of the Oculus guys said those dlls shouldn’t even be there, they’re left over from earlier installations and I’ve never cleaned up after any of it. Here’s his solution:

  1. Delete the OVR folder
  2. Delete all Oculus plugins from Assets/Plugins (subfolders x86 and x86_64)
  3. Reimport the Oculus Utilities:

https://developer3.oculus.com/downloads/game-engines/1.9.0/Oculus_Utilities_for_Unity_5/

This eliminates the offending OVRPlugin.dll completely and is working fine on my machine with Unity 5.3.5p2, so will probably fix the offending machines too. Will send it off for testing and let you know how it goes.

[EDIT: Spoke too soon. See next post.]

Thanks again. :slight_smile:

Doh, I spoke too soon. The OVRPlugin.dll is still there (or comes back) once I build it. Call me crazy, but Unity seems to be creating this out of thin air…? As far as I could tell I deleted that from the project and it came back when I built it.

I’ve posted a test version for a couple of the guys so we’ll see if it fixes it or not. If it doesn’t, I’ll try updating to that newer Unity version and give it another shot.

Hey Todd, so a couple things with plugins in Unity. Starting with general plugins in the Editor. While you have the editor running, it will actually load and hold onto any plugins that you add to your project. When the Editor detects a plugin, it loads it to check for a couple different symbols to help determine if it might be a spatializer plugin or a graphics plugin. After this load is done, we don’t actually let go of the plugin. So if you try to delete the plugin from your project, it doesn’t actually remove it. The only way to properly remove the plugin is to close the Editor, navigate with the explorer and manually delete the plugin and it’s .meta file. (This is a terrible process and it’s actually something that’s been around for years (somehow). It’s not something I agree with and we are looking into a better process around plugins.) If you tried deleting in the Project window, it will remove the icon, but as soon as Unity reloads, ie alt+tab, build, re-import, the Plugin will show back up in the Project window.

The second thing about plugins is specific to VR. We actually use a native plugin for all VR devices. The plugin is included with the Editor install and is copied over to builds at build time. It can also be overridden by placing the same named plugin directly in your project folder. From what you wrote, it sounds like this is what you are doing. Now where you need to be careful with the plugin in your project, is when the plugin doesn’t contain all of the API’s that Unity’s Native VR searches for. This can happen if the plugin is older or if Oculus or another developer has updated the API in the new version. Also, be careful using new utility drops with older versions of Unity, all of the new API’s might not be supported by the Plugin we shipped with that version. If you want to use newer Utilities with older Unity versions, make sure you have a newer Plugin to go with it.

I think you might be running into a combination issue here. So it sounds like you may be overriding the OVRPlugin directly in your project? Is it 1.9? If so, I suggest updating to the latest patch, or waiting a couple days until the next 5.3 patch comes out because we’ll be updating to Oculus 1.10. Anyways, when you try to delete the plugin, it isn’t actually removing the one in your project. Restart and delete like a mentioned above, then it will fall back to the shipped version. Just be careful with the latest Utilities package. I would also just double check your plugin importer settings if you are overriding the Oculus OVRPlugin directly in your project. Those PluginImporter settings will change what platforms the plugin is used on, and the plugin will copy into your build regardless of VR Support enabled/disabled.

As a final note that could be the issue, make sure that users have actually updated to the latest version of the Oculus runtime on their machines. If the plugin version is newer than the runtime version installed on the machine, it will fail just like you are seeing above. It shouldn’t crash, but it should show those errors.

Lastyly, because I forgot to explicitly ask this before, are your users seeing a crash or just errors loading the symbols? If it’s a crash, I will probably contact you about getting a key to test myself if we can’t figure this out. I think updating will resolve the issue though.

Thanks for the detailed explanation, Ed.

OVRPlugin.dll: No luck unfortunately. The file shows back up no matter how I go about deleting it, that includes deleting OVRPlugin.dll, signature files, and any of those meta files through Explorer without Unity running. I know about Unity loading dlls once and hanging onto them because I’ve written a couple of unrelated C++ plugins for it and have to restart Unity every time I recompile because of it. I’ve deleted these files every way I can think of, with Unity running, without it running, deleted, restarted, sometimes in the hierarchy and sometimes in Explorer, every combination I can think of.

I’ve just tried all this again and this time I also tried starting Unity and deleting it in Explorer as a last step, but the file wasn’t there anymore to be deleted, so it was really gone as far as I can tell. It’s gone until I build the project, then OVRPlugin.dll shows up again in H:\Unity Projects\Water1\Temp\StagingArea\DIDIBoats_Data\Plugins and then again in the build.

There is an OVRPlugin.cs file in there too that gets installed with (as far as I can tell) the latest Oculus Utilities the Oculus guy told me to install after deleting the OVR folder from my project, could that have anything to do with anything? If it’s not used, why is it part of the package?

Now that I look again I don’t even see the Oculus Utilities that I installed:

https://developer3.oculus.com/downloads/

There’s a Unity 4 integration there, but I haven’t used or installed that in upwards of 2 years. As far as I know all remnants of that should have been gone from my project as soon as I deleted the OVR folder and all the Oculus plugins per the instructions from the Oculus guy in the other thread. I replaced it per his instructions with a Unity 5 package, but now I don’t even see it on their downloads page so can’t even show you what I installed. On my machine the file is OculusUtilities_0_1_0_beta and contains OculusUtilities. That’s the only thing I managed to find the other day on the Oculus site for Unity 5 Oculus Utilities, but now I don’t see it up there anywhere.

I don’t care about using any extra utilities. I just use the default Unity cameras and built in classes and that’s it. That’s enough. If it still needs the utilities package to get the plugins, fine. Whatever Unity 5 Oculus package I installed from the Oculus site (the one I’m failing to find now), it replaced my OVR folder and might have put some plugins back, but the OVRPlugin.dll and Oculusplugin.dll were not part of that installation so the offending OVRPlugin.dll was not even part of it. The Oculus guy said that both of those files should be gone, which they are, but the OVRPlugin.dll still keeps popping back up when I build anyway even though that file is nowhere to be found in my project.

No, I’m not doing anything there. I don’t fiddle with any of the Oculus/OVR plugin settings.

1.9?? The OVRPlugin.dll that shows up in my build is version 1.4. As I look while writing this, there is no OVRPlugin.dll anywhere in my project, not even in the staging area where it was showing up after building it before. I am being careful to delete my build folder every time so it’s not some leftover plugin, it’s creating a new one in the build folder when I build the project.

The users having this problem do not have an Oculus, so no, I’m not going to tell them to install Oculus Home. 99% of the users run it just fine whether they have an Oculus or not, it’s just some small subset of Windows 10 (some 32 bit and some 64 bit) users reporting the problem. Which leads us to:

It crashes completely with the errors shown in the first post.

Guess I’ll just wait a couple days and try the new patch. I can’t think of any other ways to delete a set of files.

I can’t imagine that OculusUtilities_0_1_0_beta that I’ve got is the right one, but I don’t see what else to download at Oculus. Not sure if it matters to this particular problem seeing as that package doesn’t even have that OVRPlugin.dll in it anyway. I have no idea where the OVRPlugin.dll is even coming from, it’s not even in my project. Somehow it still manages to magically appear in my build anyway. I must be do something dumb somewhere but I’m completely dumbfounded at this point as to what it might be.

I’ve got the Oculus Utilities sorted out now. Deleted my OVR folder and ran this one:

https://developer3.oculus.com/downloads/game-engines/1.9.0/Oculus_Utilities_for_Unity_5/

Pretty sure what’s what I was using all along until I somehow went back to that old beta version the other day, but anyway, this didn’t change anything. Unity still creates that OVRPlugin.dll in the staging area and inserts it into my project no matter what I do even though the OVRPlugin.dll is nowhere to be found in my project.

Beats me.:face_with_spiral_eyes:

Update: In the Oculus thread he said I need to distribute MSVC 2015 runtimes with Oculus Utilities 1.9. I was only using 2012 before, so I’ve added 2015 to the build and am awaiting confirmation from a couple of people to find out if it fixes the original problem. Fingers crossed.

He also said that the OVRPlugin.dll is something Unity creates so will always be there, so maybe we’re barking up the wrong tree on that one. Don’t know. We’ll see if adding the 2015 runtime fixes it in the offending machines.

Not sure if this will help or not: I just heard back from a Windows 10-32 guy who says it didn’t fix it. (I have not tried a newer Unity version yet, still on 5.3.5p2 here).

I put up another beta for him a day or two ago that is a 32 bit build with VR support turned off that works ok for him. So I’m able to temporarily get around this by having a couple extra beta builds that work:

  1. For the 64 bit guy there’s a 64 bit build. That works.
  2. For the 32 bit guy there’s a 32 bit build with VR support turned off. That works.

So far this looks like it’s a really small group of people actually affected by this, and only on Windows 10. Normally VR support is turned on and nobody has any problems whether or not they’re using a Rift or have Oculus Home installed.

I’ll have to try the Unity patch next, I guess.

Hey Todd, If you aren’t using the Oculus Utilities at all in your project, remove them. They are not required to use the Unity native VR support with Oculus.

The OVRPlugin.dll is coming from Unity. As I stated before “We actually use a native plugin for all VR devices. The plugin is included with the Editor install and is copied over to builds at build time.” For Oculus, that plugin is OVRPlugin.dll. Without it, Unity native VR won’t work for that device.

Could you attach the entire log file that you took a snippet from above? The OVRPlugin is definitely failing to load on the users machines, meaning the plugin could be corrupt, or there is some external dependency that the users need. Either scenario is bad. I do suggest updating as newer builds will definitely have an updated version of the plugin, but seeing the entire log might point to what is causing the crash. Failure to load the plugin should only throw the errors. Not actually cause a crash.