Unity .NET 4.6 Socket Exception

Since upgrading to Unity 2017.2.1.p1, we have been experiencing Socket Exception in Photon Unity Networking when passing larger amounts of data to clients via RPC.

After consulting with the dev team at Exit Games, it seems the problem is more related to .NET 4.6 than it is the Photon plugin, as it does not occur when switching back to .NET 3.5. Previous version of the editor, i.e. 2017.1.1p1 do not reproduce the error.

The attached file has a complete problem description as well as links to two sample projects, one created in 2.1p1 to reproduce the error, and the other in 1.1p1 to prove that it was working without issue in the previous version.

Any help would be greatly appreciated.[110537-photon-unity-disconnect.pdf|110537]

Hello @justinvirtualitics,

I followed your instructions and was unable to reproduce the bug you described. Perhaps I’m doing something wrong?

I downloaded your projects; started two instances of the 2017.2.1p1 build; connected one as Host and waited for it to finish loading; connected the 2nd one as Client.

At this point they are connected together and in the same level.

I then go to the Host instance and press Space; I get the confirmation that the 75 [0,74] chunks of data are successfuly sent; I also the confirmation they were received from the Client. No crashes…

I have tried reproducing the bug with all combinations of 2017.1.1p1/2017.2.1p1 builds, projects, rebuilding from project source, using two different computers, etc.

Could you provide additionnal information as to the machine you are trying to run this on? Have I missed a step? Any and all information will help me to resolve this issue! :slight_smile:

@cattendu3d Any progress on tracking down the issue?