Placeholder-Software / Dissonance

Unity Voice Chat Asset
71 stars 5 forks source link

Critical Bug (v6.4.0): Intermittent Opus Loading Error #151

Closed martindevans closed 5 years ago

martindevans commented 5 years ago

We've discovered a critical bug in Dissonance 6.4.0 which affects all users on Windows in non-editor builds. Sometimes (about 10% of the time) Opus will not load - this will cause voice broadcasting to be disabled. This appears to be caused by a Unity bug which causes loading of native plugins to be unreliable, it issue has been reported to Unity.

An update version has been submitted to the asset store (Dissonance 6.4.1) - all users should update as soon as this becomes available.

Before 6.4.1 is available you can apply this workaround to fix the issue: open DissonanceComms.cs, find the Start() method on line 205 and add this as the very first thing inside the method:

[UsedImplicitly] private void Start()
{
    // Unity is unreliable about late loading DLLs so try to load dependencies as early as possible.
    try
    {
        TestDependencies();
    }
    catch (Exception e)
    {
        Log.Error("Dependency Error: {0}", e.Message);
    }

    // rest of the method...

This forces the DLLs to be loaded early, which appears to resolve the issue.

martindevans commented 5 years ago

This has been fixed with Dissonance 6.4.1.

If you are using the HLAPI integration package you will still need to apply this workaround as that package has not been approved yet.