Search Issue Tracker
Won't Fix
Won't Fix in 2022.2.X
Votes
0
Found in
2021.3.6f1
2022.1.8f1
2022.2.0b1
Issue ID
UUM-8638
Regression
No
GC calls generate micro-freezes when UnityEventBase creates a lot of m_Calls
Reproduction steps:
1. Open the attached project “IN-3528.zip”
2. Start Play Mode
3. Click Window > Analysis > Memory profiler
4. Take a Snapshot and after 30 seconds or more take another Snapshot
5. In the Memory Profiler window, select Compare Snapshot
6. Click the first Snapshot, and then the second Snapshot
7. Click “Objects and Allocations”
8. Click Diff filter, and then click Group
9. Click Type filter, and then click Group
10. Click Size and then click “Sort Descending”
11. Click the “Deleted in B” dropdown
12. Find “Systems.Collections.Generic.List<UnityEngine.Events.BaseInvokableCall>”
Expected result: UnityEventBase creates only the needed amount of m_Calls.
Actual result: UnityEventBase creates a lot of m_Calls.
Reproducible with: 2021.3.6f1, 2022.1.8f1, 2022.2.0b1
Couldn't test with: 2020.3.36f1 (package errors), 2023.1.0a3 (Memory profiler doesn’t display any references)
Reproducible on: Windows Pro 21H2
Note: If you can’t find “Systems.Collections.Generic.List<UnityEngine.Events.BaseInvokableCall>” or there is a really low number of the “Referenced by”, try searching for it in the “Same” or “New in B” dropdown.
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:
There is as many m_calls as there is objects that require the call. We dont try and do any additional processing to consolidate calls as if there is any variation what so ever separating them at a later point would not be trivial.
There should be no micro-freezes noticeable as these calls are also generated at the time of object instantiation and in comparison to the rest of object creation is a minimal time.
Resolution Note (2022.2.X):
There is as many m_calls as there is objects that require the call. We dont try and do any additional processing to consolidate calls as if there is any variation what so ever separating them at a later point would not be trivial.
There should be no micro-freezes noticeable as these calls are also generated at the time of object instantiation and in comparison to the rest of object creation is a minimal time.