Placeholder-Software / Dissonance

Unity Voice Chat Asset
71 stars 5 forks source link

Cannot associate preprocessor with Playback filter #77

Closed abelevtsov closed 6 years ago

abelevtsov commented 6 years ago

Hello!

I'm try to use echo cancellation feature using latest Dissonance version (6.0.2) in our VR (Android/iOS) + Desktop. We use Dissonance to speak with each other. Unity version: 2017.3.0f3 Desktop: Windows 10 Home Edition 64-bit Build Settings: x86_64 (non development). Didn't reach test on android - fail on desktop side of app.

I was guided by yours instruction:

Finally have set of errors:

  1. EntryPointNotFoundException: Dissonance_ConfigureAecSuppression Dissonance.Audio.Capture.WebRtcPreprocessingPipeline+WebRtcPreprocessor.set_AecSuppressionLevel (AecSuppressionLevels value) (at Assets/Plugins/Dissonance/Core/Audio/Capture/WebRtcPreprocessingPipeline.cs:212) Dissonance.Audio.Capture.WebRtcPreprocessingPipeline+WebRtcPreprocessor.m3 (AecSuppressionLevels v) (at Assets/Plugins/Dissonance/Core/Audio/Capture/WebRtcPreprocessingPipeline.cs:343) Dissonance.Audio.Capture.WebRtcPreprocessingPipeline+WebRtcPreprocessor+cAnonStorey01[Dissonance.Audio.Capture.AecSuppressionLevels].<>m__0 (System.Object sender, System.ComponentModel.PropertyChangedEventArgs args) (at Assets/Plugins/Dissonance/Core/Audio/Capture/WebRtcPreprocessingPipeline.cs:356) Dissonance.Audio.Capture.WebRtcPreprocessingPipeline+WebRtcPreprocessor.Bind[AecSuppressionLevels] (System.Func2 getValue, System.String propertyName, System.Action1 setValue) (at Assets/Plugins/Dissonance/Core/Audio/Capture/WebRtcPreprocessingPipeline.cs:363) Dissonance.Audio.Capture.WebRtcPreprocessingPipeline+WebRtcPreprocessor.SetFilterPreprocessor (IntPtr preprocessor) (at Assets/Plugins/Dissonance/Core/Audio/Capture/WebRtcPreprocessingPipeline.cs:343) Dissonance.Audio.Capture.WebRtcPreprocessingPipeline+WebRtcPreprocessor..ctor (Boolean useMobileAec) (at Assets/Plugins/Dissonance/Core/Audio/Capture/WebRtcPreprocessingPipeline.cs:248) Dissonance.Audio.Capture.WebRtcPreprocessingPipeline..ctor (NAudio.Wave.WaveFormat inputFormat, Boolean mobilePlatform) (at Assets/Plugins/Dissonance/Core/Audio/Capture/WebRtcPreprocessingPipeline.cs:30) Dissonance.Audio.Capture.CapturePipelineManager.CreatePreprocessor (NAudio.Wave.WaveFormat format) (at Assets/Plugins/Dissonance/Core/Audio/Capture/CapturePipelineManager.cs:295) Dissonance.Audio.Capture.CapturePipelineManager.RestartTransmissionPipeline () (at Assets/Plugins/Dissonance/Core/Audio/Capture/CapturePipelineManager.cs:274) Dissonance.Audio.Capture.CapturePipelineManager.Net_ModeChanged (NetworkMode mode) (at Assets/Plugins/Dissonance/Core/Audio/Capture/CapturePipelineManager.cs:143) Dissonance.Networking.BaseCommsNetwork5[Dissonance.Integrations.PhotonUnityNetworking.PhotonServer,Dissonance.Integrations.PhotonUnityNetworking.PhotonClient,System.Int32,Dissonance.Unit,Dissonance.Unit].OnModeChanged (NetworkMode obj) (at Assets/Plugins/Dissonance/Core/Networking/BaseCommsNetwork.cs:534) Dissonance.Networking.BaseCommsNetwork5[Dissonance.Integrations.PhotonUnityNetworking.PhotonServer,Dissonance.Integrations.PhotonUnityNetworking.PhotonClient,System.Int32,Dissonance.Unit,Dissonance.Unit].set_Mode (NetworkMode value) (at Assets/Plugins/Dissonance/Core/Networking/BaseCommsNetwork.cs:256) Dissonance.Networking.BaseCommsNetwork5+Session[Dissonance.Integrations.PhotonUnityNetworking.PhotonServer,Dissonance.Integrations.PhotonUnityNetworking.PhotonClient,System.Int32,Dissonance.Unit,Dissonance.Unit].Enter () (at Assets/Plugins/Dissonance/Core/Networking/BaseCommsNetwork.cs:130) Dissonance.Networking.BaseCommsNetwork5[Dissonance.Integrations.PhotonUnityNetworking.PhotonServer,Dissonance.Integrations.PhotonUnityNetworking.PhotonClient,System.Int32,Dissonance.Unit,Dissonance.Unit].ChangeState (IState newState) (at Assets/Plugins/Dissonance/Core/Networking/BaseCommsNetwork.cs:374) Dissonance.Networking.BaseCommsNetwork5[Dissonance.Integrations.PhotonUnityNetworking.PhotonServer,Dissonance.Integrations.PhotonUnityNetworking.PhotonClient,System.Int32,Dissonance.Unit,Dissonance.Unit].LoadState () (at Assets/Plugins/Dissonance/Core/Networking/BaseCommsNetwork.cs:326) Dissonance.Networking.BaseCommsNetwork`5[Dissonance.Integrations.PhotonUnityNetworking.PhotonServer,Dissonance.Integrations.PhotonUnityNetworking.PhotonClient,System.Int32,Dissonance.Unit,Dissonance.Unit].Update () (at Assets/Plugins/Dissonance/Core/Networking/BaseCommsNetwork.cs:319) Dissonance.Integrations.PhotonUnityNetworking.PhotonCommsNetwork.Update () (at Assets/Dissonance/Integrations/PhotonUnityNetworking/PhotonCommsNetwork.cs:84)
  2. DissonanceException: Error: Cannot associate preprocessor with Playback filter - one already exists! This is probably a bug in Dissonance, we're sorry! Please report the bug on the issue tracker "https://github.com/Placeholder-Software/Dissonance/issues". You could also seek help on the community at "http://placeholder-software.co.uk/dissonance/community" to get help for a temporary workaround. Error ID: D5862DD2-B44E-4605-8D1C-29DD2C72A70C Dissonance.Audio.Capture.WebRtcPreprocessingPipeline+WebRtcPreprocessor.SetFilterPreprocessor (IntPtr preprocessor) (at Assets/Plugins/Dissonance/Core/Audio/Capture/WebRtcPreprocessingPipeline.cs:334) Dissonance.Audio.Capture.WebRtcPreprocessingPipeline+WebRtcPreprocessor..ctor (Boolean useMobileAec) (at Assets/Plugins/Dissonance/Core/Audio/Capture/WebRtcPreprocessingPipeline.cs:248) Dissonance.Audio.Capture.WebRtcPreprocessingPipeline..ctor (NAudio.Wave.WaveFormat inputFormat, Boolean mobilePlatform) (at Assets/Plugins/Dissonance/Core/Audio/Capture/WebRtcPreprocessingPipeline.cs:30) Dissonance.Audio.Capture.CapturePipelineManager.CreatePreprocessor (NAudio.Wave.WaveFormat format) (at Assets/Plugins/Dissonance/Core/Audio/Capture/CapturePipelineManager.cs:295) Dissonance.Audio.Capture.CapturePipelineManager.RestartTransmissionPipeline () (at Assets/Plugins/Dissonance/Core/Audio/Capture/CapturePipelineManager.cs:274) Dissonance.Audio.Capture.CapturePipelineManager.Update (Boolean muted, Single deltaTime) (at Assets/Plugins/Dissonance/Core/Audio/Capture/CapturePipelineManager.cs:162) Dissonance.DissonanceComms.Update () (at Assets/Plugins/Dissonance/DissonanceComms.cs:547)
  3. DissonanceException: Error: Insufficient space in packet reader to read string!
  4. [Dissonance:Recording] (20:54:18.120) WebRtcPreprocessingPipeline: Failed to clear preprocessor from playback filter - many times

What going wrong? Please help.

Kind regards, Aleksandr

martindevans commented 6 years ago

Hi Aleksandr,

Could I get you to send me an editor log so I can look at the exact sequence of events? Before doing so go to Window > Dissonance > Diagnostic Settings and change all of the categories to Debug, make sure to change this back after you're done.

Thanks, Martin

abelevtsov commented 6 years ago

Sorry, can not provide more details at the moment - Unity stuck on game launch after Diagnostic Settings changed as you advised. Back to you a little bit later - afraid I'm need some days to collect all scenarios (on-off settings in all mix cases) and so back to you with detailed details/logs (can dedicate hour/two per day to a project).

abelevtsov commented 6 years ago

I changed Diagnostic settings as you described and launch the game in Unity Editor (client desktop part). Details in attachment: Errors.docx. Also after turn all settings back got this error: image

There are my Voice Settings: image

martindevans commented 6 years ago

I've had a look through your log and the initial cause of the error seems to be fairly simple. When the echo canceller is started it tries to configure itself by calling Dissonance_ConfigureAecSuppression method which is a C++ method contained within the AudioPluginDissonance.dll plugin, however the runtime can't find that method which causes an exception to be thrown and all the subsequent errors seem to be caused by this. Would it be possible for you to send me the full editor.log (located here) file so I can see the full stack details for all events?

abelevtsov commented 6 years ago

Editor.log Editor-prev.log

martindevans commented 6 years ago

Hi abelevsov thanks for those logs. Were they captured using the diagnostic settings I mentioned before (all categories at Debug)? Somethings which I would expect to see in the log are missing!

I've tested this locally and can't reproduce it. To narrow this down could you try a couple of things:

  1. open powershell in Assets/Plugins/Dissonance/Plugins/x86_64 and run Get-FileHash .\AudioPluginDissonance.dll and send me the hash. It should be SHA256: 25D0A7D0E12FFC0C0EDC56D50FC6904BE4326DA1A067335EFE9389A51F965C48, if it's not then your installation is somehow corrupt. If so then delete everything to do with Dissonance and re-install from the store.

  2. If that wasn't the problem try importing Dissonance into an empty Unity project and running the demo scene (without AEC). If that works try adding AEC and seeing if you get the same error.

abelevtsov commented 6 years ago

Hashes are really different... I removed Dissonance and install it from scratch - and all works fine now! Two points I did wrong:

  1. Didn't compare hashes after update Dissonance, dont't know why, but installation really was corrupted. As I can remember now when I updated Dissonance, Unity asked me to Force quit as it can't delete some assets - may be corrupted installation based on that.
  2. Forgot to update Dissonance PUN integration (from 4.0.0 to 6.0.0) after Dissonance update.

I'll keep these in mind in the future, Thank you a lot!!!

Best regards, Aleksandr

martindevans commented 6 years ago

Hey abelevsov, glad you fixed it :D