Search Issue Tracker
Won't Fix
Won't Fix in 1.0.X
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
- Out-of-bounds memory access with multiple CanvasRenderers under a Canvas when using Mesh API
- Inspector tries to access file after it was deleted when the file was locked in Inspector window
- Changing Transform values in Search window Inspector loses focus while dragging and stopping mouse without releasing dragging action
- Saving changes on the dirty VFX Graph during the Play mode throws "The referenced script (Unknown) on this Behaviour is missing!" warnings
- VFX Graph Debug Info overlaps the "Initialize" block debug info by default
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.
Resolution Note (1.0.X):
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.