Search Issue Tracker
Active
Under Consideration for 6000.0.X, 6000.1.X, 6000.2.X
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
- Editor crashes with "GetManagerFromContext: pointer to object of manager 'PlayerSettings' is NULL (table index 0)" error when launching a project with a corrupted library
- Crash on PersistentManager::GetSerializedFileIfObjectAvailable when opening a specific project
- An extra separation line is present between the options in the AssetBundle and it's Variants dropdown Menus
- Xcode VisionOS builds fail with a "Circular dependency..." error when the used project is named "Metal"
- ScrollView.ScrollTo method does not work when trying to scroll to an item that has been added in the same frame
Add comment