OverflowException: Number overflow.

carmine
carmine ✭✭
I'm getting an error that I can't research too much because it appears to be inside the DLL. I grabbed the absolutely latest version from the Unity Asset store just now:

The error happens in PhotonHandler.cs Line 83 () doDispatch = PhotonNetwork.networkingPeer.DispatchIncomingCommands();

bool doDispatch = true;
while (PhotonNetwork.isMessageQueueRunning && doDispatch)
{
// DispatchIncomingCommands() returns true of it found any command to dispatch (event, result or state change)
Profiler.BeginSample("DispatchIncomingCommands");
doDispatch = PhotonNetwork.networkingPeer.DispatchIncomingCommands();
Profiler.EndSample();
}


Here is the exception info:

OverflowException: Number overflow.
System.Collections.Generic.Dictionary`2[System.Byte,System.Object].InitArrays (Int32 size) (at /Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/corlib/System.Collections.Generic/Dictionary.cs:278)
System.Collections.Generic.Dictionary`2[System.Byte,System.Object].Init (Int32 capacity, IEqualityComparer`1 hcp) (at /Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/corlib/System.Collections.Generic/Dictionary.cs:273)
System.Collections.Generic.Dictionary`2[System.Byte,System.Object]..ctor (Int32 capacity) (at /Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/corlib/System.Collections.Generic/Dictionary.cs:239)
ExitGames.Client.Photon.Protocol.DeserializeParameterTable (System.IO.MemoryStream memoryStream)
ExitGames.Client.Photon.Protocol.DeserializeEventData (System.IO.MemoryStream din)
ExitGames.Client.Photon.PeerBase.DeserializeMessageAndCallback (System.Byte[] inBuff)
ExitGames.Client.Photon.EnetPeer.DispatchIncomingCommands ()
ExitGames.Client.Photon.PhotonPeer.DispatchIncomingCommands ()
PhotonHandler.Update () (at Assets/Photon Unity Networking/Plugins/PhotonNetwork/PhotonHandler.cs:83)

Comments

  • This is a new one.
    It seems to be related to deserializing an incoming event. Usually, those should be safe as the server is actually writing them.

    Which platform do you export to and which Unity version are you using on which OS?
    I can probably build a lib that logs out the raw incoming message.

    Another thing you should try is to enable CRC Checks as described in "Solution: Enable CRC Checks" here:
    http://doc.exitgames.com/en/pun/current ... isconnects

    Maybe it's a router issue that corrupts the package in a breaking way.
  • It's happening in the Unity editor. But my build is set for Mac/Windows. (I'm building on Mac)

    Is it possible, it's trying to sync a isNAN value? If I send over a Vector/Quad? Or do you filter or fix those?
  • We don't filter those but my expectation would be that I could receive it when we can also send it. This is deserializing.
    Do you know how to run Wireshark? If you could send me sniffed values, that would be great.
    I will look into sending you another dll to catch this error and log the raw values. Going to skype you.