Unable to receive large amount of data through RPC

Options
facing error..

ArgumentOutOfRangeException: Non-negative number required.
Parameter name: count
at System.Buffer.BlockCopy (System.Array src, Int32 srcOffset, System.Array dst, Int32 dstOffset, Int32 count) [0x00000] in :0
at ExitGames.Client.Photon.StreamBuffer.Read (System.Byte[] buffer, Int32 offset, Int32 count) [0x00000] in :0
at ExitGames.Client.Photon.Protocol16.DeserializeString (ExitGames.Client.Photon.StreamBuffer din) [0x00000] in :0
at ExitGames.Client.Photon.Protocol16.Deserialize (ExitGames.Client.Photon.StreamBuffer din, Byte type) [0x00000] in :0
at ExitGames.Client.Photon.Protocol16.DeserializeParameterTable (ExitGames.Client.Photon.StreamBuffer stream) [0x00000] in :0
at ExitGames.Client.Photon.Protocol16.DeserializeOperationResponse (ExitGames.Client.Photon.StreamBuffer stream) [0x00000] in :0
at ExitGames.Client.Photon.PeerBase.DeserializeMessageAndCallback (System.Byte[] inBuf

Comments

  • JohnTube
    JohnTube ✭✭✭✭✭
    Options
    Hi @KRishna,

    Thank you for choosing Photon!

    How large is the data you are trying to send?
    Could you give us a sample/example?

    You can read about Photon Serialization here to find out more about the limits.
  • TeamA
    Options
    ArgumentOutOfRangeException: Non-negative number required.
    Parameter name: count
    System.Buffer.BlockCopy (System.Array src, System.Int32 srcOffset, System.Array dst, System.Int32 dstOffset, System.Int32 count) (at :0)
    ExitGames.Client.Photon.StreamBuffer.Read (System.Byte[] buffer, System.Int32 offset, System.Int32 count) (at <5bac2b0d73684de1adac4ad02bdde90d>:0)
    ExitGames.Client.Photon.Protocol16.DeserializeString (ExitGames.Client.Photon.StreamBuffer din) (at <5bac2b0d73684de1adac4ad02bdde90d>:0)
    ExitGames.Client.Photon.Protocol16.Deserialize (ExitGames.Client.Photon.StreamBuffer din, System.Byte type) (at <5bac2b0d73684de1adac4ad02bdde90d>:0)
    ExitGames.Client.Photon.Protocol16.DeserializeParameterTable (ExitGames.Client.Photon.StreamBuffer stream) (at <5bac2b0d73684de1adac4ad02bdde90d>:0)
    ExitGames.Client.Photon.Protocol16.DeserializeOperationResponse (ExitGames.Client.Photon.StreamBuffer stream) (at <5bac2b0d73684de1adac4ad02bdde90d>:0)
    ExitGames.Client.Photon.PeerBase.DeserializeMessageAndCallback (System.Byte[] inBuff) (at <5bac2b0d73684de1adac4ad02bdde90d>:0)
    ExitGames.Client.Photon.TPeer.DispatchIncomingCommands () (at <5bac2b0d73684de1adac4ad02bdde90d>:0)
    ExitGames.Client.Photon.PhotonPeer.DispatchIncomingCommands () (at <5bac2b0d73684de1adac4ad02bdde90d>:0)
    PhotonHandler.Update () (at Assets/Plugins/Photon Unity Networking/Plugins/PhotonNetwork/PhotonHandler.cs:158)
  • JohnTube
    JohnTube ✭✭✭✭✭
    edited October 2019
    Options
    Hi @TeamA,

    Thank you for choosing Photon!

    Photon cannot serialize strings with UTF8 byte size bigger than short.MaxValue (32767).
    Read about "Photon Serialization".
    You can read this FAQ entry: "Is There A Limit For Photon Strings?"
    Also, possibly related since you seem to exchange large messages: "Can I Send A Huge Message Using Photon?".

    It's preferable to download or upload such data using HTTP based web service other than Photon.