Apologies if this is the wrong place to post this!
It seems like today’s update to the Entities package has introduced a crash in ```
EntityManager.AddComponent(NativeArray entities, ComponentType componentType);
Easily reproducible in preview.32, can't reproduce it in preview.31
Triggering code:
```csharp
var treesToCheck = new NativeArray<Entity>(filteredIndices.Length, Allocator.TempJob);
result = new BuildArrayJob
{
UnfilteredEntities = uncheckedTrees,
FilteredIndices = filteredIndices.AsArray(),
FilteredEntities = treesToCheck
}.Schedule(filteredIndices.Length, 8, result);
result.Complete();
// Mark all of those trees as Checked
EntityManager.AddComponent(treesToCheck, typeof(Checked));
Stacktrace:
0x00007FF70C2EAC1E (Unity) memcpy_repmovs
0x00007FF70AE59B8B (Unity) UnsafeUtility_CUSTOM_MemCpy
0x00000161C2C0BA10 (Mono JIT Code) (wrapper managed-to-native) Unity.Collections.LowLevel.Unsafe.UnsafeUtility:MemCpy (void*,void*,long)
0x00000161C3CEA203 (Mono JIT Code) [D:\unity\LastResort\unity\Library\PackageCache\com.unity.entities@0.0.12-preview.32\Unity.Entities\ChunkDataUtility.cs:341] Unity.Entities.ChunkDataUtility:Convert (Unity.Entities.Chunk*,int,Unity.Entities.Chunk*,int,int)
0x00000161C395F403 (Mono JIT Code) [D:\unity\LastResort\unity\Library\PackageCache\com.unity.entities@0.0.12-preview.32\Unity.Entities\EntityManagerChangeArchetypeUtility.cs:694] Unity.Entities.EntityManagerChangeArchetypeUtility/PackBlittableChunkData:Execute ()
0x00000161C395EC1B (Mono JIT Code) [C:\buildslave\unity\build\Runtime\Jobs\Managed\IJob.cs:31] Unity.Jobs.IJobExtensions/JobStruct`1<Unity.Entities.EntityManagerChangeArchetypeUtility/PackBlittableChunkData>:Execute (Unity.Entities.EntityManagerChangeArchetypeUtility/PackBlittableChunkData&,intptr,intptr,Unity.Jobs.LowLevel.Unsafe.JobRanges&,int)
0x00000161C395EEB5 (Mono JIT Code) (wrapper delegate-invoke) Unity.Jobs.IJobExtensions/JobStruct`1/ExecuteJobFunction<Unity.Entities.EntityManagerChangeArchetypeUtility/PackBlittableChunkData>:invoke_void_T&_intptr_intptr_JobRanges&_int (Unity.Entities.EntityManagerChangeArchetypeUtility/PackBlittableChunkData&,intptr,intptr,Unity.Jobs.LowLevel.Unsafe.JobRanges&,int)
0x00000161C2CED8AB (Mono JIT Code) (wrapper runtime-invoke) <Module>:runtime_invoke_void__this___intptr&_intptr_intptr_intptr&_int (object,intptr,intptr,intptr)
0x00007FF93526C11B (mono-2.0-bdwgc) [c:\users\builduser\builds\tsuywz8z\0\vm\mono\mono\mini\mini-runtime.c:2809] mono_jit_runtime_invoke
0x00007FF9351F2282 (mono-2.0-bdwgc) [c:\users\builduser\builds\tsuywz8z\0\vm\mono\mono\metadata\object.c:2921] do_runtime_invoke
0x00007FF9351FB27F (mono-2.0-bdwgc) [c:\users\builduser\builds\tsuywz8z\0\vm\mono\mono\metadata\object.c:2968] mono_runtime_invoke
0x00007FF70AD19C32 (Unity) scripting_method_invoke
0x00007FF70AD138F1 (Unity) ScriptingInvocation::Invoke
0x00007FF70A6CB051 (Unity) ExecuteJob
0x00007FF70A6CBEBA (Unity) ForwardJobToManaged
0x00007FF70A6BD11E (Unity) JobQueue::Exec
0x00007FF70A6C3E9C (Unity) JobQueue::WaitForJobGroupID
0x00007FF70A6A0608 (Unity) CompleteFenceInternal
0x00007FF70AEA11E1 (Unity) JobHandle_CUSTOM_ScheduleBatchedJobsAndComplete
0x00000161C2CED57E (Mono JIT Code) (wrapper managed-to-native) Unity.Jobs.JobHandle:ScheduleBatchedJobsAndComplete (Unity.Jobs.JobHandle&)
0x00000161C2CD6CFB (Mono JIT Code) [C:\buildslave\unity\build\Runtime\Jobs\ScriptBindings\JobHandle.bindings.cs:21] Unity.Jobs.JobHandle:Complete ()
0x00000161C395A883 (Mono JIT Code) [D:\unity\LastResort\unity\Library\PackageCache\com.unity.entities@0.0.12-preview.32\Unity.Entities\EntityManagerChangeArchetypeUtility.cs:215] Unity.Entities.EntityManagerChangeArchetypeUtility:AddComponent (Unity.Collections.NativeList`1<Unity.Entities.EntityBatchInChunk>,Unity.Entities.ComponentType,int,Unity.Entities.EntityComponentStore*,Unity.Entities.ManagedComponentStore,Unity.Entities.EntityGroupManager)
0x00000161D2E71083 (Mono JIT Code) [D:\unity\LastResort\unity\Library\PackageCache\com.unity.entities@0.0.12-preview.32\Unity.Entities\EntityManagerChangeArchetype.cs:83] Unity.Entities.EntityManager:AddComponent (Unity.Collections.NativeArray`1<Unity.Entities.Entity>,Unity.Entities.ComponentType)
0x00000161D294555B (Mono JIT Code) [D:\unity\LastResort\unity\Assets\Scripts\Systems\DemolishTreeSystemV2.cs:150] DemolishTreeSystemV2:ProcessEvent (DemolishTreeEvent,int,Unity.Jobs.JobHandle&)
0x00000161C39296B6 (Mono JIT Code) [D:\unity\LastResort\unity\Assets\Scripts\Systems\JobEventSystem.cs:32] JobEventSystem`1<DemolishTreeEvent>:OnUpdate (Unity.Jobs.JobHandle)
0x00000161C2CEF50B (Mono JIT Code) [D:\unity\LastResort\unity\Library\PackageCache\com.unity.entities@0.0.12-preview.32\Unity.Entities\ComponentSystem.cs:840] Unity.Entities.JobComponentSystem:InternalUpdate ()
0x00000161C2CD2FC4 (Mono JIT Code) [D:\unity\LastResort\unity\Library\PackageCache\com.unity.entities@0.0.12-preview.32\Unity.Entities\ComponentSystem.cs:242] Unity.Entities.ComponentSystemBase:Update ()
0x00000161C2CD502B (Mono JIT Code) [D:\unity\LastResort\unity\Library\PackageCache\com.unity.entities@0.0.12-preview.32\Unity.Entities\ComponentSystemGroup.cs:373] Unity.Entities.ComponentSystemGroup:OnUpdate ()
0x00000161C2CD335B (Mono JIT Code) [D:\unity\LastResort\unity\Library\PackageCache\com.unity.entities@0.0.12-preview.32\Unity.Entities\ComponentSystem.cs:720] Unity.Entities.ComponentSystem:InternalUpdate ()
0x00000161C2CD2FC4 (Mono JIT Code) [D:\unity\LastResort\unity\Library\PackageCache\com.unity.entities@0.0.12-preview.32\Unity.Entities\ComponentSystem.cs:242] Unity.Entities.ComponentSystemBase:Update ()
0x00000161C2CD502B (Mono JIT Code) [D:\unity\LastResort\unity\Library\PackageCache\com.unity.entities@0.0.12-preview.32\Unity.Entities\ComponentSystemGroup.cs:373] Unity.Entities.ComponentSystemGroup:OnUpdate ()
0x00000161C2CD335B (Mono JIT Code) [D:\unity\LastResort\unity\Library\PackageCache\com.unity.entities@0.0.12-preview.32\Unity.Entities\ComponentSystem.cs:720] Unity.Entities.ComponentSystem:InternalUpdate ()
0x00000161C2CD2FC4 (Mono JIT Code) [D:\unity\LastResort\unity\Library\PackageCache\com.unity.entities@0.0.12-preview.32\Unity.Entities\ComponentSystem.cs:242] Unity.Entities.ComponentSystemBase:Update ()
0x00000161C2CD2E6B (Mono JIT Code) [D:\unity\LastResort\unity\Library\PackageCache\com.unity.entities@0.0.12-preview.32\Unity.Entities\ScriptBehaviourUpdateOrder.cs:135] Unity.Entities.ScriptBehaviourUpdateOrder/DummyDelegateWrapper:TriggerUpdate ()
0x0000016191F673D8 (Mono JIT Code) (wrapper runtime-invoke) object:runtime_invoke_void__this__ (object,intptr,intptr,intptr)
0x00007FF93526C11B (mono-2.0-bdwgc) [c:\users\builduser\builds\tsuywz8z\0\vm\mono\mono\mini\mini-runtime.c:2809] mono_jit_runtime_invoke
0x00007FF9351F2282 (mono-2.0-bdwgc) [c:\users\builduser\builds\tsuywz8z\0\vm\mono\mono\metadata\object.c:2921] do_runtime_invoke
0x00007FF9351FB27F (mono-2.0-bdwgc) [c:\users\builduser\builds\tsuywz8z\0\vm\mono\mono\metadata\object.c:2968] mono_runtime_invoke
0x00007FF70AD19C32 (Unity) scripting_method_invoke
0x00007FF70AD138F1 (Unity) ScriptingInvocation::Invoke
0x00007FF70A7E14DB (Unity) ExecutePlayerLoop
0x00007FF70A7E14F9 (Unity) ExecutePlayerLoop
0x00007FF70A7E636B (Unity) PlayerLoop
0x00007FF708DDD6DB (Unity) PlayerLoopController::UpdateScene
0x00007FF708DDB1DC (Unity) Application::TickTimer
0x00007FF709650D05 (Unity) MainMessageLoop
0x00007FF70965373F (Unity) WinMain
0x00007FF70C2C8252 (Unity) __scrt_common_main_seh
0x00007FF9ACCA7974 (KERNEL32) BaseThreadInitThunk
0x00007FF9AD1EA271 (ntdll) RtlUserThreadStart
========== END OF STACKTRACE ===========
Full crash folder attached.