Search Issue Tracker
Won't Fix
Votes
2
Found in [Package]
1.0.0
Issue ID
ECSB-197
Regression
No
Crash with multiple stack traces when using the EntityManager.CopyAndReplaceEntitiesFrom method
Reproduction steps:
1. Open the attached “repro-project“
2. Open the “Assets/Demos/2. Setup/2b. Motion Properties/2b1. Motion Properties - Mass.unity” scene
3. Enter Play Mode
4. Repeatedly press “X“
5. Observe the crash
Reproducible with: 1.0.0-pre.15 (2022.2.10f1, 2023.1.0b7, 2023.2.0a5)
Reproduced on: Windows 10 Pro
Notes:
1. If the crash does not reproduce repeat steps 3 and 4
2. Reproduction is inconsistent
3. Also reproduced in Player
First few lines of the stack traces:
{{0x00007FF949D68A2A (Unity) remove_free_block }}
{{0x00007FF949D68D3D (Unity) tlsf_free }}
{{0x00007FF9459B93FF (Unity) DynamicHeapAllocator::Deallocate }}
{{0x00007FF9459F2376 (Unity) DualThreadAllocator<DynamicHeapAllocator>::TryDeallocate}}
{{0x00007FF9459B9B68 (Unity) MemoryManager::Deallocate}}
{{0x00007ff7aacfaf6e (Unity) DynamicHeapAllocator::Deallocate }}
{{0x00007ff7aad07a32 (Unity) DelayedPointerDeletionManager::CleanupPendingMainThreadPointersInternal }}
{{0x00007ff7aad07164 (Unity) DualThreadAllocator<DynamicHeapAllocator>::Allocate }}
{{0x00007ff7aacfa0c1 (Unity) MemoryManager::Allocate }}
{{0x00007ff7aad0420e (Unity) malloc_internal}}
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- The Scene View becomes gray and "NullReferenceException" errors are thrown when attaching the Unity Editor process to RenderDoc
- Memory usage rapidly rises when changing colors in the color wheel
- Physically Based Sky's Horizon and Zenith Tint Color Selection Bars don't have immediate access to color pickers
- EmptyAdditionalLightShadowmapTexture leaks from memory when URP quality level is changed using QualitySettings.SetQualityLevel
- Referenced ScriptableObject field does not get updated and cannot be set to "None" when there are no Objects of that type
Resolution Note:
EntityManager.CopyAndReplaceEntitiesFrom is unfortunately making a series of assumptions that fundamentally prevent this function from ever working in the general case. And recent changes in the way entities are allocated made it even more difficult to use properly. So we have decided to deprecate this function. There is just no way it would ever deliver on what it was supposed to do.