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
- Required SpriteMask class (ID 331) is stripped when "Strip Engine Code" is enabled
- “Maximized serialized file backup not found” error is thrown when minimizing a window in a newly opened project
- Build stack trace contains invalid lines when building with IL2CPP using scripts with delegates containing generic types in the signature
- Entities Systems window has a “Show Full Player Loop” dropdown which does nothing when clicked after enabling “Show Full Player Loop”
- Entities Hierarchy Search “Show/Hide” button’s Lens Icon is blurry when the Editor is on an external monitor
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.