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|https://discussions.unity.com/t/does-awaitable-nextframeasync-cause-large-allocations-with-cancellationtoken/1620767|smart-link]
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- "Create Empty Child" Option Creates Root Object When No Parent Is Selected
- Freeze/Crash when entering Play Mode in a specific project
- Lack of documentation regarding VFX Ray Tracing support
- Shader properties do not appear on the GameObject when switching ShaderGraphs during runtime in the Player
- Multiple '-' symbols are allowed to appear in a row when inputting '.' into a non-decimal numeric field
Add comment