Errors with bots

Report bugs of MFPS 2.0 here
Post Reply
User avatar
Leonid_RU
Contributor
Contributor
Posts: 50
Joined: Tue Sep 11, 2018 3:04 am

Fri Jul 24, 2020 8:35 am

Hello.

I keep checking the MFPS version 1.75. And I found a suspicious error that also appears in my current game... When masterclient (Player 1) exits and the room is passed to another player (Player2), then Player2 is fine. Player 1 comes in, everything is fine, but sometimes there are errors about PhotonView bots. If Player2 (MasterClient) exits and then re-enters, then it constantly gets errors related to photonview bots and they twitch on the spot and do nothing. How do I solve this? Tested on a clean version of MFPS 1.75, photon latest version, unity 2020.1 release.

Image

Error PhotonMono

Code: Select all

InvalidOperationException: Duplicate key 2
ExitGames.Client.Photon.NonAllocDictionary`2[K,V].Add (K key, V val) (at <a497a6f18e1f4b419421b940add27a6e>:0)
Photon.Pun.PhotonNetwork.RegisterPhotonView (Photon.Pun.PhotonView netView) (at Assets/Photon/PhotonUnityNetworking/Code/PhotonNetworkPart.cs:1011)
Photon.Pun.PhotonView.set_ViewID (System.Int32 value) (at Assets/Photon/PhotonUnityNetworking/Code/PhotonView.cs:253)
Photon.Pun.PhotonNetwork.NetworkInstantiate (Photon.Pun.InstantiateParameters parameters, System.Boolean sceneObject, System.Boolean instantiateEvent) (at Assets/Photon/PhotonUnityNetworking/Code/PhotonNetwork.cs:2506)
Photon.Pun.PhotonNetwork.NetworkInstantiate (ExitGames.Client.Photon.Hashtable networkEvent, Photon.Realtime.Player creator) (at Assets/Photon/PhotonUnityNetworking/Code/PhotonNetwork.cs:2439)
Photon.Pun.PhotonNetwork.OnEvent (ExitGames.Client.Photon.EventData photonEvent) (at Assets/Photon/PhotonUnityNetworking/Code/PhotonNetworkPart.cs:2195)
Photon.Realtime.LoadBalancingClient.OnEvent (ExitGames.Client.Photon.EventData photonEvent) (at Assets/Photon/PhotonRealtime/Code/LoadBalancingClient.cs:3142)
ExitGames.Client.Photon.PeerBase.DeserializeMessageAndCallback (ExitGames.Client.Photon.StreamBuffer stream) (at <a497a6f18e1f4b419421b940add27a6e>:0)
ExitGames.Client.Photon.EnetPeer.DispatchIncomingCommands () (at <a497a6f18e1f4b419421b940add27a6e>:0)
ExitGames.Client.Photon.PhotonPeer.DispatchIncomingCommands () (at <a497a6f18e1f4b419421b940add27a6e>:0)
Photon.Pun.PhotonHandler.Dispatch () (at Assets/Photon/PhotonUnityNetworking/Code/PhotonHandler.cs:208)
Photon.Pun.PhotonHandler.FixedUpdate () (at Assets/Photon/PhotonUnityNetworking/Code/PhotonHandler.cs:142)
Error

Code: Select all

PhotonView ID duplicate found: 21. New: View 21 on AISoldier2(Clone) (scene) old: View 21 on BOT Karl (scene). Maybe one wasn't destroyed on scene load?! Check for 'DontDestroyOnLoad'. Destroying old entry, adding new.
UnityEngine.Debug:LogError(Object)
Photon.Pun.PhotonNetwork:RegisterPhotonView(PhotonView) (at Assets/Photon/PhotonUnityNetworking/Code/PhotonNetworkPart.cs:1000)
Photon.Pun.PhotonView:set_ViewID(Int32) (at Assets/Photon/PhotonUnityNetworking/Code/PhotonView.cs:253)
Photon.Pun.PhotonNetwork:NetworkInstantiate(InstantiateParameters, Boolean, Boolean) (at Assets/Photon/PhotonUnityNetworking/Code/PhotonNetwork.cs:2506)
Photon.Pun.PhotonNetwork:NetworkInstantiate(Hashtable, Player) (at Assets/Photon/PhotonUnityNetworking/Code/PhotonNetwork.cs:2439)
Photon.Pun.PhotonNetwork:OnEvent(EventData) (at Assets/Photon/PhotonUnityNetworking/Code/PhotonNetworkPart.cs:2195)
Photon.Realtime.LoadBalancingClient:OnEvent(EventData) (at Assets/Photon/PhotonRealtime/Code/LoadBalancingClient.cs:3142)
ExitGames.Client.Photon.PeerBase:DeserializeMessageAndCallback(StreamBuffer)
ExitGames.Client.Photon.EnetPeer:DispatchIncomingCommands()
ExitGames.Client.Photon.PhotonPeer:DispatchIncomingCommands()
Photon.Pun.PhotonHandler:Dispatch() (at Assets/Photon/PhotonUnityNetworking/Code/PhotonHandler.cs:208)
Photon.Pun.PhotonHandler:FixedUpdate() (at Assets/Photon/PhotonUnityNetworking/Code/PhotonHandler.cs:142)
Warning

Code: Select all

Received RPC "RpcFire" for viewID 2 but this PhotonView does not exist! Was remote PV. Remote called. By: #05 'Comp' Maybe GO was destroyed but RPC not cleaned up.
UnityEngine.Debug:LogWarning(Object)
Photon.Pun.PhotonNetwork:ExecuteRpc(Hashtable, Player) (at Assets/Photon/PhotonUnityNetworking/Code/PhotonNetworkPart.cs:396)
Photon.Pun.PhotonNetwork:OnEvent(EventData) (at Assets/Photon/PhotonUnityNetworking/Code/PhotonNetworkPart.cs:2158)
Photon.Realtime.LoadBalancingClient:OnEvent(EventData) (at Assets/Photon/PhotonRealtime/Code/LoadBalancingClient.cs:3142)
ExitGames.Client.Photon.PeerBase:DeserializeMessageAndCallback(StreamBuffer)
ExitGames.Client.Photon.EnetPeer:DispatchIncomingCommands()
ExitGames.Client.Photon.PhotonPeer:DispatchIncomingCommands()
Photon.Pun.PhotonHandler:Dispatch() (at Assets/Photon/PhotonUnityNetworking/Code/PhotonHandler.cs:208)
Photon.Pun.PhotonHandler:FixedUpdate() (at Assets/Photon/PhotonUnityNetworking/Code/PhotonHandler.cs:142)
Warning

Code: Select all

Received OnSerialization for view ID 59. We have no such PhotonView! Ignore this if you're joining or leaving a room. State: Joined
UnityEngine.Debug:LogWarning(Object)
Photon.Pun.PhotonNetwork:OnSerializeRead(Object[], Player, Int32, Int16) (at Assets/Photon/PhotonUnityNetworking/Code/PhotonNetworkPart.cs:1762)
Photon.Pun.PhotonNetwork:OnEvent(EventData) (at Assets/Photon/PhotonUnityNetworking/Code/PhotonNetworkPart.cs:2190)
Photon.Realtime.LoadBalancingClient:OnEvent(EventData) (at Assets/Photon/PhotonRealtime/Code/LoadBalancingClient.cs:3142)
ExitGames.Client.Photon.PeerBase:DeserializeMessageAndCallback(StreamBuffer)
ExitGames.Client.Photon.EnetPeer:DispatchIncomingCommands()
ExitGames.Client.Photon.PhotonPeer:DispatchIncomingCommands()
Photon.Pun.PhotonHandler:Dispatch() (at Assets/Photon/PhotonUnityNetworking/Code/PhotonHandler.cs:208)
Photon.Pun.PhotonHandler:FixedUpdate() (at Assets/Photon/PhotonUnityNetworking/Code/PhotonHandler.cs:142)
User avatar
Leonid_RU
Contributor
Contributor
Posts: 50
Joined: Tue Sep 11, 2018 3:04 am

Fri Jul 24, 2020 8:43 am

I tried to do the same thing only with players (without bots). There are no errors, players run calmly, and take damage. The error only appears with bots. You can only reproduce it if you go out as a masterclass, as I wrote above. If you need more information, please contact me at discord
User avatar
Leonid_RU
Contributor
Contributor
Posts: 50
Joined: Tue Sep 11, 2018 3:04 am

Sat Jul 25, 2020 5:39 am

Errors related to PhotonMono and PhotonView I seem to have solved, but now they no longer appear. I decided in my project, and not in pure MFPS 1.75 (very strange that this is observed there), I just deleted the extra PhotonView in the lobby and put their numbering in order, also made in GameManager and everything worked. The only problem left is that after you take turns leaving the room, that is, to change the masterclient, then 5-6 times the bots start twitching and stand still, that is, they are simply inactive until they are killed, after the respawn of the bot there is no such thing...

Errors only appear related to MFPS actor.

Code: Select all

MFPS actor has not been assigned
UnityEngine.Debug:LogError(Object)
bl_Bullet:SendBotDamage(RaycastHit) (at Assets/MFPS/Scripts/Weapon/Projectiles/bl_Bullet.cs:212)
bl_Bullet:OnHit(RaycastHit) (at Assets/MFPS/Scripts/Weapon/Projectiles/bl_Bullet.cs:142)
bl_Bullet:Travel() (at Assets/MFPS/Scripts/Weapon/Projectiles/bl_Bullet.cs:100)
bl_Bullet:OnUpdate() (at Assets/MFPS/Scripts/Weapon/Projectiles/bl_Bullet.cs:80)
bl_UpdateManager:Update() (at Assets/MFPS/Scripts/Utility/bl_UpdateManager.cs:170)
User avatar
Lovatto
Admin
Admin
Posts: 1541
Joined: Sun Dec 07, 2014 3:18 pm
Contact:

Sun Aug 02, 2020 4:03 pm

Sorry for the late reply,

I just debug this and find the problem,
You can fix it by simply disable the CaptureOfFlag game mode content in your scenes, simply disable this object:
Image
User avatar
Leonid_RU
Contributor
Contributor
Posts: 50
Joined: Tue Sep 11, 2018 3:04 am

Mon Aug 03, 2020 5:37 am

Unfortunately, it didn't help.

Image
Image

Code: Select all

PhotonView ID duplicate found: 7. New: View 7 on AI_Terrorist3(Clone) (scene) old: View 7 on Tim (scene). Maybe one wasn't destroyed on scene load?! Check for 'DontDestroyOnLoad'. Destroying old entry, adding new.
UnityEngine.Debug:LogError(Object)
Photon.Pun.PhotonNetwork:RegisterPhotonView(PhotonView) (at Assets/Photon/PhotonUnityNetworking/Code/PhotonNetworkPart.cs:1000)
Photon.Pun.PhotonView:set_ViewID(Int32) (at Assets/Photon/PhotonUnityNetworking/Code/PhotonView.cs:253)
Photon.Pun.PhotonNetwork:NetworkInstantiate(InstantiateParameters, Boolean, Boolean) (at Assets/Photon/PhotonUnityNetworking/Code/PhotonNetwork.cs:2506)
Photon.Pun.PhotonNetwork:NetworkInstantiate(Hashtable, Player) (at Assets/Photon/PhotonUnityNetworking/Code/PhotonNetwork.cs:2439)
Photon.Pun.PhotonNetwork:OnEvent(EventData) (at Assets/Photon/PhotonUnityNetworking/Code/PhotonNetworkPart.cs:2195)
Photon.Realtime.LoadBalancingClient:OnEvent(EventData) (at Assets/Photon/PhotonRealtime/Code/LoadBalancingClient.cs:3142)
ExitGames.Client.Photon.PeerBase:DeserializeMessageAndCallback(StreamBuffer)
ExitGames.Client.Photon.TPeer:DispatchIncomingCommands()
ExitGames.Client.Photon.PhotonPeer:DispatchIncomingCommands()
Photon.Pun.PhotonHandler:Dispatch() (at Assets/Photon/PhotonUnityNetworking/Code/PhotonHandler.cs:208)
Photon.Pun.PhotonHandler:FixedUpdate() (at Assets/Photon/PhotonUnityNetworking/Code/PhotonHandler.cs:142)

Code: Select all

MFPS actor has not been assigned
UnityEngine.Debug:LogError(Object)
bl_Bullet:SendBotDamage(RaycastHit) (at Assets/MFPS/Scripts/Weapon/Projectiles/bl_Bullet.cs:217)
bl_Bullet:OnHit(RaycastHit) (at Assets/MFPS/Scripts/Weapon/Projectiles/bl_Bullet.cs:142)
bl_Bullet:Travel() (at Assets/MFPS/Scripts/Weapon/Projectiles/bl_Bullet.cs:100)
bl_Bullet:OnUpdate() (at Assets/MFPS/Scripts/Weapon/Projectiles/bl_Bullet.cs:80)
bl_UpdateManager:Update() (at Assets/MFPS/Scripts/Utility/bl_UpdateManager.cs:170)
User avatar
Leonid_RU
Contributor
Contributor
Posts: 50
Joined: Tue Sep 11, 2018 3:04 am

Mon Aug 03, 2020 5:55 am

Also, the console often displays warnings, what can they be related to? Because players began to notice that the damage may not pass through the players, some even become immortal.

Code: Select all

Received RPC "SyncAIWeapon" for viewID 7 but this PhotonView does not exist! Was remote PV. Remote called. By: #04 'Player1' Maybe GO was destroyed but RPC not cleaned up. 

Game sync by master, match state: Playing 

Received OnSerialization for view ID 7. We have no such PhotonView! Ignore this if you're joining or leaving a room. State: Joined
Post Reply