Issue with LitePeer.OpCustom

Options
archmaegus
edited December 2013 in DotNet
I have a c# .net console app where I have a LitePeer object where I call the OpCustom method. When I call this method, I get the following error:
System.ArgumentException: Source array was not long enough. Check srcIndex and l
ength, and the array's lower bounds.
at System.Array.Copy(Array sourceArray, Int32 sourceIndex, Array destinationA
rray, Int32 destinationIndex, Int32 length, Boolean reliable)
at System.Collections.Generic.Queue`1.SetCapacity(Int32 capacity)
at System.Collections.Generic.Queue`1.Enqueue(T item)
at ExitGames.Client.Photon.EnetPeer.QueueOutgoingReliableCommand(NCommand com
mand) in c:\Dev\photon-sdk-dotnet\PhotonDotNet\EnetPeer.cs:line 1026
at ExitGames.Client.Photon.EnetPeer.CreateAndEnqueueCommand(Byte commandType,
Byte[] payload, Byte channelNumber) in c:\Dev\photon-sdk-dotnet\PhotonDotNet\En
etPeer.cs:line 806
at ExitGames.Client.Photon.EnetPeer.EnqueueOperation(Dictionary`2 parameters,
Byte opCode, Boolean sendReliable, Byte channelId, Boolean encrypt, EgMessageTy
pe messageType) in c:\Dev\photon-sdk-dotnet\PhotonDotNet\EnetPeer.cs:line 740
at ExitGames.Client.Photon.PeerBase.EnqueueOperation(Dictionary`2 parameters,
Byte opCode, Boolean sendReliable, Byte channelId, Boolean encrypted) in c:\Dev
\photon-sdk-dotnet\PhotonDotNet\PeerBase.cs:line 274
at ExitGames.Client.Photon.PhotonPeer.OpCustom(Byte customOpCode, Dictionary`
2 customOpParameters, Boolean sendReliable, Byte channelId) in c:\Dev\photon-sdk
-dotnet\PhotonDotNet\PhotonPeer.cs:line 1144
at ExitGames.Client.Photon.PhotonPeer.OpCustom(Byte customOpCode, Dictionary`
2 customOpParameters, Boolean sendReliable) in c:\Dev\photon-sdk-dotnet\PhotonDo
tNet\PhotonPeer.cs:line 1121

It looks like an error within the Photon Dotnet library. Any ideas?

Comments

  • chvetsov
    Options
    hi, archmaegus.

    Well, if exception happened inside lib, this does not mean that bug is there. Please check data, which you are tring to send
    Here is a hint:
    Source array was not long enough. Check srcIndex and length, and the array's lower bounds.
  • Unless I'm reading the call stack incorrectly, the error is coming from ExitGames.Client.Photon.EnetPeer.QueueOutgoingReliableCommand
  • chvetsov
    Options
    well, if you pass incorrect data to function it will detect bug only when will use this data. I hope this is clear.
    if you are sure that this is our bug, please give us sample of data, which you were tring to send and got exception.

    we will improove our code. but after new year already

    Merry Christmas and Happy New year
  • Hi Ilya,

    I'm working on getting a code sample to post here that shows the problem.

    Thank you for the assistance so far.

    --Roy
  • chvetsov
    Options
    Thank you for your assistance. it is difficult to find all bugs. So we very appritiate your help