Placeholder-Software / Dissonance

Unity Voice Chat Asset
71 stars 5 forks source link

2017.2 Unity Internal Compiler Error #69

Closed mattnewport closed 6 years ago

mattnewport commented 6 years ago

Context

After updating to Unity 2017.2 from 2017.1 and updating the .NET Runtime to 4.6 in Player Settings we are getting Unity cloud build failures with Dissonance. Local builds work normally however. I haven't yet been able to figure out from the cloud build logs what's going on here or why I'm not able to reproduce it with a local build. Updating Dissonance to the latest version (4.01) did not fix the issue.

Expected Behavior

Unity cloud builds succeed the same as Unity local builds.

Actual Behavior

The error log for cloud builds is attached. cloud-build-failure-dissonance-log.txt

These lines are the main errors that seem to be due to Dissonance (there's a lot more spew in the full log):

[Unity] -sdk:4.6
[Unity] -----CompilerOutput:-stdout--exitcode: 1--compilationhadfailure: True--outfile: Temp/Assembly-CSharp-firstpass.dll
[Unity] Assets/Plugins/Dissonance/Core/Audio/Capture/BasicMicrophoneCapture.cs(16,11): error CS0246: The type or namespace name `MonoBehaviour' could not be found. Are you missing an assembly reference?
[Unity] Assets/Plugins/Dissonance/Core/Audio/Playback/SamplePlaybackComponent.cs(14,11): error CS0246: The type or namespace name `MonoBehaviour' could not be found. Are you missing an assembly reference?
[Unity] Assets/Plugins/Dissonance/Core/Audio/Playback/VoicePlayback.cs(15,11): error CS0246: The type or namespace name `MonoBehaviour' could not be found. Are you missing an assembly reference?
[Unity] Assets/Plugins/Dissonance/Core/BaseCommsTrigger.cs(12,11): error CS0246: The type or namespace name `MonoBehaviour' could not be found. Are you missing an assembly reference?
[Unity] Assets/Plugins/Dissonance/Core/Config/ChatRoomSettings.cs(10,11): error CS0246: The type or namespace name `ScriptableObject' could not be found. Are you missing an assembly reference?
[Unity] Assets/Plugins/Dissonance/Core/Config/DebugSettings.cs(11,11): error CS0246: The type or namespace name `ScriptableObject' could not be found. Are you missing an assembly reference?
[Unity] Assets/Plugins/Dissonance/Core/Config/VoiceSettings.cs(11,9): error CS0246: The type or namespace name `ScriptableObject' could not be found. Are you missing an assembly reference?
[Unity] Unhandled Exception:
[Unity] Mono.CSharp.InternalErrorException: Assets/Plugins/Dissonance/Core/Networking/BaseCommsNetwork.cs(11,22): Dissonance.Networking ---> Mono.CSharp.InternalErrorException: Assets/Plugins/Dissonance/Core/Networking/BaseCommsNetwork.cs(13,27): Dissonance.Networking.BaseCommsNetwork<TServer,TClient,TPeer,TClientParam,TServerParam> ---> System.ArgumentException: An item with the same key has already been added.

Steps to Reproduce

I'm not able to reproduce this on a local build but a 2017.2 project with the .NET 4.6 runtime enabled fails this way with cloud builds (cloud build configured to use latest 2017.2 version which is the same as the local one).

Your Environment

martindevans commented 6 years ago

Hi mattnewport,

That's an internal compiler error in the mono compiler! I've marked this as a Unity bug - could I get you to report the bug to Unity and post a link to the report back here so I can track their progress and close this issues once it's fixed? Thanks.

Unfortunately I can't think of any sensible workaround for this. As far as I know there's no flag set in cloud build you could use to avoid compiling that code. That file is absolutely critical to Dissonance (it's the base of the entire network system), so removing it from the project would be very difficult!

martindevans commented 6 years ago

This was from a couple of Dissonance versions ago and no one else has reported the issue since. Since it appears that it was a Unity issue anyway I'll close this now. Please don't hesitate to re-open it if there's something we can help with :)

mattnewport commented 6 years ago

We ended up switching to our own build servers from cloud build due to a bunch of limitations and problems with Unity cloud build and this issue doesn't affect us when using our own build servers so we're good for now. Thanks.