I’m facing a problem with my multiplayer game. I’m using a SyncListStruct for each treasure chest, which holds all the items inside the chest, and these items are shared between all players. The code seems to work fine when you’re playing the game but when script debugging is enabled or you look in the logs you can see 6 ‘SyncList not initialized’ errors. These are from the inactive treasure chests in the scene, and by inactive I mean their collision and renderer are inactive, all of their scripts and their game objects are still active.
Now here’s the weird part. When I run either the host or the client in the editor and connect the other with the .exe these errors show up in the host and client logs. When I run both the host and client from the .exe the errors only show on the client.
I stumbled upon these errors in the log when trying to figure out why the client is always getting disconnected from the host after approximately 25 minutes of playing the game. I’ve been looking at forum posts of similar issues and anything from those posts that I try just doesn’t solve the problem.
Here is the error in the client’s log that occurs 6 times when both the host and client are run from an .exe:
SyncList not initialized
0x00007FF6E34C1A24 (Quest)
0x00007FF6E34C5122 (Quest)
0x00007FF6E37F56A1 (Quest)
0x00007FF6E3B2B274 (Quest)
0x00007FF6E3B2B70C (Quest)
0x00007FF6E4044718 (Quest)
0x0000000006D97E33 (Mono JIT Code) (wrapper managed-to-native) UnityEngine.DebugLogHandler:Internal_Log (UnityEngine.LogType,string,UnityEngine.Object)
0x0000000006D97C94 (Mono JIT Code) [DebugLogHandler.cs:9] UnityEngine.DebugLogHandler:LogFormat (UnityEngine.LogType,UnityEngine.Object,string,object[ ])
0x0000000006D97595 (Mono JIT Code) [Logger.cs:47] UnityEngine.Logger:Log (UnityEngine.LogType,object)
0x000000004F74B8B3 (Mono JIT Code) [DebugBindings.gen.cs:124] UnityEngine.Debug:LogError (object)
0x000000004F74AE44 (Mono JIT Code) [SyncList.cs:295] UnityEngine.Networking.SyncList1<LootShared/SharedItem>:SendMsg (UnityEngine.Networking.SyncList1/Operation<LootShared/SharedItem>,int,LootShared/SharedItem)
0x000000004F74AC79 (Mono JIT Code) [SyncList.cs:338] UnityEngine.Networking.SyncList1<LootShared/SharedItem>:SendMsg (UnityEngine.Networking.SyncList1/Operation<LootShared/SharedItem>,int)
0x000000004F74A99C (Mono JIT Code) [SyncList.cs:395] UnityEngine.Networking.SyncList`1<LootShared/SharedItem>:Clear ()
0x000000004F74A6F9 (Mono JIT Code) Unity.GeneratedNetworkCode:_ReadStructSyncListSharedItem_LootShared (UnityEngine.Networking.NetworkReader,LootShared/SyncListSharedItem)
0x000000004F74A265 (Mono JIT Code) LootShared:OnDeserialize (UnityEngine.Networking.NetworkReader,bool)
0x000000004F743C60 (Mono JIT Code) [NetworkIdentity.cs:750] UnityEngine.Networking.NetworkIdentity:OnUpdateVars (UnityEngine.Networking.NetworkReader,bool)
0x000000004F74375F (Mono JIT Code) [ClientScene.cs:491] UnityEngine.Networking.ClientScene:ApplySpawnPayload (UnityEngine.Networking.NetworkIdentity,UnityEngine.Vector3,byte[ ],UnityEngine.Networking.NetworkInstanceId,UnityEngine.GameObject)
0x000000004F740568 (Mono JIT Code) [ClientScene.cs:608] UnityEngine.Networking.ClientScene:OnObjectSpawnScene (UnityEngine.Networking.NetworkMessage)
0x000000004F7372CC (Mono JIT Code) [NetworkConnection.cs:469] UnityEngine.Networking.NetworkConnection:HandleReader (UnityEngine.Networking.NetworkReader,int,int)
0x000000004F73689B (Mono JIT Code) [NetworkConnection.cs:425] UnityEngine.Networking.NetworkConnection:HandleBytes (byte[ ],int,int)
0x000000004F73673F (Mono JIT Code) [NetworkConnection.cs:576] UnityEngine.Networking.NetworkConnection:TransportReceive (byte[ ],int,int)
0x000000002D62A13F (Mono JIT Code) [NetworkClient.cs:753] UnityEngine.Networking.NetworkClient:Update ()
0x000000002D6293DD (Mono JIT Code) [NetworkClient.cs:965] UnityEngine.Networking.NetworkClient:UpdateClients ()
0x000000002D628FB4 (Mono JIT Code) [NetworkIdentity.cs:1091] UnityEngine.Networking.NetworkIdentity:UNetStaticUpdate ()
0x0000000006D00ADE (Mono JIT Code) (wrapper runtime-invoke) object:runtime_invoke_void (object,intptr,intptr,intptr)
0x00007FFDFFCC5B63 (mono) mono_set_defaults
0x00007FFDFFC1872D (mono) mono_runtime_invoke
0x00007FF6E3DAB3F4 (Quest)
0x00007FF6E3DA6101 (Quest)
0x00007FF6E3C2FD60 (Quest)
0x00007FF6E3BA90A1 (Quest)
0x00007FF6E34EBCF0 (Quest)
0x00007FF6E34EBE9A (Quest)
0x00007FF6E34FA454 (Quest)
0x00007FF6E48907D0 (Quest)
0x00007FFE37DC2774 (KERNEL32) BaseThreadInitThunk
0x00007FFE386C0D51 (ntdll) RtlUserThreadStart
(Filename: C:/buildslave/unity/build/artifacts/generated/common/runtime/DebugBindings.gen.cpp Line: 51)
I’m using Unity 2017.1.0f3 and building for Windows x86_64. The computer I’m using has Windows 10 (64-bit) on it. I’ve been working on this project since 2015 and have been upgrading it alongside Unity version updates as they come out. I’m just curious if this might be a bug with Unity or if its something on my end. Its a big project but I can try to provide more information if needed.