Hello,
I’m trying to set up a simple host with netcode for entities. I have stripped down my code to literally do the following:
ClientServerBootstrap.AutoConnectPort = 7777;
_serverWorld = ClientServerBootstrap.CreateServerWorld(“ServerWorld”);
// wait for a button press…
_serverWorld.Dispose();
The problem is that upon exiting playmode and then entering again I get:
Leak Detected : Persistent allocates 1 individual allocations.
Ok, I turned on Jobs leaks callstacks, but it somehow is incomplete, like if it was arbitrarily truncated, so I can’t actually figure out what is causing the leak. The callstack I get is this:
Found 1 leak(s) from callstack:
0x00007ffdcc7b2e36 (ba8b60678abccfe6abaed1ac343d43d) Unity.Entities.EntityComponentStore.CreateEntities (at C:/work/Test/Robot Survival (Unity Netcode for Entities)/Library/PackageCache/com.unity.burst/.Runtime/Library/PackageCache/com.unity.entities/Unity.Entities/EntityComponentStoreCreateDestroyEntities.cs:30)
0x00007ffdcc7beccf (ba8b60678abccfe6abaed1ac343d43d) c2a99021e1b9003db67e0e5cba47df11
0x0000027655d8cfd5 (Mono JIT Code) (wrapper managed-to-native) Unity.Entities.StructuralChange/Unity.Entities.CreateEntity_000011E9$BurstDirectCall:wrapper_native_indirect_00000276A3EBFC68 (intptr&,Unity.Entities.EntityComponentStore*,void*,Unity.Entities.Entity*,int)
0x0000027655d8cb03 (Mono JIT Code) Unity.Entities.StructuralChange/Unity.Entities.CreateEntity_000011E9$BurstDirectCall:Invoke (Unity.Entities.EntityComponentStore*,void*,Unity.Entities.Entity*,int)
0x0000027655d8c9b3 (Mono JIT Code) Unity.Entities.StructuralChange:CreateEntity (Unity.Entities.EntityComponentStore*,void*,Unity.Entities.Entity*,int) (at ./Library/PackageCache/com.unity.entities/Unity.Entities/StructuralChange.cs:149)
0x0000027655d8be93 (Mono JIT Code) Unity.Entities.EntityDataAccess:CreateEntityDuringStructuralChange (Unity.Entities.EntityArchetype,Unity.Entities.Entity*,int,Unity.Entities.SystemHandle&) (at ./Library/PackageCache/com.unity.entities/Unity.Entities/EntityDataAccess.cs:712)
0x0000027655d8ba9b (Mono JIT Code) Unity.Entities.EntityDataAccess:CreateEntityDuringStructuralChange (Unity.Entities.EntityArchetype,Unity.Entities.SystemHandle&) (at ./Library/PackageCache/com.unity.entities/Unity.Entities/EntityDataAccess.cs:687)
0x0000027655d8b6e3 (Mono JIT Code) Unity.Entities.EntityManager:CreateEntity (Unity.Entities.EntityArchetype) (at ./Library/PackageCache/com.unity.entities/Unity.Entities/EntityManager.cs:3228)
0x0000027655d7353b (Mono JIT Code) Unity.Entities.WorldUnmanagedImpl:CreateSystemEntity (Unity.Entities.World,int,Unity.Entities.SystemState*) (at ./Library/PackageCache/com.unity.entities/Unity.Entities/WorldUnmanaged.cs:514)
0x0000027655d7212b (Mono JIT Code) Unity.Entities.WorldUnmanagedImpl:CreateUnmanagedSystemInternal (Unity.Entities.World,int,long,int,void*&,bool) (at ./Library/PackageCache/com.unity.entities/Unity.Entities/WorldUnmanaged.cs:472)
0x0000027655d713eb (Mono JIT Code) Unity.Entities.WorldUnmanagedImpl:CreateUnmanagedSystem (Unity.Entities.SystemTypeIndex,long,bool) (at ./Library/PackageCache/com.unity.entities/Unity.Entities/WorldUnmanaged.cs:592)
0x0000027655d70e93 (Mono JIT Code) Unity.Entities.WorldUnmanagedImpl:CreateUnmanagedSystem (Unity.Entities.SystemTypeIndex,bool) (at ./Library/PackageCache/com.unity.entities/Unity.Entities/WorldUnmanaged.cs:674)
0x0000027655d70ca3 (Mono JIT Code) Unity.Entities.WorldUnmanaged:CreateUnmanagedSystem (Unity.Entities.SystemTypeIndex,bool) (at ./Library/PackageCache/com.unity.entities/Unity.Entities/WorldUnmanaged.cs:1105)
0x0000027655d6bd83 (Mono JIT Code) Unity.Entities.World:GetOrCreateSystemsAndLogException (Unity.Collections.NativeList`1<Unity.Entities.SystemTypeIndex>,int,Unity.Collections.AllocatorManager/AllocatorHandle) (at ./Library/PackageCache/com.unity.entities/Unity.Entities/World.cs:1229)
0x0000027655d6b2fb (Mono JIT Code) Unity.Entities.World:GetOrCreateSystemsAndLogException (Unity.Collections.NativeList`1<Unity.Entities.SystemTypeIndex>,Unity.Collections.AllocatorManager/AllocatorHandle) (at ./Library/PackageCache/com.unity.entities/Unity.Entities/World.cs:1321)
0x0000027655d67d6b (Mono JIT Code) Unity.Entities.DefaultWorldInitialization:AddSystemToRootLevelSystemGroupsInternal<Unity.Entities.DefaultWorldInitialization/DefaultRootGroups> (Unity.Entities.World,Unity.Collections.NativeList`1<Unity.Entities.SystemTypeIndex>,Unity.Entities.ComponentSystemGroup,Unity.Entities.DefaultWorldInitialization/DefaultRootGroups) (at ./Library/PackageCache/com.unity.entities/Unity.Entities/DefaultWorldInitialization.cs:252)
0x0000027655d511bb (Mono JIT Code) Unity.Entities.DefaultWorldInitialization:AddSystemToRootLevelSystemGroupsInternal (Unity.Entities.World,Uni
Any advice would be greatly appreciated.