Unity Version: 2019.4.6f1
I think it was a IL2CPP build.
Windows 7 64bit
So I had a bug and was trying to track it down by looking in the logs. 1 Client running normally, and 1 Client running in sandboxie so I can have 2 Steams running.
Weirdly, the client that was running in sandboxie (not sure if that affected anything) had this line snuck seemingly randomly in the debug logs, although consistent in when it was placed (When I was changing teams).
…
at UnityEngine.Windows.WebCam.VideoCapture+OnVideoCaptureResourceCreatedCallback.Invoke (UnityEngine.Windows.WebCam.VideoCapture captureObject) <0x00000 + 0xffffffff> 0 in <00000000000000000000000000000000>:0
…
Weird, I noticed it and kept it in the back of my mind as I continued to hunt down the bug I was looking for.
After fixing the bug, I closed shop for the day, and some code changes later I came back to see if there were any WebCam logs in my logs anymore and I dont see any, but I do see something else in its place.
…
at System.Net.SimpleAsyncCallback.Invoke (System.Net.SimpleAsyncResult result) <0x00000 + 0xffffffff> 0 in <00000000000000000000000000000000>:0
…
So here is the full Debug Log with the webcam log
WeirdLog
Nx: Player MemberID:# set team to Team2
at MGameEngine.MConsole+MLoggerHandler.LogFormat (UnityEngine.LogType logType, UnityEngine.Object context, System.String format, System.Object[ ] args) <0x00000 + 0xffffffff> 0 in <00000000000000000000000000000000>:0
at UnityEngine.Logger.Log (System.String tag, System.Object message) <0x00000 + 0xffffffff> 0 in <00000000000000000000000000000000>:0
at MGameEngine.MConsole.LogExtra (System.Object message) <0x00000 + 0xffffffff> 0 in <00000000000000000000000000000000>:0
at MGameMode.GameModeBehaviour.OnPlayerSetTeam (MGameEngine.SyncNet.SyncUniqueID memberID, MGameMode.GameTeam team) <0x00000 + 0xffffffff> 0 in <00000000000000000000000000000000>:0
at MGameMode.BasicGameMode.OnPlayerSetTeam (MGameEngine.SyncNet.SyncUniqueID memberID, MGameMode.GameTeam team) <0x00000 + 0xffffffff> 0 in <00000000000000000000000000000000>:0
at MGameMode.MGameModeManager.OnPlayerSetTeam (MGameEngine.SyncNet.SyncUniqueID memberID, MGameMode.GameTeam team) <0x00000 + 0xffffffff> 0 in <00000000000000000000000000000000>:0
at System.Action2[T1,T2].Invoke (T1 arg1, T2 arg2) <0x00000 + 0xffffffff> 0 in <00000000000000000000000000000000>:0 at MGameEngine.ActionHashEvent
2[T,U].Execute (T params1, U params2) <0x00000 + 0xffffffff> 0 in <00000000000000000000000000000000>:0
at MGameMode.MemberGameData.SetLeaderDetectedTeam (MGameMode.GameTeam team) <0x00000 + 0xffffffff> 0 in <00000000000000000000000000000000>:0
at MGameMode.GameModeBehaviour.SetLeaderDetectedPlayerTeam (System.Collections.Generic.List1[T] playerTeams) <0x00000 + 0xffffffff> 0 in <00000000000000000000000000000000>:0 at MGameMode.GameModeBehaviour.RPCReceive_SetLeaderDetectedPlayerTeam (MGameEngine.SyncNet.SyncStream stream) <0x00000 + 0xffffffff> 0 in <00000000000000000000000000000000>:0 at UnityEngine.Windows.WebCam.VideoCapture+OnVideoCaptureResourceCreatedCallback.Invoke (UnityEngine.Windows.WebCam.VideoCapture captureObject) <0x00000 + 0xffffffff> 0 in <00000000000000000000000000000000>:0 at MGameEngine.SyncNet.SyncIdentity.OnRPCMessage (MGameEngine.SyncNet.SyncIdentityRPCSyncMessage msg) <0x00000 + 0xffffffff> 0 in <00000000000000000000000000000000>:0 at System.Action
1[T].Invoke (T obj) <0x00000 + 0xffffffff> 0 in <00000000000000000000000000000000>:0
at MGameEngine.SyncNet.SyncMessageHandler.ReadMessage (System.UInt16 msgID, MGameEngine.SyncNet.SyncConnection fromConnection, System.Int32 channelID, MGameEngine.SyncNet.SyncStream stream, System.Single& cost) <0x00000 + 0xffffffff> 0 in <00000000000000000000000000000000>:0
at MGameEngine.SyncNet.SyncConnection.Receive (System.Int32 channelID, MGameEngine.SyncNet.SyncStream stream, System.Boolean startDeserializing) <0x00000 + 0xffffffff> 0 in <00000000000000000000000000000000>:0
at MGameEngine.SyncNet.SyncClient.OnReceiveData (MGameEngine.SyncNet.SyncReceiveInfo receiveInfo) <0x00000 + 0xffffffff> 0 in <00000000000000000000000000000000>:0
at System.Action1[T].Invoke (T obj) <0x00000 + 0xffffffff> 0 in <00000000000000000000000000000000>:0 at MGameEngine.ActionHashEvent
1[T].Execute (T params1) <0x00000 + 0xffffffff> 0 in <00000000000000000000000000000000>:0
at MGameEngine.ActionHashEvent`1[T].TryExecute (T params1) <0x00000 + 0xffffffff> 0 in <00000000000000000000000000000000>:0
at MGameEngine.SyncNet.SyncSteamTransporter.ReadPackets () <0x00000 + 0xffffffff> 0 in <00000000000000000000000000000000>:0
at System.Action.Invoke () <0x00000 + 0xffffffff> 0 in <00000000000000000000000000000000>:0
at MGameEngine.ActionHashEvent.Execute () <0x00000 + 0xffffffff> 0 in <00000000000000000000000000000000>:0
at MGameEngine.StaticUpdatesBehaviour.Update () <0x00000 + 0xffffffff> 0 in <00000000000000000000000000000000>:0
Here is the full normal Debug Log
NormalLog
Nx: Player MemberID:# set team to Team2
at MGameEngine.MConsole+MLoggerHandler.LogFormat (UnityEngine.LogType logType, UnityEngine.Object context, System.String format, System.Object[ ] args) <0x00000 + 0xffffffff> 0 in <00000000000000000000000000000000>:0
at UnityEngine.Logger.Log (System.String tag, System.Object message) <0x00000 + 0xffffffff> 0 in <00000000000000000000000000000000>:0
at MGameEngine.MConsole.LogExtra (System.Object message) <0x00000 + 0xffffffff> 0 in <00000000000000000000000000000000>:0
at MGameMode.GameModeBehaviour.OnPlayerSetTeam (MGameEngine.SyncNet.SyncUniqueID memberID, MGameMode.GameTeam team) <0x00000 + 0xffffffff> 0 in <00000000000000000000000000000000>:0
at MGameMode.BasicGameMode.OnPlayerSetTeam (MGameEngine.SyncNet.SyncUniqueID memberID, MGameMode.GameTeam team) <0x00000 + 0xffffffff> 0 in <00000000000000000000000000000000>:0
at MGameMode.MGameModeManager.OnPlayerSetTeam (MGameEngine.SyncNet.SyncUniqueID memberID, MGameMode.GameTeam team) <0x00000 + 0xffffffff> 0 in <00000000000000000000000000000000>:0
at System.Action2[T1,T2].Invoke (T1 arg1, T2 arg2) <0x00000 + 0xffffffff> 0 in <00000000000000000000000000000000>:0 at MGameEngine.ActionHashEvent
2[T,U].Execute (T params1, U params2) <0x00000 + 0xffffffff> 0 in <00000000000000000000000000000000>:0
at MGameMode.MemberGameData.SetLeaderDetectedTeam (MGameMode.GameTeam team) <0x00000 + 0xffffffff> 0 in <00000000000000000000000000000000>:0
at MGameMode.GameModeBehaviour.SetLeaderDetectedPlayerTeam (System.Collections.Generic.List1[T] playerTeams) <0x00000 + 0xffffffff> 0 in <00000000000000000000000000000000>:0 at MGameMode.GameModeBehaviour.RPCReceive_SetLeaderDetectedPlayerTeam (MGameEngine.SyncNet.SyncStream stream) <0x00000 + 0xffffffff> 0 in <00000000000000000000000000000000>:0 at System.Net.SimpleAsyncCallback.Invoke (System.Net.SimpleAsyncResult result) <0x00000 + 0xffffffff> 0 in <00000000000000000000000000000000>:0 at MGameEngine.SyncNet.SyncIdentity.OnRPCMessage (MGameEngine.SyncNet.SyncIdentityRPCSyncMessage msg) <0x00000 + 0xffffffff> 0 in <00000000000000000000000000000000>:0 at System.Action
1[T].Invoke (T obj) <0x00000 + 0xffffffff> 0 in <00000000000000000000000000000000>:0
at MGameEngine.SyncNet.SyncMessageHandler.ReadMessage (System.UInt16 msgID, MGameEngine.SyncNet.SyncConnection fromConnection, System.Int32 channelID, MGameEngine.SyncNet.SyncStream stream, System.Single& cost) <0x00000 + 0xffffffff> 0 in <00000000000000000000000000000000>:0
at MGameEngine.SyncNet.SyncConnection.Receive (System.Int32 channelID, MGameEngine.SyncNet.SyncStream stream, System.Boolean startDeserializing) <0x00000 + 0xffffffff> 0 in <00000000000000000000000000000000>:0
at MGameEngine.SyncNet.SyncClient.OnReceiveData (MGameEngine.SyncNet.SyncReceiveInfo receiveInfo) <0x00000 + 0xffffffff> 0 in <00000000000000000000000000000000>:0
at System.Action1[T].Invoke (T obj) <0x00000 + 0xffffffff> 0 in <00000000000000000000000000000000>:0 at MGameEngine.ActionHashEvent
1[T].Execute (T params1) <0x00000 + 0xffffffff> 0 in <00000000000000000000000000000000>:0
at MGameEngine.ActionHashEvent`1[T].TryExecute (T params1) <0x00000 + 0xffffffff> 0 in <00000000000000000000000000000000>:0
at MGameEngine.SyncNet.SyncSteamTransporter.ReadPackets () <0x00000 + 0xffffffff> 0 in <00000000000000000000000000000000>:0
at System.Action.Invoke () <0x00000 + 0xffffffff> 0 in <00000000000000000000000000000000>:0
at MGameEngine.ActionHashEvent.Execute () <0x00000 + 0xffffffff> 0 in <00000000000000000000000000000000>:0
at MGameEngine.StaticUpdatesBehaviour.Update () <0x00000 + 0xffffffff> 0 in <00000000000000000000000000000000>:0
Here is an image of the Diff of the logs
Image
Here is the method that is in the log that appears before the weird logs, which is the method SyncIdentity.OnRPCMessage and probably the other important code parts.
Code
public static void OnRPCMessage(SyncIdentityRPCSyncMessage msg)
{
SyncIdentity syncIdentity = GetSyncIdentity(...);
if(...)
{
syncIdentity.DeserializeRPC(msg.index, msg.data);
}else{
...
}
}
List<RPCData> rpcDelegates;
void DeserializeRPC(int rpcIndex, SyncStream stream)
{
if(rpcDelegates.HasIndex(rpcIndex))
{
rpcDelegates[rpcIndex].method(stream);
onDeserializeRPC.Execute();
}
}
public class RPCData<T> : RPCDatas
{
public T method;
public RPCData(T method, SyncQOS qosType, bool useMultiUnreliable = false, bool requireLobbyReady = false) : base(qosType, useMultiUnreliable, requireLobbyReady)
{
this.method = method;
}
}
public class RPCData : RPCData<RPCDelegate>
{
public RPCData(RPCDelegate method, SyncQOS qosType, bool useMultiUnreliable = false, bool requireLobbyReady = false) : base(method, qosType, useMultiUnreliable, requireLobbyReady) {}
}
Now, I doubt unity is trying to spy on me or anything, but I do not know why I had that webcam log, and if a user had seen this in their logs, theyd probably not give me the benefit of the doubt and assume I am trying to do something fishy.
It was always when changing teams, so it was random that it happened when changing teams, but it was consistent in that it was always when changing teams.
I do not see it happen anymore, maybe I should try to put back the bug I was hunting, but I dont see how that would cause this in the first place as it seems completely irrelevant. I am pretty sure no where am I doing any webcam stuff.
I also don’t have a webcam.