Placeholder-Software / Dissonance

Unity Voice Chat Asset
70 stars 5 forks source link

[bug/help] Some players are reporting that VoiceChat is not working and log says that it can't load DLL #119

Closed MichalPetryka closed 5 years ago

MichalPetryka commented 5 years ago

Context

Several players are reporting that their VC is not working, output log says:

Plugins: Failed to load 'C:/Program Files (x86)/Steam/steamapps/common/SCP Secret Laboratory/SCPSL_Data/Plugins/opus.dll' with error 'The specified module could not be found.
'.

(Filename:  Line: 229)

Fallback handler could not load library C:/Program Files (x86)/Steam/steamapps/common/SCP Secret Laboratory/SCPSL_Data/Mono/opus
Fallback handler could not load library C:/Program Files (x86)/Steam/steamapps/common/SCP Secret Laboratory/SCPSL_Data/Mono/.\opus
Fallback handler could not load library C:/Program Files (x86)/Steam/steamapps/common/SCP Secret Laboratory/SCPSL_Data/Mono/opus
Fallback handler could not load library C:/Program Files (x86)/Steam/steamapps/common/SCP Secret Laboratory/SCPSL_Data/Mono/libopus
Fallback handler could not load library C:/Program Files (x86)/Steam/steamapps/common/SCP Secret Laboratory/SCPSL_Data/Mono/.\libopus
Fallback handler could not load library C:/Program Files (x86)/Steam/steamapps/common/SCP Secret Laboratory/SCPSL_Data/Mono/libopus
Plugins: Failed to load 'C:/Program Files (x86)/Steam/steamapps/common/SCP Secret Laboratory/SCPSL_Data/Plugins/opus.dll' with error 'The specified module could not be found.
'.

(Filename:  Line: 229)

Fallback handler could not load library C:/Program Files (x86)/Steam/steamapps/common/SCP Secret Laboratory/SCPSL_Data/Mono/opus
Fallback handler could not load library C:/Program Files (x86)/Steam/steamapps/common/SCP Secret Laboratory/SCPSL_Data/Mono/.\opus
Fallback handler could not load library C:/Program Files (x86)/Steam/steamapps/common/SCP Secret Laboratory/SCPSL_Data/Mono/opus
Fallback handler could not load library C:/Program Files (x86)/Steam/steamapps/common/SCP Secret Laboratory/SCPSL_Data/Mono/libopus
Fallback handler could not load library C:/Program Files (x86)/Steam/steamapps/common/SCP Secret Laboratory/SCPSL_Data/Mono/.\libopus
Fallback handler could not load library C:/Program Files (x86)/Steam/steamapps/common/SCP Secret Laboratory/SCPSL_Data/Mono/libopus
DllNotFoundException: opus
  at (wrapper managed-to-native) Dissonance.Audio.Codecs.Opus.OpusNative/OpusNativeMethods:opus_encoder_create (int,int,int,int&)
  at Dissonance.Audio.Codecs.Opus.OpusNative+OpusEncoder..ctor (Int32 srcSamplingRate, Int32 srcChannelCount) [0x00000] in <filename unknown>:0 
  at Dissonance.Audio.Codecs.Opus.OpusEncoder..ctor (AudioQuality quality, FrameSize frameSize, Boolean fec) [0x00000] in <filename unknown>:0 
  at Dissonance.CodecSettingsLoader.CreateEncoder (AudioQuality quality, FrameSize frameSize, Boolean fec) [0x00000] in <filename unknown>:0 
  at Dissonance.CodecSettingsLoader.Generate () [0x00000] in <filename unknown>:0 
  at Dissonance.CodecSettingsLoader.get_Config () [0x00000] in <filename unknown>:0 
  at Dissonance.DissonanceComms.Start () [0x00000] in <filename unknown>:0 

(Filename:  Line: -1)

I've looked at #85, it describes simillar issue, however in our case installing vcredist 2015 doesn't help (we are automaticly installing it with steam). We've only noticed that all players with this issue are using Windows 7 (at least nobody with windows 8.1 and 10 reported it)(UPDATE: one person with windows 8.1 reported it). Game isn't blocked by antivirus, it has permissions to read the file. Reinstalling/verifying game's files with steam does not help.

Expected Behavior

DLL loads normaly

Actual Behavior

DLL fails to load

Steps to Reproduce

Not available

Your Environment

martindevans commented 5 years ago

Do you know if all players with Windows 7 have this issue? My guess would be that something in Dissonance is incompatible with Win7 and it won't work for any Win7 players.

MichalPetryka commented 5 years ago

No, it normaly works for other users with win 7

MichalPetryka commented 5 years ago

Okay, we've received report of this with windows 8.1

MichalPetryka commented 5 years ago

We're receiving much more reports of this after we updated to unity 2018.2.7f1 from 2018.1.5f1..

