Photon Get Value or Data Corrupt and become Infinity Numbers

bobon
bobon
Hi, all Photon members,
anyway I got some problem with PUN 2
sometimes we get the data corrupt for example.
player B.SetCustomProperties(new hashtable{{score, 10}})
and then
Device A : CustomProperties[score] player B = 1.17263744E-143
Device C : CustomProperties[score] player B = 10
device D : CustomProperties[score] player B = 10
That's the problem Device A data or value is not the same, it becomes like an infinity number
but, if we close the game and open it again, then reconnect and rejoin, the data get right.
Also if we do PhotonNetwork.OfflineMode = true > create room > when clientState == joined > wait 0.2sec > leave room > PhotonNetwork.OfflineMode = False its working good.. but we don't want that process where the player should disconnect or close the game. We need to make sure every player gets the same data all time. is there any tips or solution for that?
We use PUN 2.23, Also already use PhotonNetwork.CrcCheckEnabled = true
but we still get the same issue.

Comments

  • Tobias
    Tobias admin
    edited February 2021
    This is the first time we get a report like this. As Photon is in use in hundreds of games without this issue, we have to conclude that this might be in your code.

    Keep in mind that A may have a bad connection and the property update is being late.
    Also Player properties carry over between rooms. The local user's properties are not cleared when leaving a room (assuming you set some selected character model, this is by default used in the next room you enter, too).
    You can clear local properties by setting each key to a null value (do this, e.g. when the client connects to the master server).

    I suggest you begin logging all changes to CustomProperties. Any place that may set it, should log which property (key/value) it set, when and who was the sender (if this is done via event from remote).
    Log, when updates arrive and which content they have. If this is too spammy, log, when updates with WRONG values arrive.
    We need to figure out how (through which path) the wrong value is being set. This is needed to debug the situation in any case.


    You mailed us so reply there. We will no longer update this thread but you should at some point post the conclusion please.