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
- 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:
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.