martindevans commented 5 years ago

Are there any other similarities between the people affected by this - for example are they all using 32 bit processors/32 bit windows?

Could you try getting one of the affected people to manually install the vcredist redist - if there is some error during the installation it could be getting lost somewhere in the steam install process.

Also could you check that the Opus.dll file is actually on the customer's disk and that the hash of the file is the same as the hash of the file you have in the Unity editor.

MichalPetryka commented 5 years ago
  1. We are only publishing 64bit builds
  2. They've tried and it was saying that they already have it installed
  3. Yes it is in their files, i haven't check its hashes but it has identical size
MichalPetryka commented 5 years ago

I've noticed that all people affected by this also have errors like this one in their logs, it looks like they are coming from unity's networking (https://github.com/jamesjlinden/unity-decompiled/blob/master/UnityEngine.Networking/NetworkCRC.cs)

CRC Remote Dump Door : 0
(Filename: C:\buildslave\unity\build\Runtime/Export/Debug.bindings.h Line: 43)
martindevans commented 5 years ago

As far as I can see the three possible causes of that remote demo error are:

  1. The number of networked scripts on the client does not match the number of networked scripts on the server.
  2. HLAPI CRC Channel Mismatch.
  3. HLAPI CRC channel out of range!

Those obviously aren't good, but I don't see how any of them could cause this error with Dissonance so that's probably not related.

You mentioned that this is worse since you updated to 2018.2 from 2018.1 - did you also perform a Dissonance upgrade at the same time? If so which version did you move from?

MichalPetryka commented 5 years ago

We didn't perform Dissonance update, we were using 6.2.4 like now

martindevans commented 5 years ago

I'm struggling to come up with ideas for what could cause this. Basically the only reasons I know of that can cause a DllNotFoundException exception are:

  1. DLL doesn't exist (i.e. it's just not on disk, or is in the wrong location)
  2. DLL is corrupt or for some other reason unreadable (e.g. file corruption, antivirus preventing access etc)
  3. The previous two reasons, for any dependency (transitively).

The reason I'm confused is that I think we've eliminated all of these problems! You've had the user check that the DLL is there (case 1). You already checked antivirus/game integrity/permissions (case 2). And we've tried to get them to install the redist which is the only dependency (case 3).

The only idea I have left is to get them to try Dissonance in another application:

I've recently released a standalone Dissonance demo with precompiled binaries. That should serve as a good test application - they just need to host a new session and see if it crashes.

MichalPetryka commented 5 years ago

Okay, they also have it with your demo (it took me 3 days to get someone try your demo... )

martindevans commented 5 years ago

In that case it's got to be some problem with the way their environment is set up. I know for sure that the demo works, and obviously we know that your game+Dissonance works for most players - neither of them is the source of the problem.

The only thing I can suggest is that you try something like this: https://www.codeproject.com/Articles/560816/Troubleshooting-dependency-resolution-problems-usi to diagnose exactly what's causing the problem.

MichalPetryka commented 5 years ago

Ok, one of our players sent us this https://docs.google.com/spreadsheets/d/1JZi8-pG5pBgf0kcaAEhK_DrtsCZRXyj1boxU2Ao419A/edit?usp=drivesdk

martindevans commented 5 years ago

Wow, thanks for that!

Obviously there's a lot going on in this log and it's 99% false positives so it's hard to be certain. However, one of the entries in the log catches my eye. This one is saying that C:\Windows\System32\API-MS-WIN-CRT-MATH-L1-1-0.dll is missing - this is an important part of windows (it's part of the common runtime environment) and I'm fairly sure it shouldn't be missing!

I found a windows support issue regarding this problem: https://answers.microsoft.com/en-us/windows/forum/windows8_1-windows_install-wininstalls/api-ms-win-crt-string-1-1-0dll-and-others-missing/85a91890-ed8a-4e6e-8f94-b53639c39970?auth=1

MichalPetryka commented 5 years ago

Ok, it solved the issue for person who send that, but other person says that he has error while trying to install it

martindevans commented 5 years ago

I think that is the solution then. They're missing critical parts of the windows C runtime, I honestly don't know how their computer is running without those bits! If the other person is getting an error on install they're going to need to resolve that.

I'll close this since we seem to have found the solution. Feel free to re-open it if it comes up again and this fix doesn't work :)

MichalPetryka commented 5 years ago

@martindevans Mayby add that Dissonance will check if that dll exists, and if it doesn't it would warn that it is missing in log (and mayby give link to that windows update)? That would be helpful if someone else would also have this issue

martindevans commented 5 years ago

I will bear it in mind for if this happens again.

As it stands no one else has ever reported this - I'm pretty sure it's installed by default with windows 10 (which is the only actually supported version of Windows according to Microsoft), so it's less likely to happen as time passes!