PUN 1.67 and 1.68 Have Bug with Ownership Change

Options
Hey there.

So I updated PUN a couple weeks ago and have noticed new bugs in my game. The issue is this.

I have a 2 player game. I instantiate a scene object. The master client takes ownership of it. The other player takes ownership of it. The master client attempts to take ownership back but it doesn't get it. The logs print out "Ev OwnershipRequest etc." but the "locally controlled" box never gets checked in the PhotonView. More importantly the supposed owner can't update it either.

I've downgraded back to 1.66 and the issue is gone for me.

Comments

  • Tobias
    Options
    We will check this asap.
    Sorry for the hassle and thanks for the report.
  • [Deleted User]
    Options
    Hi k0j0,

    I tried but I wasn't able to reproduce the bug mentioned above using PUN 1.68.

    Please make sure, that the owner of the PhotonView component of the objects you want to instantiate is set to 'Takeover' or 'Request'. You can also try to delete the PhotonView component from your prefab and re-add it.

    If the bug persists, please make a Unity package where I can reproduce the bug and provide it to me.
  • Tobias
    Options
    @k0j0: Can you give us any additional insight?
  • k0j0
    Options
    @Tobias hmm, sorry I don't :-/

    I made an empty project to test this out and didn't see it. I can reliably reproduce it in my game by just changing the version of Photon though. There's definitely a lot of other stuff going on in my game, but I don't think I'm messing with any of the Photon internals.

    If it's a hint, after the master client tries to reclaim ownership of the scene object no player gets ownership of it. Photon logs that an ownership request was made but the PhotonView gets orphaned. Also, when the scene starts, the master client requests ownership of the object (even though it already has it).

    I thought it had something to do with the ownerId of the PhotonView changing (which it seems to do when PhotonView.requestOwnership is called sometimes). But it also seems to change in 1.66 and I don't encounter this issue.

    Sorry guys. I don't have much more time to look into this. Maybe it's just something weird in my game code that I'm missing? I don't know if anyone else has reported a similar issue. For now, it looks we're just gonna stick to 1.66 as it's working well for us.

    Thanks!
  • Tobias
    Options
    As long as some version is working for you, that's fine. Thanks for spending some time to reproduce this, despite being busy. We understand that situation well :)

    I would "close" this case for the same reasons. It seems to be related to updating PUN in an existing project but we have no idea what exactly has to happen to trigger this.
    Maybe the PhotonViews .meta files nee to be adjusted or some scene setting is odd or ... it could be a number of issues when it comes to updating in Unity.

    When you plan to update and need help, please open a new thread and let us know. We can try to take a look if you send a repro case, ok?
  • k0j0
    Options
    Right, it's probably some weird update specific thing. Cool, yeah I'll close this. I'll let you know if it comes up again in a new project. Doesn't seem like it should though