Search Issue Tracker
Fixed
Fixed in 6000.0.47f1, 6000.1.0b15, 6000.2.0a9
Votes
0
Found in
6000.0.45f1
6000.1.0b13
6000.2.0a8
Issue ID
UUM-101626
Regression
No
Awaitable.NextFrameAsync causes GC Alloc 0.7 KB when using CancellationToken
Reproduction steps:
1. Open the attached project "ReproProj"
2. Open the “/Assets/Scenes/TestAwaitableAlloc.unity” Scene
3. Enter the Play Mode
4. Click the Button with the text "NextFrameAsync"
5. Click the Button with text “NextFrameAsyncCancellationToken“
6. Open Profiler window (Window > Analysis > Profiler)
7. In Profiler’s Hierarchy, go to “PlayerLoop > Update.ScriptRunDelayedDynamicFrameRate > CoroutinesDelayedCalls >Awaitable.OnUpdate() [Invoke] > GC.Alloc”
8. Observe the GC Alloc
Expected result: GC Alloc is 0 KB
Actual result: GC Alloc is 0.7 KB
Reproducible with: 6000.0.45f1, 6000.1.0b13, 6000.2.0a8
Could not test with: 2022.3.60f1 (Assets\Scenes\TestAwaitableAlloc.cs(29,15): error CS0246: The type or namespace name 'Awaitable' could not be found)
Reproducible on:
Play Mode
Windows Standalone Player
Testing environment: Windows 10 Enterprise 21H2
Not reproducible on: No other environment tested
Note:
- Discussions thread https://discussions.unity.com/t/does-awaitable-nextframeasync-cause-large-allocations-with-cancellationtoken/1620767
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- "Shader warning in 'Hidden/Light2D': implicit truncation of vector type" is thrown when building Universal 2D template
- AI Assistant breaks compilation of packages using System.Runtime.CompilerServices.Unsafe via auto-referencing
- Unity Hub checks the "Documentation" module by default on the 6.4 and 6.5 streams despite that it was unchecked with the previous installs
- Shortcut that toggles between Dopesheet and Curves Views in the Animation Window's Timeline is mislabed
- Property List Items Overlap onto the Property List's top edge when scrolling through a long Property List
Add comment